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

Provide a default view for Report instances

This commit is contained in:
Jeremy Stretch
2020-07-06 13:30:13 -04:00
parent 1f905e72d9
commit 592ad18317
4 changed files with 61 additions and 12 deletions

View File

@@ -146,12 +146,19 @@ class Report(object):
return self.__module__
@property
def name(self):
def class_name(self):
return self.__class__.__name__
@property
def name(self):
"""
Override this attribute to set a custom display name.
"""
return self.class_name
@property
def full_name(self):
return '.'.join([self.__module__, self.__class__.__name__])
return f'{self.module}.{self.class_name}'
def _log(self, obj, message, level=LogLevelChoices.LOG_DEFAULT):
"""