mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-11 20:51:41 -07:00
Merge pull request #1608 from netalertx/next_release
Some checks are pending
Some checks are pending
PLG: Enhance IP sorting in device table for correct numeric order #1606
This commit is contained in:
@@ -156,7 +156,15 @@ function loadDeviceTable({ sql, containerSelector, tableId, wrapperHtml = null,
|
||||
{
|
||||
title: getString('Network_Table_IP'),
|
||||
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'),
|
||||
|
||||
Reference in New Issue
Block a user