Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
barreljan opened this issue May 2, 2022 · 0 comments
Open

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

barreljan opened this issue May 2, 2022 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@barreljan
Copy link
Owner

barreljan commented May 2, 2022

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.

@barreljan barreljan added the enhancement New feature or request label May 2, 2022
@barreljan barreljan added this to the Version 3.1 milestone Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant