1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Extend ObjectChange to optionally indicate a related object (e.g. a parent device)

This commit is contained in:
Jeremy Stretch
2018-06-22 15:05:40 -04:00
parent 6c1b5fdf3a
commit 2d198403c7
8 changed files with 136 additions and 43 deletions

View File

@ -52,6 +52,9 @@ class ObjectChangeTable(BaseTable):
action = tables.TemplateColumn(
template_code=OBJECTCHANGE_ACTION
)
changed_object_type = tables.Column(
verbose_name='Type'
)
object_repr = tables.TemplateColumn(
template_code=OBJECTCHANGE_OBJECT,
verbose_name='Object'
@ -62,4 +65,4 @@ class ObjectChangeTable(BaseTable):
class Meta(BaseTable.Meta):
model = ObjectChange
fields = ('time', 'user_name', 'action', 'content_type', 'object_repr', 'request_id')
fields = ('time', 'user_name', 'action', 'changed_object_type', 'object_repr', 'request_id')