Bladeren bron

Closes #7561: Add a utilization column to the IP ranges table

jeremystretch 4 jaren geleden
bovenliggende
commit
eb4b4a6c8d
2 gewijzigde bestanden met toevoegingen van 9 en 0 verwijderingen
  1. 4 0
      docs/release-notes/version-3.0.md
  2. 5 0
      netbox/ipam/tables/ip.py

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

@@ -2,6 +2,10 @@
 
 ## v3.0.8 (FUTURE)
 
+### Enhancements
+
+* [#7561](https://github.com/netbox-community/netbox/issues/7561) - Add a utilization column to the IP ranges table
+
 ### Bug Fixes
 
 * [#7300](https://github.com/netbox-community/netbox/issues/7300) - Fix incorrect Device LLDP interface row coloring

+ 5 - 0
netbox/ipam/tables/ip.py

@@ -260,11 +260,16 @@ class IPRangeTable(BaseTable):
         linkify=True
     )
     tenant = TenantColumn()
+    utilization = UtilizationColumn(
+        accessor='utilization',
+        orderable=False
+    )
 
     class Meta(BaseTable.Meta):
         model = IPRange
         fields = (
             'pk', 'start_address', 'end_address', 'size', 'vrf', 'status', 'role', 'tenant', 'description',
+            'utilization',
         )
         default_columns = (
             'pk', 'start_address', 'end_address', 'size', 'vrf', 'status', 'role', 'tenant', 'description',