[PR #7673] [MERGED] Closes #6930: Add 'ID' column to object tables #13264

Closed
opened 2025-12-29 22:26:20 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/7673
Author: @rhyser9
Created: 10/28/2021
Status: Merged
Merged: 11/2/2021
Merged by: @jeremystretch

Base: developHead: 6930_id_column


📝 Commits (10+)

📊 Changes

16 files changed (+111 additions, -81 deletions)

View changed files

📝 netbox/circuits/tables.py (+5 -5)
📝 netbox/dcim/tables/__init__.py (+3 -0)
📝 netbox/dcim/tables/cables.py (+0 -4)
📝 netbox/dcim/tables/devices.py (+23 -23)
📝 netbox/dcim/tables/devicetypes.py (+18 -9)
📝 netbox/dcim/tables/power.py (+2 -2)
📝 netbox/dcim/tables/racks.py (+3 -3)
📝 netbox/dcim/tables/sites.py (+4 -4)
📝 netbox/extras/tables.py (+24 -12)
📝 netbox/ipam/tables/ip.py (+8 -6)
📝 netbox/ipam/tables/services.py (+1 -1)
📝 netbox/ipam/tables/vlans.py (+5 -2)
📝 netbox/ipam/tables/vrfs.py (+2 -2)
📝 netbox/tenancy/tables.py (+2 -2)
📝 netbox/utilities/tables.py (+5 -0)
📝 netbox/virtualization/tables.py (+6 -6)

📄 Description

Closes: #6930

Adds an 'ID' column to most object tables, which is hidden by default. This column exposes Netbox's numeric ID for that object.

image

The column has been added to the following tables:

  • Organization > Site, Region, Site Group, Location, Rack Role, Rack, Rack Reservations, Tenant, Rack Role, Rack, Rack Reservation
  • Devices > Manufacturer, Device Type, Device Role, Platform, Device, Virtual Chassis
  • Device Components > Console Port, Console Server Port, Power Port, Power Outlet, Interface, Front Port, Rear Port, Device Bay, Inventory item
  • IPAM > IP Addresses, IP Ranges, Prefixes, Prefix & VLAN Roles, VRFs, Route Targets, VLANs, VLAN Groups, Services
  • Virtualization > Virtual Machines, VM Interfaces, Clusters, Cluster Types, Cluster Groups
  • Circuits > Circuit Types, Providers, Provider Networks
  • Power > Power Feeds, Power Panels
  • Other > Journal Entries, Change Log Entries, Custom Fields, Custom Links, Export Templates, Webhooks, Tags, Config Contexts

Regarding the "Circuits" table, this already exposes the circuit ID under the 'ID' header. My thought would be to change the circuit ID header to 'Circuit ID', and then add the Netbox 'ID' column, but this could potentially break anything that consumes the CSV exports, and thus would need to wait for v3.1.0.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/7673 **Author:** [@rhyser9](https://github.com/rhyser9) **Created:** 10/28/2021 **Status:** ✅ Merged **Merged:** 11/2/2021 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `6930_id_column` --- ### 📝 Commits (10+) - [`ae9611a`](https://github.com/netbox-community/netbox/commit/ae9611aa394bd2c730ff0553d49ee9cceb939e5c) netbox-community/netbox#6930: Add ID column to devices, device types, and components - [`45542a4`](https://github.com/netbox-community/netbox/commit/45542a4566958cf5a2276b55f959cbe74c35035b) netbox-community/netbox#6930: Add ID column to sites, racks, and tenants - [`a02851a`](https://github.com/netbox-community/netbox/commit/a02851a46bf054da20271070347faf33fbe88045) netbox-community/netbox#6930: Add ID column to power, providers, TODO circuits - [`fa56336`](https://github.com/netbox-community/netbox/commit/fa5633601074cfa4659a466eafef0a0b36c0eaca) netbox-community/netbox#6930: Add ID column to virtualization tables - [`b75a872`](https://github.com/netbox-community/netbox/commit/b75a872ddadf457007fdb219532c332742ae552c) netbox-community/netbox#6930: Add ID column to IPAM tables - [`61d2063`](https://github.com/netbox-community/netbox/commit/61d20639db8db045551612b3598097f8229cdecf) netbox-community/netbox#6930: Add ID column to 'extras' tables - [`02f2cf4`](https://github.com/netbox-community/netbox/commit/02f2cf49e267e6a917a7bd03d3cac5eb1a6bddba) netbox-community/netbox#6930: Move ID column to BaseTable class - [`8aef9f3`](https://github.com/netbox-community/netbox/commit/8aef9f3a48fdce44085d844482d9a5cf224cdd8b) netbox-community/netbox#6930: Don't linkify ID in device component template tables - [`7b97b14`](https://github.com/netbox-community/netbox/commit/7b97b14bf06044d439171ef5a3b77f03032bdca8) netbox-community/netbox#6930: Don't show ID column in interface/console/power connections tables - [`fdc9f1f`](https://github.com/netbox-community/netbox/commit/fdc9f1f99af7d643ef805f23c56e6887163579ec) netbox-community/netbox#6930: Don't show ID column in device component template tables ### 📊 Changes **16 files changed** (+111 additions, -81 deletions) <details> <summary>View changed files</summary> 📝 `netbox/circuits/tables.py` (+5 -5) 📝 `netbox/dcim/tables/__init__.py` (+3 -0) 📝 `netbox/dcim/tables/cables.py` (+0 -4) 📝 `netbox/dcim/tables/devices.py` (+23 -23) 📝 `netbox/dcim/tables/devicetypes.py` (+18 -9) 📝 `netbox/dcim/tables/power.py` (+2 -2) 📝 `netbox/dcim/tables/racks.py` (+3 -3) 📝 `netbox/dcim/tables/sites.py` (+4 -4) 📝 `netbox/extras/tables.py` (+24 -12) 📝 `netbox/ipam/tables/ip.py` (+8 -6) 📝 `netbox/ipam/tables/services.py` (+1 -1) 📝 `netbox/ipam/tables/vlans.py` (+5 -2) 📝 `netbox/ipam/tables/vrfs.py` (+2 -2) 📝 `netbox/tenancy/tables.py` (+2 -2) 📝 `netbox/utilities/tables.py` (+5 -0) 📝 `netbox/virtualization/tables.py` (+6 -6) </details> ### 📄 Description ### Closes: #6930 Adds an 'ID' column to most object tables, which is hidden by default. This column exposes Netbox's numeric ID for that object. ![image](https://user-images.githubusercontent.com/3577982/139305629-4a3d08e0-e04f-4ef4-a994-6325d20767b4.png) The column has been added to the following tables: - Organization > Site, Region, Site Group, Location, Rack Role, Rack, Rack Reservations, Tenant, Rack Role, Rack, Rack Reservation - Devices > Manufacturer, Device Type, Device Role, Platform, Device, Virtual Chassis - Device Components > Console Port, Console Server Port, Power Port, Power Outlet, Interface, Front Port, Rear Port, Device Bay, Inventory item - IPAM > IP Addresses, IP Ranges, Prefixes, Prefix & VLAN Roles, VRFs, Route Targets, VLANs, VLAN Groups, Services - Virtualization > Virtual Machines, VM Interfaces, Clusters, Cluster Types, Cluster Groups - Circuits > Circuit Types, Providers, Provider Networks - Power > Power Feeds, Power Panels - Other > Journal Entries, Change Log Entries, Custom Fields, Custom Links, Export Templates, Webhooks, Tags, Config Contexts Regarding the "Circuits" table, this already exposes the circuit ID under the 'ID' header. My thought would be to change the circuit ID header to 'Circuit ID', and then add the Netbox 'ID' column, but this could potentially break anything that consumes the CSV exports, and thus would need to wait for v3.1.0. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 22:26:20 +01:00
adam closed this issue 2025-12-29 22:26:24 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13264