Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions netbox/dcim/tables/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,8 @@ class Meta(NetBoxTable.Meta):
class DeviceTable(TenancyColumnsMixin, ContactsColumnMixin, NetBoxTable):
name = tables.TemplateColumn(
verbose_name=_('Name'),
accessor=Accessor('label'),
template_code=DEVICE_LINK,
linkify=True
linkify=True,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, forgot I added this when adding the previous order_by argument. I'm a monster!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cvitan! The new guy is sneaking in commas again! I told you he was going to be trouble.

)
status = columns.ChoiceFieldColumn(
verbose_name=_('Status'),
Expand Down
2 changes: 1 addition & 1 deletion netbox/dcim/tables/template_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"""

DEVICE_LINK = """
{{ value|default:'<span class="badge text-bg-info">Unnamed device</span>' }}
{{ record.label|default:'<span class="badge text-bg-info">Unnamed device</span>' }}
"""

DEVICEBAY_STATUS = """
Expand Down
2 changes: 1 addition & 1 deletion netbox/dcim/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2025,7 +2025,7 @@ class PlatformBulkDeleteView(generic.BulkDeleteView):

@register_model_view(Device, 'list', path='', detail=False)
class DeviceListView(generic.ObjectListView):
queryset = Device.objects.all()
queryset = Device.objects.select_related('virtual_chassis')
filterset = filtersets.DeviceFilterSet
filterset_form = forms.DeviceFilterForm
table = tables.DeviceTable
Expand Down