mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-24 17:38:37 -06:00
Cleaned up objectchange table
This commit is contained in:
parent
bbaa3a2058
commit
85efdf8e00
@ -24,6 +24,10 @@ CONFIGCONTEXT_ACTIONS = """
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
OBJECTCHANGE_TIME = """
|
||||||
|
<a href="{{ record.get_absolute_url }}">{{ value|date:"SHORT_DATETIME_FORMAT" }}</a>
|
||||||
|
"""
|
||||||
|
|
||||||
OBJECTCHANGE_ACTION = """
|
OBJECTCHANGE_ACTION = """
|
||||||
{% if record.action == 1 %}
|
{% if record.action == 1 %}
|
||||||
<span class="label label-success">Created</span>
|
<span class="label label-success">Created</span>
|
||||||
@ -42,6 +46,10 @@ OBJECTCHANGE_OBJECT = """
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
OBJECTCHANGE_REQUEST_ID = """
|
||||||
|
<a href="{% url 'extras:objectchange_list' %}?request_id={{ value }}">{{ value }}</a>
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
class TagTable(BaseTable):
|
class TagTable(BaseTable):
|
||||||
pk = ToggleColumn()
|
pk = ToggleColumn()
|
||||||
@ -74,7 +82,9 @@ class ConfigContextTable(BaseTable):
|
|||||||
|
|
||||||
|
|
||||||
class ObjectChangeTable(BaseTable):
|
class ObjectChangeTable(BaseTable):
|
||||||
time = tables.LinkColumn()
|
time = tables.TemplateColumn(
|
||||||
|
template_code=OBJECTCHANGE_TIME
|
||||||
|
)
|
||||||
action = tables.TemplateColumn(
|
action = tables.TemplateColumn(
|
||||||
template_code=OBJECTCHANGE_ACTION
|
template_code=OBJECTCHANGE_ACTION
|
||||||
)
|
)
|
||||||
@ -85,7 +95,8 @@ class ObjectChangeTable(BaseTable):
|
|||||||
template_code=OBJECTCHANGE_OBJECT,
|
template_code=OBJECTCHANGE_OBJECT,
|
||||||
verbose_name='Object'
|
verbose_name='Object'
|
||||||
)
|
)
|
||||||
request_id = tables.Column(
|
request_id = tables.TemplateColumn(
|
||||||
|
template_code=OBJECTCHANGE_REQUEST_ID,
|
||||||
verbose_name='Request ID'
|
verbose_name='Request ID'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user