flavor sort broken with new launch instance

Bug #1568642 reported by Eric Peterson
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
In Progress
Medium
Unassigned

Bug Description

Docs state this is a feature for customization:

https://github.com/openstack/horizon/blob/master/doc/source/topics/settings.rst#create_instance_flavor_sort

It looks like new launch instance has removed the usage of this sort function? Perhaps this would be easy to add back in?

Tags: angularjs
Revision history for this message
Eric Peterson (ericpeterson-l) wrote :

A possible workaround is to add a filter to the django request/response cycle and filter the data on the way back out. This approach would work for most any / every rest item. If there is another approach for getting data sorted, please let me know.

Matt Borland (palecrow)
Changed in horizon:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Matt Borland (palecrow) wrote :

Confirmed that this setting does not affect the default sorting for the Flavors in the Angular launch-instance feature.

There are several parts to this:
1) It's a regression with regard to the sorting by key
2) Supplying a custom function *cannot* be supported in Angular (All client-side)

This is not Critical as there is a simple way to sort by whatever column the user wishes, by clicking on the desired column header.

The community should decide whether or not this is a valuable setting going forward, because other tables, for example Source and Networks, do not have a similar setting. In other words, this setting seems to address one specific use case.

Revision history for this message
Eric Peterson (ericpeterson-l) wrote :

I've tried sorting the data on the server side, before it goes out to the client. The client still has it's own default sorting method, which is not how it was sorted on the ajax side. So this approach seems like a dead end at the moment.

I think this was added because flavors and images are things that take a long time to completely deprecate / eliminate for deployments, and deployments would like to push users into using one set of images / flavors vs have them see old ones. For example, we don't want users deploying with ubuntu 12.04 if 16.04 is out.... etc.

Revision history for this message
Travis Tripp (travis-tripp) wrote :

For Reference: http://pasteboard.co/8p6Tzuh.png

Okay, I see a few things here.

1) It would be nice to provide sorting to users and the legacy launch instance didn't have anything but a drop down with no sorting. I see a couple of solutions here that are NOT mutually exclusive and in my mind deprecate the stated purpose in the docs for this setting.

A) We could also very easily change / add to the available columns in the table which would provide the user the ability to sort on disk and ram.

B) When search is enabled, we could show the searchlight table locked to images. This would then provide really powerful filtering.

http://pasteboard.co/8pn5Obw.png

2) The note that Eric made above about deployers wanting to do some sort of server side deprecation of images and showing them last in the list seems almost more like it should just add a "deprecated" or "support status" property onto the images. IMO, this actually should just be a piece of metadata added on image properties themselves. Horizon could claim support for a particular one and we could even add a Horizon metadefs namespace to the Glance Metadata definition catalog so it would show up in the update metadata widget on horizon. We could then put it as a column (hidden?) and add a default sort to it. Doing this would also make it visible in the API, CLI, and in Searchlight.

Matt Borland (palecrow)
tags: added: angularjs
Changed in horizon:
assignee: nobody → Rob Cresswell (robcresswell)
Changed in horizon:
milestone: none → newton-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/326513

Changed in horizon:
status: Confirmed → In Progress
Changed in horizon:
milestone: newton-2 → newton-3
Changed in horizon:
milestone: newton-3 → newton-rc1
Changed in horizon:
milestone: newton-rc1 → next
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by Rob Cresswell (<email address hidden>) on branch: master
Review: https://review.openstack.org/326513

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.