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

#10178 add manufacturer to device detail view devicetype

This commit is contained in:
Arthur
2022-08-29 15:26:38 -07:00
parent 6571faad6c
commit 8ca3dfd8c9
2 changed files with 5 additions and 1 deletions

View File

@ -168,6 +168,10 @@ class DeviceType(NetBoxModel):
def get_absolute_url(self):
return reverse('dcim:devicetype', args=[self.pk])
@property
def get_full_name(self):
return f"{ self.manufacturer } { self.model }"
def to_yaml(self):
data = {
'manufacturer': self.manufacturer.name,

View File

@ -90,7 +90,7 @@
<tr>
<th scope="row">Device Type</th>
<td>
{{ object.device_type|linkify }} ({{ object.device_type.u_height }}U)
{{ object.device_type|linkify:"get_full_name" }} ({{ object.device_type.u_height }}U)
</td>
</tr>
<tr>