Skip to content

Sort devices on name, not on IP-address #35

@barreljan

Description

@barreljan

Sort devices on name, not on IP-address. The select box is a 'sorted-on-ip' list. Make it possible to sort on name. This makes it hard to do as the $iplist is in the for-loop. So maybe an array in between?

Q&D

$devices = array();
forearch ($iplist as $ip) {
    if (isset($hostname[$ip])) {
        $hn = $hostname[$ip];
        $devices[$hn] = $ip;
    }
}
sort($devices);

Then on line 737 in index.php, adjust the for-loop from '$iplist as $ip' to '$devices as $dev' and modify the remainders in the loop.

However, this does work properly with the unnamed hosts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions