Unable to deselect columns in listing view #4833

Closed
opened 2025-12-29 19:21:02 +01:00 by adam · 4 comments
Owner

Originally created by @candlerb on GitHub (Apr 27, 2021).

NetBox version

v2.11.1

Python version

3.6

Steps to Reproduce

I am currently seeing the following behaviour:

  1. Go to /ipam/ip-addresses/
  2. Click the "Configure" button
  3. Remove one of the columns (e.g. "Role"), by clicking on it in the bottom selection box, and clicking the red "Remove columns button", then click the blue Save

(ipam/ip-addresses is just an example; I see this with others e.g. ipam/prefixes)

Expected Behavior

When the page redraws, the column should no longer be shown.

Observed Behavior

The removed column is still shown. In fact, it displays the same set of columns as if I had selected "Reset".

The columns which are not displayed by default, and hence are in the "Available columns" list, are:

  • NAT (Inside)
  • Tags
  • Interface
  • Device/VM

I can successfully add these columns to the display, individually or all at once. However if I remove any one of them, it removes them all - again, as if I'd selected Reset.

(Aside: beta.netbox.dev is down, and netboxdemo.com is still running v2.10.1, which makes it harder to reproduce "clean")

Originally created by @candlerb on GitHub (Apr 27, 2021). ### NetBox version v2.11.1 ### Python version 3.6 ### Steps to Reproduce I am currently seeing the following behaviour: 1. Go to `/ipam/ip-addresses/` 2. Click the "Configure" button 3. Remove one of the columns (e.g. "Role"), by clicking on it in the bottom selection box, and clicking the red "Remove columns button", then click the blue Save (ipam/ip-addresses is just an example; I see this with others e.g. ipam/prefixes) ### Expected Behavior When the page redraws, the column should no longer be shown. ### Observed Behavior The removed column is still shown. In fact, it displays the same set of columns as if I had selected "Reset". The columns which are not displayed by default, and hence are in the "Available columns" list, are: * NAT (Inside) * Tags * Interface * Device/VM I can successfully _add_ these columns to the display, individually or all at once. However if I remove any _one_ of them, it removes them all - again, as if I'd selected Reset. (Aside: beta.netbox.dev is down, and netboxdemo.com is still running v2.10.1, which makes it harder to reproduce "clean")
adam added the type: bugstatus: duplicate labels 2025-12-29 19:21:02 +01:00
adam closed this issue 2025-12-29 19:21:02 +01:00
Author
Owner

@candlerb commented on GitHub (Apr 27, 2021):

Looking at tcpdump I see the following when I click "Save" after removing a column:

PATCH /api/users/config/ HTTP/1.1
...

{"tables":{"IPAddressDetailTable":{"available_columns":[],"columns":[]}}}

So it looks like the Javascript is sending an empty list of columns, presumably treated as reset. (Aside: browser is Chrome 90.0.4430.85 under macOS 10.14.6. I don't see any errors in Javascript console)

If I click "Save" after adding a column (in this case "Tags"):

PATCH /api/users/config/ HTTP/1.1
...

{"tables":{"IPAddressDetailTable":{"available_columns":[],"columns":["address","vrf","status","role","tenant","assigned","dns_name","description","tags"]}}}

Here it has correctly listed the columns to display, but available_columns is empty.

Note: I do have one custom field defined in my database. It is on IPAM > Prefixes, name "dhcp_pool", label "DHCP Pool", type text. However, there are no others, and in particular not on IPAM > IPAddresses.

EDIT: I have removed the custom field, it makes no difference.

@candlerb commented on GitHub (Apr 27, 2021): Looking at tcpdump I see the following when I click "Save" after removing a column: ``` PATCH /api/users/config/ HTTP/1.1 ... {"tables":{"IPAddressDetailTable":{"available_columns":[],"columns":[]}}} ``` So it looks like the Javascript is sending an empty list of columns, presumably treated as reset. (Aside: browser is Chrome 90.0.4430.85 under macOS 10.14.6. I don't see any errors in Javascript console) If I click "Save" after adding a column (in this case "Tags"): ``` PATCH /api/users/config/ HTTP/1.1 ... {"tables":{"IPAddressDetailTable":{"available_columns":[],"columns":["address","vrf","status","role","tenant","assigned","dns_name","description","tags"]}}} ``` Here it has correctly listed the columns to display, but available_columns is empty. Note: I do have one custom field defined in my database. It is on IPAM > Prefixes, name "dhcp_pool", label "DHCP Pool", type text. However, there are no others, and in particular not on IPAM > IPAddresses. EDIT: I have removed the custom field, it makes no difference.
Author
Owner

@candlerb commented on GitHub (Apr 27, 2021):

Also, the response to the PATCH looks like this:

{"tables":{"SiteTable":{"columns":["name","status","region","asn","description","tags"]},"DeviceTable":{"columns":[],"available_columns":[]},"InterfaceTable":{"columns":["device","name","label","enabled","type","mgmt_only","description"]},"VMInterfaceTable":{"columns":["virtual_machine","name","enabled","mac_address","description"]},"PrefixDetailTable":{"columns":[],"available_columns":[]},"DeviceInterfaceTable":{"columns":["name","label","enabled","type","lag","mode","mac_address","description","cable","connection","ip_addresses","parent"],"available_columns":[]},"IPAddressDetailTable":{"columns":[],"available_columns":[]},"VirtualMachineDetailTable":{"columns":["name","status","cluster","role","primary_ip","tags"]}},"pagination":{"per_page":25}}

Note the empty column sets for DeviceTable, PrefixDetailTable, IPAddressDetailTable.

This matches select * from users_userconfig:

 id |                                                                                                                                                                                                                                                                                                                                                                                                                          data                                                                                                                                                                                                                                                                                                                                                                                                                           | user_id
----+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------
  1 | {"tables": {"SiteTable": {"columns": ["name", "status", "region", "asn", "description", "tags"]}, "DeviceTable": {"columns": [], "available_columns": []}, "InterfaceTable": {"columns": ["device", "name", "label", "enabled", "type", "mgmt_only", "description"]}, "VMInterfaceTable": {"columns": ["virtual_machine", "name", "enabled", "mac_address", "description"]}, "PrefixDetailTable": {"columns": [], "available_columns": []}, "DeviceInterfaceTable": {"columns": ["name", "label", "enabled", "type", "lag", "mode", "mac_address", "description", "cable", "connection", "ip_addresses", "parent"], "available_columns": []}, "IPAddressDetailTable": {"columns": [], "available_columns": []}, "VirtualMachineDetailTable": {"columns": ["name", "status", "cluster", "role", "primary_ip", "tags"]}}, "pagination": {"per_page": 25}} |       1
(1 row)
@candlerb commented on GitHub (Apr 27, 2021): Also, the response to the PATCH looks like this: ``` {"tables":{"SiteTable":{"columns":["name","status","region","asn","description","tags"]},"DeviceTable":{"columns":[],"available_columns":[]},"InterfaceTable":{"columns":["device","name","label","enabled","type","mgmt_only","description"]},"VMInterfaceTable":{"columns":["virtual_machine","name","enabled","mac_address","description"]},"PrefixDetailTable":{"columns":[],"available_columns":[]},"DeviceInterfaceTable":{"columns":["name","label","enabled","type","lag","mode","mac_address","description","cable","connection","ip_addresses","parent"],"available_columns":[]},"IPAddressDetailTable":{"columns":[],"available_columns":[]},"VirtualMachineDetailTable":{"columns":["name","status","cluster","role","primary_ip","tags"]}},"pagination":{"per_page":25}} ``` Note the empty column sets for DeviceTable, PrefixDetailTable, IPAddressDetailTable. This matches `select * from users_userconfig`: ``` id | data | user_id ----+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------- 1 | {"tables": {"SiteTable": {"columns": ["name", "status", "region", "asn", "description", "tags"]}, "DeviceTable": {"columns": [], "available_columns": []}, "InterfaceTable": {"columns": ["device", "name", "label", "enabled", "type", "mgmt_only", "description"]}, "VMInterfaceTable": {"columns": ["virtual_machine", "name", "enabled", "mac_address", "description"]}, "PrefixDetailTable": {"columns": [], "available_columns": []}, "DeviceInterfaceTable": {"columns": ["name", "label", "enabled", "type", "lag", "mode", "mac_address", "description", "cable", "connection", "ip_addresses", "parent"], "available_columns": []}, "IPAddressDetailTable": {"columns": [], "available_columns": []}, "VirtualMachineDetailTable": {"columns": ["name", "status", "cluster", "role", "primary_ip", "tags"]}}, "pagination": {"per_page": 25}} | 1 (1 row) ```
Author
Owner

@candlerb commented on GitHub (Apr 27, 2021):

Another note: if I click "Reset" in the IPAM > IPAddresses view, then the exchange is:

>>>
{"tables":{"IPAddressDetailTable":{"available_columns":[],"columns":[]}}}

<<<
…,"IPAddressDetailTable":{"columns":[],"available_columns":[]},…

That is: the Reset button also sends empty column lists.

@candlerb commented on GitHub (Apr 27, 2021): Another note: if I click "Reset" in the IPAM > IPAddresses view, then the exchange is: ``` >>> {"tables":{"IPAddressDetailTable":{"available_columns":[],"columns":[]}}} <<< …,"IPAddressDetailTable":{"columns":[],"available_columns":[]},… ``` That is: the Reset button also sends empty column lists.
Author
Owner

@jeremystretch commented on GitHub (Apr 27, 2021):

Duplicate of #6248

@jeremystretch commented on GitHub (Apr 27, 2021): Duplicate of #6248
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4833