Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

UI improvements #9773

Merged
merged 62 commits into from
Feb 6, 2025
Merged

UI improvements #9773

merged 62 commits into from
Feb 6, 2025

Conversation

abh1sar
Copy link
Collaborator

@abh1sar abh1sar commented Oct 6, 2024

Description

This PR does multiple UI improvements

  1. Autofill vCenter host, datacenter and credentials while adding cluster using the zone wide value from vmware_data_center table
  2. Show Usage settings as a different pane in global settings
  3. Option to attach the volume to an instance during volume create.
  4. Show mgmt server's service ip in the details tab of Infrastructure -> Management server.
  5. Don't display create volume snapshot button in the Instance tab for KVM, if the instance is running and "kvm.snapshot.enabled" is false. (Also contains some code cleanup in storage.js)
  6. The name Recurring snapshots is used everywhere except for one place where 'Scheduled' snapshots is used in the Recurring Snapshots form. Change it to Recurring Snapshots.
  7. Reorder the Hypervisor list shown everywhere in order of popularity.

Items 1,3,4,5,6 are UI only changes, and can be tested with just the UI.

Doc PR : apache/cloudstack-documentation#448

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)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

Screenshot 2024-10-06 at 7 47 11 AM Screenshot 2024-10-06 at 7 47 25 AM Screenshot 2024-10-04 at 3 01 02 AM Screenshot 2024-10-04 at 3 00 38 AM Screenshot 2024-10-04 at 4 13 23 AM

How Has This Been Tested?

How did you try to break this feature and the system with this change?

Copy link

codecov bot commented Oct 6, 2024

Codecov Report

Attention: Patch coverage is 8.33333% with 11 lines in your changes missing coverage. Please review.

Project coverage is 16.00%. Comparing base (7e295ec) to head (c59c122).
Report is 39 commits behind head on 4.20.

Files with missing lines Patch % Lines
...udstack/api/response/ManagementServerResponse.java 0.00% 4 Missing ⚠️
...a/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java 0.00% 4 Missing ⚠️
...com/cloud/network/vpn/Site2SiteVpnManagerImpl.java 0.00% 2 Missing ⚠️
...ain/java/com/cloud/api/query/QueryManagerImpl.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.20    #9773      +/-   ##
============================================
- Coverage     16.14%   16.00%   -0.15%     
- Complexity    12972    13065      +93     
============================================
  Files          5639     5644       +5     
  Lines        494299   494915     +616     
  Branches      59909    59960      +51     
============================================
- Hits          79789    79195     -594     
- Misses       405685   406883    +1198     
- Partials       8825     8837      +12     
Flag Coverage Δ
uitests 4.01% <ø> (-0.01%) ⬇️
unittests 16.84% <8.33%> (-0.15%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@abh1sar abh1sar marked this pull request as draft October 6, 2024 18:14
@abh1sar
Copy link
Collaborator Author

abh1sar commented Oct 6, 2024

@blueorangutan package

@blueorangutan
Copy link

@abh1sar 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]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 11289

@abh1sar
Copy link
Collaborator Author

abh1sar commented Oct 7, 2024

@blueorangutan ui

@blueorangutan
Copy link

@abh1sar 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/9773 (QA-JID-461)

@DaanHoogland
Copy link
Contributor

@abh1sar , given that there are DB changes as well, I don't think UI tests will be enought, do you?

@abh1sar abh1sar added this to the 4.20.1.0 milestone Oct 8, 2024
@abh1sar
Copy link
Collaborator Author

abh1sar commented Oct 8, 2024

@abh1sar , given that there are DB changes as well, I don't think UI tests will be enought, do you?

@DaanHoogland You are right.
These items contain db changes for which full testing will be required
2. Show Usage settings as a different pane in global settings
7. Reorder the Hypervisor list shown everywhere in order of popularity.

For the rest of the items, ui testing is enough.

P.S I have added db changes to schema-41900to42000 for now. Will move it to schema-42000-42010 once CloudStack version changes to 4.20.1. Will keep this PR in draft until then.

Copy link
Contributor

@Pearl1594 Pearl1594 left a comment

Choose a reason for hiding this comment

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

clgtm, just a few queries.

return ((['Running'].includes(record.state) && record.hypervisor !== 'LXC') ||
(['Stopped'].includes(record.state) && !['KVM', 'LXC'].includes(record.hypervisor)))
show: (record, store) => {
return (record.hypervisor !== 'KVM') ||
Copy link
Contributor

Choose a reason for hiding this comment

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

why destroyed state?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I tried to keep the UI conditions same as the service layer. Please see hostSupportsSnapsthotForVolume().

But I'm ok if we don't want to allow snapshot creation from UI for destroyed VMs.

record.hypervisor === 'KVM' && record.vmstate !== 'Running')
return record.state === 'Ready' &&
(record.hypervisor !== 'KVM' ||
['Stopped', 'Destroyed'].includes(record.vmstate) ||
Copy link
Contributor

Choose a reason for hiding this comment

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

same here, why destroyed state ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Same as above

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Before this change, the button would be shown for all states part from 'Running'.
Now it will only be shown for 'Stopped' or 'Destroyed' states

record.hypervisor === 'KVM' && record.vmstate !== 'Running')
return record.state === 'Ready' &&
(record.hypervisor !== 'KVM' ||
(['Stopped', 'Destroyed'].includes(record.vmstate)) ||
Copy link
Contributor

Choose a reason for hiding this comment

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

same doubt as above

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Same as above

@blueorangutan
Copy link

[SF] Trillian Build Failed (tid-11647)

Copy link

@rajujith rajujith left a comment

Choose a reason for hiding this comment

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

All the mentioned fixes works fine.

@abh1sar
Copy link
Collaborator Author

abh1sar commented Jan 13, 2025

@blueorangutan ui

@blueorangutan
Copy link

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

@abh1sar
Copy link
Collaborator Author

abh1sar commented Jan 13, 2025

@blueorangutan package

@blueorangutan
Copy link

@abh1sar 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

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

@blueorangutan
Copy link

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

@abh1sar
Copy link
Collaborator Author

abh1sar commented Jan 14, 2025

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

Test Result Time (s) Test File
test_11_isolated_network_with_dynamic_routed_mode Error 2.27 test_ipv4_routing.py
test_12_vpc_and_tier_with_dynamic_routed_mode Error 3.41 test_ipv4_routing.py
test_12_vpc_and_tier_with_dynamic_routed_mode Error 3.41 test_ipv4_routing.py
test_06_purge_expunged_vm_background_task Failure 394.68 test_purge_expunged_vms.py

@abh1sar
Copy link
Collaborator Author

abh1sar commented Jan 24, 2025

Test failures are not related to the change, which is mostly ui.

Copy link
Contributor

@andrijapanicsb andrijapanicsb left a comment

Choose a reason for hiding this comment

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

LGTM, based on 4-eyes review of the UI (Simulator)

@andrijapanicsb
Copy link
Contributor

(committed just the changed message/language that @abh1sar probably didn't see - hope that is OK)

@rohityadavcloud
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

@rohityadavcloud 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]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12344

@rohityadavcloud rohityadavcloud merged commit c5afee2 into apache:4.20 Feb 6, 2025
24 of 26 checks passed
@abh1sar abh1sar deleted the ui-improv branch February 7, 2025 04:22
shwstppr added a commit to shapeblue/cloudstack that referenced this pull request Mar 5, 2025
Failures seen in
apache#10006 (comment)
and others.

With apache#9773, the response of
listManagementServers API has been changed. serviceip has been renamed
to ipaddress. THis was causing not all MS getting restarted and purge
b/g task not being able to run. The code handling API response in the
test has been updated.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
shwstppr added a commit to shapeblue/cloudstack that referenced this pull request Mar 5, 2025
Failures seen in
apache#10006 (comment)
and others.

With apache#9773, the response of
listManagementServers API has been changed. serviceip has been renamed
to ipaddress. THis was causing not all MS getting restarted and purge
b/g task not being able to run. The code handling API response in the
test has been updated.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
shwstppr added a commit that referenced this pull request Mar 6, 2025
Failures seen in #10006 (comment) and others.

With #9773, the response of
listManagementServers API has been changed. serviceip has been renamed
to ipaddress. This was causing not all MS getting restarted and purge
b/g task not being able to run. The code handling API response in the
test has been updated.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants