From 5550be6381760d973ff94a22cbb1111b545b212d Mon Sep 17 00:00:00 2001 From: aidan Date: Wed, 3 Apr 2024 21:56:03 -0700 Subject: mod_admin_shell: Add connection created time This adds an output format option to show the time that the connection was created. Ref #1852 --- plugins/mod_admin_shell.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/plugins/mod_admin_shell.lua b/plugins/mod_admin_shell.lua index 45a891f4..d085ce43 100644 --- a/plugins/mod_admin_shell.lua +++ b/plugins/mod_admin_shell.lua @@ -867,6 +867,18 @@ available_columns = { 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"; -- cgit v1.2.3