mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-27 10:58:37 -06:00
Display manufacturer & model of module type on module view
This commit is contained in:
parent
e1829abd8c
commit
c2e987adb6
@ -417,6 +417,10 @@ class ModuleType(ImageAttachmentsMixin, PrimaryModel, WeightMixin):
|
||||
def get_absolute_url(self):
|
||||
return reverse('dcim:moduletype', args=[self.pk])
|
||||
|
||||
@property
|
||||
def full_name(self):
|
||||
return f"{self.manufacturer} {self.model}"
|
||||
|
||||
def to_yaml(self):
|
||||
data = {
|
||||
'manufacturer': self.manufacturer.name,
|
||||
|
@ -60,7 +60,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{% trans "Module Type" %}</th>
|
||||
<td>{{ object.module_type|linkify }}</td>
|
||||
<td>{{ object.module_type|linkify:"full_name" }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{% trans "Status" %}</th>
|
||||
|
Loading…
Reference in New Issue
Block a user