Skip to content

Commit 57db3b8

Browse files
committed
Remove configurable columns TODO — implemented via Configure Table button
1 parent 1cb5a52 commit 57db3b8

2 files changed

Lines changed: 0 additions & 23 deletions

File tree

TODO.md

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,3 @@ Currently MULTIOBJECT values truncate at 3 items with a bare `…`.
1212
- Add a `.count()` call on the queryset before slicing, or
1313
- Fetch all items into a list and slice in Python (simpler, acceptable for typical M2M sizes).
1414
- Pass the full count alongside the truncated list in the row tuple, then use it in the template.
15-
16-
---
17-
18-
## Configurable columns
19-
20-
Allow operators to hide columns via `PLUGINS_CONFIG`.
21-
22-
**Proposed setting:**
23-
```python
24-
PLUGINS_CONFIG = {
25-
'netbox_custom_objects_tab': {
26-
'columns': ['type', 'object', 'value', 'field', 'actions'], # default: all
27-
}
28-
}
29-
```
30-
31-
**Implementation notes:**
32-
- View builds a `visible_columns` set from config, falling back to the full set.
33-
- Pass `visible_columns` in the template context.
34-
- Each `<th>` / `<td>` is wrapped in `{% if 'colname' in visible_columns %}`.
35-
- Removing `'actions'` hides both Edit and Delete buttons.

tests/test_register_tabs.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
import pytest
1212

13-
1413
# ---------------------------------------------------------------------------
1514
# Helpers
1615
# ---------------------------------------------------------------------------
@@ -110,7 +109,6 @@ def _count(self, fields_and_counts):
110109
111110
fields_and_counts: list of (field_type_value, count_int)
112111
"""
113-
from extras.choices import CustomFieldTypeChoices
114112

115113
mock_fields = []
116114
for field_type, count in fields_and_counts:

0 commit comments

Comments
 (0)