# HG changeset patch # User Matthew Wild # Date 1680869391 -3600 # Node ID eb832553d6352cd8ecff48f95990c450424cdc8e # Parent d02f465e2affb08ef9a736b203c603608810f4aa mod_audit: Use proportional columns in table output diff -r d02f465e2aff -r eb832553d635 mod_audit/mod_audit.lua --- a/mod_audit/mod_audit.lua Fri Apr 07 13:09:31 2023 +0100 +++ b/mod_audit/mod_audit.lua Fri Apr 07 13:09:51 2023 +0100 @@ -151,13 +151,13 @@ local colspec = { { title = "Date", key = "when", width = 19, mapper = function (when) return os.date("%Y-%m-%d %R:%S", when); end }; - { title = "Source", key = "source", width = 18 }; - { title = "Event", key = "event_type", width = 22 }; + { title = "Source", key = "source", width = "2p" }; + { title = "Event", key = "event_type", width = "2p" }; }; if not arg.global then table.insert(colspec, { - title = "User", key = "username", width = 30, + title = "User", key = "username", width = "2p", mapper = function (user) if user == "@" then return ""; end if user:sub(-#host-1, -1) == ("@"..host) then @@ -168,7 +168,7 @@ if attach_ips then table.insert(colspec, { - title = "IP", key = "ip", width = "28"; + title = "IP", key = "ip", width = "2p"; }); end if attach_location then