Merge pull request #1608 from netalertx/next_release
Some checks are pending
✅ Code checks / lint (push) Waiting to run
✅ Code checks / docker-tests (push) Waiting to run
✅ Code checks / check-url-paths (push) Waiting to run
🐳 👩‍💻 docker dev / docker_dev (push) Waiting to run
📘 Deploy MkDocs / deploy (push) Waiting to run

PLG: Enhance IP sorting in device table for correct numeric order #1606
This commit is contained in:
Jokob @NetAlertX
2026-04-12 10:36:36 +10:00
committed by GitHub

View File

@@ -156,7 +156,15 @@ function loadDeviceTable({ sql, containerSelector, tableId, wrapperHtml = null,
{ {
title: getString('Network_Table_IP'), title: getString('Network_Table_IP'),
data: 'devLastIP', data: 'devLastIP',
width: '5%' width: '5%',
render: function (ip, type) {
if (type === 'sort') {
// Convert each octet to a zero-padded 3-digit string for correct numeric sort
if (!ip) return '';
return ip.split('.').map(o => o.padStart(3, '0')).join('.');
}
return ip || '';
}
}, },
{ {
title: getString('Device_TableHead_Port'), title: getString('Device_TableHead_Port'),