changeset 5327:7e3862a26e55

mod_audit: Add 'note' column
author Matthew Wild <mwild1@gmail.com>
date Fri, 07 Apr 2023 13:46:29 +0100
parents dc058fcc3fe3
children dd8616e68cb3
files mod_audit/mod_audit.lua
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_audit/mod_audit.lua	Fri Apr 07 13:44:18 2023 +0100
+++ b/mod_audit/mod_audit.lua	Fri Apr 07 13:46:29 2023 +0100
@@ -185,6 +185,12 @@
 		});
 	end
 
+	if arg.show_note then
+		table.insert(colspec, {
+			title = "Note", key = "note", width = "2p";
+		});
+	end
+
 	local row, width = require "util.human.io".table(colspec);
 
 	print(string.rep("-", width));
@@ -200,6 +206,7 @@
 				username = user;
 				ip = entry:get_child_text("remote-ip");
 				location = entry:find("location@country");
+				note = entry:get_child_text("note");
 			}));
 		end
 	end