All columns in host display should be sortable.
|Assigned to:||Ohad Levy||% Done:||
It's really useful to be able to sort by environment, OS and hardware model. This patch adds that capability.
|duplicates Foreman - Feature #375: Sort all elements in dashboard views.||Closed||09/08/2010|
Updated by Ohad Levy over 2 years ago
- Status changed from New to Feedback
Thanks for the patch, two comments:
- You might want to consider using git formatted patches, this will ensure that your name is associated with the commit (and list of contributors) :)
- AFAIK, sorting based on the environment_id (or any other id reference field) will sort based on the numeric value of the filed (i.e. environment_id = 1 ==> environment.id = 1) but not to its actual name, so you end up grouping the hosts, not so much sorting it based on its name.
I'm willing to accept the patch, as its better than nothing at the moment, but ideally, we should a better way to handle it (and probably the existing order implementation need to be refactored).
Updated by Brian Gallew over 2 years ago
I'm happy to submit git-formatted patches if there's a page on how to generate them. I've gotten tired of tracking down all the instructions for all the VC systems out there, so if I can't find a one-page write up for a given project on how patches should be submitted, then I just send standard diffs.
I'll look again at the sorting thing. When I first tested, it didn't seem to pay attention to the actual field contents for sorting when I didn't use the id. If it works as desired, I'll definitely submit a new patch. Thanks for looking at it so quickly!