Changeset

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
parents 13472:d5a9847b0e55
children 13474:05c1098084cd
files plugins/mod_admin_shell.lua
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
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";