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 list of templates, serviceOfferings, diskOfferings etc in the deploy VM wizard #3336

Open
wants to merge 1 commit into
base: 4.11
from

Conversation

Projects
None yet
5 participants
@smlshn
Copy link
Contributor

commented May 17, 2019

Description

Adds functionality to sort the data that is available on each in the deploy VM wizard's step by their suitable fields i.e

  • templates by name
  • serviceOfferings by cpuspeed
  • diskOfferings by disksize
  • affinityGroups by name
  • sshkeyPairs by name
  • network:
    • vpcs by name
    • networkOfferings by name

Fixes: #3050

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Screenshots (if appropriate):

  • sorted compute offerings

Screen Shot 2019-05-18 at 02 24 53

  • sorted disk offerings

Screen Shot 2019-05-18 at 02 24 58

  • sorted networks

Screen Shot 2019-05-18 at 02 25 09

How Has This Been Tested?

Run client
Instances > Add Instance
See previous non sorted data in the browser's console
After sort function run see sorted data in the browser's console
See sorted results in the deploy VM wizard as well

Sort list of templates, serviceOfferings, diskOfferings, affinityGrou…
…ps, sshkeyPairs, vpcs, networkOfferings in the deploy VM wizard
@ustcweizhou

This comment has been minimized.

Copy link
Contributor

commented May 18, 2019

LGTM

@anuragaw
Copy link
Contributor

left a comment

This overrides the order in which we set the "sort_key" param is used by backend to return a pre-configured list of entities. That is not desirable.

For templates we don't support sort_key on backend yet and hence we need to sort alphabetically for the time being.

CC/ @rhtyd , @rafaelweingartner , @borisstoyanov

@smlshn

This comment has been minimized.

Copy link
Contributor Author

commented May 26, 2019

This overrides the order in which we set the "sort_key" param is used by backend to return a pre-configured list of entities. That is not desirable.

For templates we don't support sort_key on backend yet and hence we need to sort alphabetically for the time being.

CC/ @rhtyd , @rafaelweingartner , @borisstoyanov

Actually I think that might be more efficient however in Templates view table there is a column that "Order". Order function does not work right now but if I add sort functionality which sort every result by name, than this might be misleading. One may think it is done in purpose.

Beside, the change is not only about sorting the templates in Create VM screen. diskOfferings, vmtemplates etc all need to be sorted as well.
Screen Shot 2019-05-26 at 22 00 30

@rhtyd rhtyd added this to the 4.13.0.0 milestone May 27, 2019

@rhtyd

This comment has been minimized.

Copy link
Member

commented May 27, 2019

Some resources have a sort order defined, it's not right to enforce general alphabetical order.

@rhtyd

This comment has been minimized.

Copy link
Member

commented May 27, 2019

@anuragaw can you advise which resources are sortable from backend (i..e have a sort order), for rest this PR can be used.

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.