From 85efdf8e003141655dd89417d5f36b397e8e4da6 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 12 Jul 2018 13:54:22 -0400 Subject: [PATCH] Cleaned up objectchange table --- netbox/extras/tables.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/netbox/extras/tables.py b/netbox/extras/tables.py index 8e35e5247..9f983583a 100644 --- a/netbox/extras/tables.py +++ b/netbox/extras/tables.py @@ -24,6 +24,10 @@ CONFIGCONTEXT_ACTIONS = """ {% endif %} """ +OBJECTCHANGE_TIME = """ +{{ value|date:"SHORT_DATETIME_FORMAT" }} +""" + OBJECTCHANGE_ACTION = """ {% if record.action == 1 %} Created @@ -42,6 +46,10 @@ OBJECTCHANGE_OBJECT = """ {% endif %} """ +OBJECTCHANGE_REQUEST_ID = """ +{{ value }} +""" + class TagTable(BaseTable): pk = ToggleColumn() @@ -74,7 +82,9 @@ class ConfigContextTable(BaseTable): class ObjectChangeTable(BaseTable): - time = tables.LinkColumn() + time = tables.TemplateColumn( + template_code=OBJECTCHANGE_TIME + ) action = tables.TemplateColumn( template_code=OBJECTCHANGE_ACTION ) @@ -85,7 +95,8 @@ class ObjectChangeTable(BaseTable): template_code=OBJECTCHANGE_OBJECT, verbose_name='Object' ) - request_id = tables.Column( + request_id = tables.TemplateColumn( + template_code=OBJECTCHANGE_REQUEST_ID, verbose_name='Request ID' )