Skip to content

Primary IPv4 column sorts lexicographically instead of numerically #1797

Closed

Description

@MauroDece

What installation are you running?

Production (netalertx) 📦

Is there an existing issue for this?

The issue occurs in the following browsers. Select at least 2.

  • Firefox
  • Chrome
  • Edge
  • Safari (unsupported) - PRs welcome
  • N/A - This is an issue with the backend

Current Behavior

On the Devices page, sorting by the IPv4 / Primary IPv4 column sorts the addresses alphabetically instead of numerically.

For example, I get an order like:

192.168.1.1
192.168.1.105
192.168.1.106
192.168.1.112
192.168.1.117
192.168.1.120
192.168.1.132
192.168.1.138
192.168.1.139
192.168.1.140
192.168.1.144
192.168.1.15

I'm running v26.9.0.

I found #1606, which looks like the same kind of sorting problem, but that issue appears to have been fixed for the IP column in another view. The Primary IPv4 column on the Devices page still seems to sort as a string.

Expected Behavior

IPv4 addresses should be sorted numerically.

For example:

192.168.1.1
192.168.1.15
192.168.1.20
192.168.1.21
...
192.168.1.105
192.168.1.106

This should behave the same way as the existing numeric IP sorting used elsewhere.

Steps To Reproduce

  1. Open Devices → All devices.
  2. Make sure the IPv4 / Primary IPv4 column is visible.
  3. Click the IPv4 column header to sort ascending.
  4. Devices are sorted lexicographically, e.g. 192.168.1.105 appears before 192.168.1.15.

Relevant app.conf settings

No special configuration seems to be required. The Primary IPv4 column is enabled in the Devices table.

NetAlertX version: v26.9.0

docker-compose.yml

Standard Docker installation using host networking. I don't believe the Docker configuration is relevant to the table sorting issue.

Debug or Trace enabled

  • I have read and followed the steps in the wiki link above and provided the required debug logs and the log section covers the time when the issue occurs.

Relevant app.log section

No relevant errors are written to app.log when sorting the column. The issue is reproducible directly from the Devices table.

Docker Logs

No relevant Docker log output is produced when sorting the IPv4 column. The issue is reproducible entirely from the Devices table UI.

Activity

  1. added a commit that references this issue on Sep 18, 2026
    0fc6082
  2. jokob-sk commented on Sep 18, 2026

    @jokob-sk
    Collaborator

    his should be available/fixed in the next release.
    It would be great if you could test the ghcr.io/netalertx/netalertx-dev-unsafe Docker image in ~15 minutes (or once the latest GitHub Action finishes).

    ⚠️ Please back up everything first, or ideally spin up a separate container (make sure you use a unique PORT and GRAPHQL_PORT if running instances concurrently) with its own DB and config (a copy of your current setup), as database changes may occur.

    After updating:

    • Click the 🔄 refresh button in the blue header at the top
    • Hard refresh your browser cache (shift + reload) to force js and css files reload

    👉 If I don’t receive confirmation that this works, I may revert the changes to avoid introducing bugs.

    Disclaimer: Running the dev container long-term may lead to data loss, as upgrade paths are not guaranteed.

    Thanks in advance,
    j

  3. added
    Waiting for reply⏳Waiting for the original poster to respond, or discussion in progress.
    next release/in dev image 🚀This is coming in the next release or was already released if the issue is Closed.
    on Sep 18, 2026
  4. MauroDece commented on Sep 21, 2026

    @MauroDece
    Author

    Tested ghcr.io/netalertx/netalertx-dev-unsafe:unsafe.

    After refreshing NetAlertX and doing a hard browser refresh, the Primary IPv4 column now sorts numerically as expected in both ascending and descending order.

    For example, ascending correctly gives .1, .10, .15, .20, ... .44, .105, .106 instead of placing .105 immediately after .10.

    Looks fixed on my side. Thanks!

  5. jokob-sk commented on Sep 21, 2026

    @jokob-sk
    Collaborator

    Thanks for testing.

  6. removed
    Waiting for reply⏳Waiting for the original poster to respond, or discussion in progress.
    on Sep 21, 2026
  7. jokob-sk commented on Sep 30, 2026

    @jokob-sk
    Collaborator

    releasing in ~1h -> closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Something isn't workingnext release/in dev image 🚀This is coming in the next release or was already released if the issue is Closed.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions