Skip to content

Commit 7005b25

Browse files
committed
Improve UX with Select Layers dropdown menu
Layer names within Select Layers dropdown menu are now sorted by LAYERS_SORT_ORDER. So they are listed in the same order as the actual layers on the topology view.
1 parent 9adc5c6 commit 7005b25

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

nextbox_ui_plugin/views.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,8 @@ def get_site_topology(site_id):
217217
# Include links to devices from the same Site only
218218
if link._termination_b_device_id in device_ids:
219219
links.append(link)
220+
device_roles = list(device_roles)
221+
device_roles.sort(key=lambda i: get_node_layer_sort_preference(i[0]))
220222
if not links:
221223
return topology_dict, device_roles, multi_cable_connections
222224
link_ids = set()

0 commit comments

Comments
 (0)