Diff

plugins/mod_admin_shell.lua @ 13473:9eb081616842

mod_admin_shell: Add connection created time This adds an output format option to show the time that the connection was created. Ref #1852
author aidan@jmad.org
date Wed, 03 Apr 2024 21:56:03 -0700
parent 13354:83f3076965f6
child 13489:ae65f199f408
line wrap: on
line diff
--- a/plugins/mod_admin_shell.lua	Thu Apr 04 19:44:17 2024 +0200
+++ b/plugins/mod_admin_shell.lua	Wed Apr 03 21:56:03 2024 -0700
@@ -867,6 +867,18 @@
 			end
 		end;
 	};
+	created = {
+		title = "Connection Created";
+		description = "Time when connection was created";
+		width = #"YYYY MM DD HH:MM:SS";
+		align = "right";
+		key = "conn";
+		mapper = function(conn)
+			if conn then
+				return os.date("%F %T", math.floor(conn.created));
+			end
+		end;
+	};
 	dir = {
 		title = "Dir";
 		description = "Direction of server-to-server connection";