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

ui: extend role isPublic parameter #7973

Merged
merged 1 commit into from Nov 2, 2023

Conversation

hsato03
Copy link
Collaborator

@hsato03 hsato03 commented Sep 18, 2023

Description

The concept of public roles was introduced in the PR #6960, however this resource was not extended to the UI. Thus, a field was added in the role creation, update and import form that allows you to choose whether the role is public or not.

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)

Feature/Enhancement Scale or Bug Severity

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

I created, imported and updated some roles, then I checked the result of these operations in the database.

Test isPublic Expected result
1 Create a role with isPublic field checked True Y
2 Create a role with isPublic field unchecked False Y
3 Update a role with isPublic field checked True Y
4 Update a role with isPublic field unchecked False Y
5 Import a role with isPublic field checked True Y
6 Import a role with isPublic field unchecked False Y

@DaanHoogland
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@DaanHoogland a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@codecov
Copy link

codecov bot commented Sep 19, 2023

Codecov Report

Merging #7973 (29d187a) into main (78411fd) will increase coverage by 15.12%.
Report is 65 commits behind head on main.
The diff coverage is 50.00%.

@@              Coverage Diff              @@
##               main    #7973       +/-   ##
=============================================
+ Coverage     14.40%   29.53%   +15.12%     
- Complexity    10109    30855    +20746     
=============================================
  Files          2748     5100     +2352     
  Lines        259390   368364   +108974     
  Branches      40381    56703    +16322     
=============================================
+ Hits          37354   108780    +71426     
- Misses       217203   244716    +27513     
- Partials       4833    14868    +10035     
Flag Coverage Δ
simulator-marvin-tests 25.74% <100.00%> (?)
uitests 5.66% <0.00%> (?)
unit-tests 14.40% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...loudstack/api/command/admin/acl/CreateRoleCmd.java 65.51% <100.00%> (ø)
ui/src/config/section/role.js 0.00% <ø> (ø)
ui/src/views/iam/CreateRole.vue 0.00% <ø> (ø)
ui/src/views/iam/ImportRole.vue 0.00% <0.00%> (ø)

... and 3579 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 7056

@DaanHoogland
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

[SF] Trillian test result (tid-7687)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 43247 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7973-t7687-kvm-centos7.zip
Smoke tests completed. 112 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_02_upgrade_kubernetes_cluster Failure 530.30 test_kubernetes_clusters.py
test_08_upgrade_kubernetes_ha_cluster Failure 612.57 test_kubernetes_clusters.py

@DaanHoogland
Copy link
Contributor

@blueorangutan ui

@blueorangutan
Copy link

@DaanHoogland a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@blueorangutan
Copy link

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/7973 (QA-JID-182)

@hsato03
Copy link
Collaborator Author

hsato03 commented Sep 28, 2023

Hi guys, any updates?

@DaanHoogland
Copy link
Contributor

@hsato03 sorry meant to test this but got stranded in other stuff. Am I not supposed to see an extra field when creating a role?

image

or updating:

image

@DaanHoogland DaanHoogland added this to the 4.19.1.0 milestone Sep 29, 2023
@hsato03
Copy link
Collaborator Author

hsato03 commented Oct 2, 2023

@DaanHoogland could you check if this is a cache problem? I tested on 4.19.0.0-SNAPSHOT and the editing role form looks like this:

editing role form

@DaanHoogland
Copy link
Contributor

DaanHoogland commented Oct 3, 2023

@DaanHoogland could you check if this is a cache problem? I tested on 4.19.0.0-SNAPSHOT and the editing role form

I'll try again in a pornĤĤĤrivate window

@DaanHoogland
Copy link
Contributor

didn´t use a porn window but tested it in anew lab env and it works; created a privated role and editted it to be public.

Copy link
Contributor

@shwstppr shwstppr left a comment

Choose a reason for hiding this comment

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

Code LGTM

@shwstppr
Copy link
Contributor

@blueorangutan ui

@shwstppr shwstppr modified the milestones: 4.19.1.0, 4.19.0.0 Oct 19, 2023
@blueorangutan
Copy link

@shwstppr a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@shwstppr
Copy link
Contributor

@blueorangutan ui

@blueorangutan
Copy link

@shwstppr a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@blueorangutan
Copy link

UI build failed: ✖️
(SL-JID-214)

@DaanHoogland
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 7587

@DaanHoogland
Copy link
Contributor

@blueorangutan test keepEnv

@blueorangutan
Copy link

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

Copy link
Member

@vishesh92 vishesh92 left a comment

Choose a reason for hiding this comment

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

CLGTM. create role works fine. didn't test import role.

@@ -23,7 +23,7 @@ export default {
docHelp: 'adminguide/accounts.html#roles',
permission: ['listRoles', 'listRolePermissions'],
columns: ['name', 'type', 'description'],
Copy link
Member

Choose a reason for hiding this comment

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

IMO, it will be good to have ispublic in colums.

@blueorangutan
Copy link

[SF] Trillian test result (tid-8197)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 41359 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7973-t8197-kvm-centos7.zip
Smoke tests completed. 115 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

@DaanHoogland
Copy link
Contributor

tests all good, merging

@DaanHoogland DaanHoogland merged commit 9c4d18f into apache:main Nov 2, 2023
44 of 48 checks passed
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.

None yet

5 participants