Forráskód Böngészése

Changelog & cleanup for #6930

jeremystretch 4 éve
szülő
commit
d0b85586b9

+ 1 - 0
docs/release-notes/version-3.0.md

@@ -4,6 +4,7 @@
 
 ### Enhancements
 
+* [#6930](https://github.com/netbox-community/netbox/issues/6930) - Add an optional "ID" column to all tables
 * [#7668](https://github.com/netbox-community/netbox/issues/7668) - Add "view elevations" button to location view
 
 ### Bug Fixes

+ 1 - 1
netbox/circuits/tables.py

@@ -101,7 +101,7 @@ class CircuitTable(BaseTable):
     pk = ToggleColumn()
     cid = tables.Column(
         linkify=True,
-        verbose_name='ID'
+        verbose_name='Circuit ID'
     )
     provider = tables.Column(
         linkify=True

+ 4 - 5
netbox/utilities/tables.py

@@ -23,6 +23,10 @@ class BaseTable(tables.Table):
 
     :param user: Personalize table display for the given user (optional). Has no effect if AnonymousUser is passed.
     """
+    id = tables.Column(
+        linkify=True,
+        verbose_name='ID'
+    )
 
     class Meta:
         attrs = {
@@ -133,11 +137,6 @@ class BaseTable(tables.Table):
             self._objects_count = sum(1 for obj in self.data if hasattr(obj, 'pk'))
         return self._objects_count
 
-    id = tables.Column(
-        linkify=True,
-        verbose_name='ID'
-    )
-
 
 #
 # Table columns