[PR #13275] [MERGED] Fixes #13033: add formatted speed column to Interfaces #14142

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/13275
Author: @matejv
Created: 7/26/2023
Status: Merged
Merged: 8/2/2023
Merged by: @jeremystretch

Base: developHead: 13033-speed-column


📝 Commits (2)

  • 59e6578 Fixes #13033: add formatted speed column to Interfaces
  • 71f0085 use TemplateColumn instead of own class

📊 Changes

1 file changed (+6 additions, -1 deletions)

View changed files

📝 netbox/dcim/tables/devices.py (+6 -1)

📄 Description

Fixes: #13033

Adds a new column to Interface table where interface speed is passed through humanize_speed & placeholder filters. I've opted to have placeholder filter, since almost all other InterfaceTable columns have it.

To keep CSV export looking OK I had to sub-class TemplateColumn and override value() method. This way we can keep formatted values in CSV exports (it didn't make sense to me to have un-formatted value, since we're keeping the original speed column). And have empty values in CSV export be empty and not filled with — placeholders.


🔄 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/13275 **Author:** [@matejv](https://github.com/matejv) **Created:** 7/26/2023 **Status:** ✅ Merged **Merged:** 8/2/2023 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `13033-speed-column` --- ### 📝 Commits (2) - [`59e6578`](https://github.com/netbox-community/netbox/commit/59e657867cabcd855056e5056409c485fa460d12) Fixes #13033: add formatted speed column to Interfaces - [`71f0085`](https://github.com/netbox-community/netbox/commit/71f00850dccf2d288da83898011f874e62260c0a) use TemplateColumn instead of own class ### 📊 Changes **1 file changed** (+6 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/tables/devices.py` (+6 -1) </details> ### 📄 Description ### Fixes: #13033 Adds a new column to Interface table where interface speed is passed through humanize_speed & placeholder filters. I've opted to have placeholder filter, since almost all other `InterfaceTable` columns have it. To keep CSV export looking OK I had to sub-class `TemplateColumn` and override `value()` method. This way we can keep formatted values in CSV exports (it didn't make sense to me to have un-formatted value, since we're keeping the original speed column). And have empty values in CSV export be empty and not filled with `&mdash;` placeholders. --- <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 23:22:46 +01:00
adam closed this issue 2025-12-29 23:22:47 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14142