Skip to content

Conversation

@yadvr
Copy link
Member

@yadvr yadvr commented Mar 28, 2019

Problem: Not able to configure a sort order for the zones that are listed in various views in the UI.

Root Cause: There is no mechanism to accept sort key for existing zones or UI widget, that would allow to listing zones in the UI in a certain order.

Solution: The order of zones in listed in various views in the UI can now be configured through the newly added “sort_key” field added for the zone. It can be set using updateZone API by providing “sort_key” parameter for a zone, or by reordering the items in the zones list in the UI. UI has been updated to show ordering controls in zones list view. Database changes include updating table “data_center” by adding “sort_key” column (containing integer values and defaults to zero).

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)

51236319-da9d2a80-1997-11e9-9c23-b8a4e5e27ccd

@borisstoyanov
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@borisstoyanov a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2660

Copy link
Contributor

@borisstoyanov borisstoyanov left a comment

Choose a reason for hiding this comment

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

LGTM, user now is able to sort zones

@borisstoyanov
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

@borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link

Trillian test result (tid-3477)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 29717 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr3242-t3477-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_certauthority_root.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
Smoke tests completed. 69 look OK, 1 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_provision_certificate Error 121.07 test_certauthority_root.py

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

clean implementation but somewhat based on not so clean legacy.

@Parameter(name = ApiConstants.LOCAL_STORAGE_ENABLED, type = CommandType.BOOLEAN, description = "true if local storage offering enabled, false otherwise")
private Boolean localStorageEnabled;

@Parameter(name = ApiConstants.SORT_KEY, type = CommandType.INTEGER, description = "sort key of the disk offering, integer")
Copy link
Contributor

@DaanHoogland DaanHoogland Apr 10, 2019

Choose a reason for hiding this comment

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

this is not the sortkey for the diskoffering, is it? (c&p?)

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes @DaanHoogland , I'll fix.

ConfigKey<Boolean> AllowUserViewDestroyedVM = new ConfigKey<>("Advanced", Boolean.class, "allow.user.view.destroyed.vm", "false",
"Determines whether users can view their destroyed or expunging vm ", true, ConfigKey.Scope.Account);

ConfigKey<Boolean> SortKeyAscending = new ConfigKey<>("Advanced", Boolean.class, "sortkey.algorithm", "true",
Copy link
Contributor

Choose a reason for hiding this comment

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

so true means that all lists for all users are sorted ascending? (if one of template, disk offering, service offering, network offering or zone)

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes @DaanHoogland . That's how global config seems to have been designed and used.

Copy link
Member Author

Choose a reason for hiding this comment

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

Can you rectify the description to reflect the general use-case of the config key @anuragaw ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Fixing @rhtyd

@yadvr
Copy link
Member Author

yadvr commented May 10, 2019

@anuragaw can you help fix the conflicts?

Anurag Awasthi and others added 3 commits May 30, 2019 14:44
This adds support to allow admins to sort zones, and based on the sorted
order the zones will be listed in UI and API.

Signed-off-by: Rohit Yadav <[email protected]>
Signed-off-by: Rohit Yadav <[email protected]>
@shwstppr shwstppr force-pushed the zones-ui-sorting branch from 08729ce to 360d642 Compare May 30, 2019 10:28
@yadvr
Copy link
Member Author

yadvr commented May 30, 2019

Thanks @shwstppr
@blueorangutan package

@blueorangutan
Copy link

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2814

Copy link
Contributor

@anuragaw anuragaw left a comment

Choose a reason for hiding this comment

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

@borisstoyanov has found a regression on most recent branch. Please hold off merging.

Anurag Awasthi and others added 2 commits June 6, 2019 15:22
This adds support to allow admins to sort zones, and based on the sorted
order the zones will be listed in UI and API.

Signed-off-by: Rohit Yadav <[email protected]>
Signed-off-by: Rohit Yadav <[email protected]>
Copy link
Contributor

@anuragaw anuragaw left a comment

Choose a reason for hiding this comment

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

Fixed the bug. @borisstoyanov - can we please test again?

@anuragaw
Copy link
Contributor

anuragaw commented Jun 6, 2019

@blueorangutan package

@blueorangutan
Copy link

@anuragaw a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@anuragaw anuragaw force-pushed the zones-ui-sorting branch from ab6f151 to 20f0ebe Compare June 6, 2019 10:53
@anuragaw
Copy link
Contributor

anuragaw commented Jun 6, 2019

@blueorangutan package

@blueorangutan
Copy link

@anuragaw a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2852

@blueorangutan
Copy link

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2853

@borisstoyanov
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

@borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

Copy link
Contributor

@borisstoyanov borisstoyanov left a comment

Choose a reason for hiding this comment

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

LGTM, attached test results
test_results.xlsx

@blueorangutan
Copy link

Trillian test result (tid-3663)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 33979 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr3242-t3663-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_direct_download.py
Intermittent failure detected: /marvin/tests/smoke/test_privategw_acl.py
Intermittent failure detected: /marvin/tests/smoke/test_templates.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
Smoke tests completed. 69 look OK, 2 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_02_upload_direct_download_certificates Failure 0.04 test_direct_download.py
test_04_rvpc_privategw_static_routes Failure 949.68 test_privategw_acl.py

@yadvr yadvr changed the title [WIP DO NOT MERGE] server: add support for sorting zones in UI/API server: add support for sorting zones in UI/API Jun 19, 2019
@yadvr
Copy link
Member Author

yadvr commented Jun 19, 2019

Lgtm @anuragaw

@yadvr yadvr merged commit 90cd8aa into apache:master Jun 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants