Project

General

Profile

Actions

Feature #15437

closed

Use natural sorting when sorting interfaces

Added by Flo Faber almost 2 years ago. Updated 14 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Interfaces
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
24.11
Release Notes:
Default

Description

When the option Interfaces Sort / Sort Alphabetically is enabled, Interfaces are sorted alphabetically instead of naturally. This causes interfaces to be sorted like this:

  • LAN
  • VLAN12
  • VLAN120
  • VLAN24
  • VLAN240
  • WAN

This behavior is not at all great for interface-descriptions containing numbers as it causes even more confusion than unsorted interfaces. Natural sort would improve this a lot:

  • LAN
  • VLAN12
  • VLAN24
  • VLAN120
  • VlAN240
  • WAN
Actions #2

Updated by Jim Pingle almost 2 years ago

  • Tracker changed from Bug to Feature
  • Affected Architecture deleted (All)
Actions #3

Updated by Marcos M over 1 year ago

  • Subject changed from Interfaces sorted alphabetically instead of naturally to Use natural sorting when sorting interfaces
  • Status changed from New to Pull Request Review
  • Target version set to 2.8.0
  • Plus Target Version set to 24.08
Actions #4

Updated by Marcos M over 1 year ago

  • Status changed from Pull Request Review to Feedback
  • % Done changed from 0 to 100
Actions #5

Updated by Jim Pingle over 1 year ago

  • Plus Target Version changed from 24.08 to 24.11
Actions #6

Updated by Alhusein Zawi over 1 year ago

after enabling "Sort Alphabetically"

LAN
VLAN1
VLAN12
VLAN120
VLAN24
VlAN240
WAN

24.11-ALPHA (amd64)
built on Sat Oct 12 8:22:00 PDT 2024
FreeBSD 15.0-CURRENT

Actions #7

Updated by Jordan G over 1 year ago

once alphabetical sort has been enabled the interface description sort adheres to alphanumerical ascending list order

tested with 24.11.b.20241026.1338 amd64

Actions #8

Updated by Christopher Cope about 1 year ago

  • Status changed from Feedback to Resolved

Looks good on

24.11-BETA (amd64)
built on Sat Nov 9 14:00:00 UTC 2024
FreeBSD 15.0-CURRENT

Marking resolved.

Actions #9

Updated by cemysce . 15 days ago

I'm using 25.11-RELEASE with interfaces sort enabled, and this doesn't seem to be fixed (or it doesn't work as expected when additional non-numeric text follows the number). Here's the problematic excerpt from my supposedly sorted interface list:
  • LAN
  • LAN1
  • LAN10G1
  • LAN10G2
  • LAN2
For reference, sort -V (from GNU coreutils) implements a similar natural sorting of alphanumeric text (it's intended for version strings), and it produces the order I'd expect:
  • LAN
  • LAN1
  • LAN2
  • LAN10G1
  • LAN10G2
Actions #10

Updated by cemysce . 15 days ago

Oh I think I see the problem. The edited code must not be addressing all the places an interface list appears. The Interfaces menu is still not sorted naturally. However, the Interfaces widget on the dashboard, the tabs under Firewall/Rules, and the interface selector for various services, all have it sorted naturally.

Actions #11

Updated by cemysce . 14 days ago

I opened a new bug report #16654.

Actions

Also available in: Atom PDF