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 port by interface name while list ports. #15093

Merged
merged 4 commits into from Jun 24, 2023

Conversation

edgesite
Copy link
Contributor

Sort port by interface name while list ports, which is beneficiary for who have many ports.

Screenshots

Before

image

After

telegram-cloud-photo-size-5-6062119663271264589-y

Please note

Please read this information carefully. You can run ./lnms dev:check to check your code before submitting.

  • Have you followed our code guidelines?
  • If my Pull Request does some changes/fixes/enhancements in the WebUI, I have inserted a screenshot of it.
  • If my Pull Request makes discovery/polling/yaml changes, I have added/updated test data.

Testers

If you would like to test this pull request then please run: ./scripts/github-apply <pr_id>, i.e ./scripts/github-apply 5926
After you are done testing, you can remove the changes with ./scripts/github-remove. If there are schema changes, you can ask on discord how to revert.

@CLAassistant
Copy link

CLAassistant commented Jun 10, 2023

CLA assistant check
All committers have signed the CLA.

$interface = cleanPort($interface);
$interface_map[$interface['label']] = $interface;
}
$interface_names = array_keys($interface_map);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any point in doing array_keys and sort instead of just ksort?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, changed

@Jellyfrog Jellyfrog merged commit 2e2d1bb into librenms:master Jun 24, 2023
8 checks passed
@murrant murrant added the WebUI label Jul 17, 2023
@librenms-bot
Copy link

This pull request has been mentioned on LibreNMS Community. There might be relevant details there:

https://community.librenms.org/t/23-7-0-changelog/21841/1

TheMysteriousX pushed a commit to TheMysteriousX/librenms that referenced this pull request Aug 9, 2023
* Sort port by interface name while list ports.

* Remove sql sort

* use ksort instead of sort manually

* Update ajax_listports.php

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants