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 shares by name in UI #973

merged 2 commits into from May 1, 2016


None yet
2 participants
Copy link

maxhq commented Oct 21, 2015

The share list in Storage - Shares or in the dropdown on Storage - Samba is now sorted by name per default - IMHO this gives a nicer overview. This is done by making the API (class ShareListView) accept any object attribute in URL parameter sortby.

To discuss:
If sorting is not considered a relevant overhead even for a large number of shares, we could set a default server-side sorting by attribute name. Currently, if sortby URL parameter is NOT given, no sorting takes place.

maxhq added some commits Oct 21, 2015

ShareListView API now accepts any sort parameter
URL parameter "sortby" could only be set to "usage", now it can be set to any
attribute of the Share object. Also the "reverse" parameter is used.

To prevent unneccessary processing, no sorting is done if parameter is not set. 

The following query is now possible:
ShareCollection requests sorted shares (by name)
The Javascript model makes use of the modified API and requests the share list
to be sorted by name.

This gives nicely sorted shares everywhere in the UI.

This comment has been minimized.

Copy link
Contributor Author

maxhq commented Jan 22, 2016

By the way, the idea of the sortby parameter was that it could be used later for other reporting, e.g. on a page that shows the biggest shares etc.


This comment has been minimized.

Copy link

schakrava commented May 1, 2016

@maxhq My apologies for taking a long time to merge this. For some reason, I mistakenly assumed you had closed this pr.

Thanks for your contribution!

@schakrava schakrava merged commit 768f9f4 into rockstor:master May 1, 2016

@schakrava schakrava added this to the Kilauea Iki milestone Jun 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.