Skip to content

UI improvements - #9773

Merged
yadvr merged 62 commits into
apache:4.20from
abh1sar:ui-improv
Feb 6, 2025
Merged

yadvr merged 62 commits into
apache:4.20from
abh1sar:ui-improv

Conversation

@abh1sar

@abh1sar abh1sar commented Oct 6, 2024 •

Copy link
Copy Markdown
Contributor

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?

@codecov

ghost commented Oct 6, 2024 •

Copy link
Copy Markdown

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

ghost commented Oct 6, 2024

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan

ghost commented Oct 6, 2024

Copy link
Copy Markdown

@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

ghost commented Oct 6, 2024

Copy link
Copy Markdown

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

@abh1sar

ghost commented Oct 7, 2024

Copy link
Copy Markdown
Contributor Author

@blueorangutan ui

@blueorangutan

ghost commented Oct 7, 2024

Copy link
Copy Markdown

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

@blueorangutan

ghost commented Oct 7, 2024

Copy link
Copy Markdown

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

@DaanHoogland

ghost commented Oct 7, 2024

Copy link
Copy Markdown
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

ghost commented Oct 8, 2024 •

Copy link
Copy Markdown
Contributor Author

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

ghost left a comment

Copy link
Copy Markdown
Contributor

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') ||

ghost Oct 10, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why destroyed state?

ghost Oct 10, 2024

Copy link
Copy Markdown
Contributor 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) ||

ghost Oct 10, 2024

Copy link
Copy Markdown
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 ?

ghost Oct 10, 2024

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Same as above

ghost Oct 10, 2024

Copy link
Copy Markdown
Contributor 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)) ||

ghost Oct 10, 2024

Copy link
Copy Markdown
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

ghost Oct 10, 2024

Copy link
Copy Markdown
Contributor 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

ghost commented Oct 10, 2024

Copy link
Copy Markdown

[SF] Trillian Build Failed (tid-11647)

ghost left a comment •

Copy link
Copy Markdown
Contributor

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.

@blueorangutan

ghost commented Jan 13, 2025

Copy link
Copy Markdown

@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

ghost commented Jan 13, 2025

Copy link
Copy Markdown

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

@blueorangutan

ghost commented Jan 13, 2025

Copy link
Copy Markdown

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

@abh1sar

ghost commented Jan 14, 2025

Copy link
Copy Markdown
Contributor Author

@blueorangutan test

@blueorangutan

ghost commented Jan 14, 2025

Copy link
Copy Markdown

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

@blueorangutan

ghost commented Jan 15, 2025

Copy link
Copy Markdown

[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

ghost commented Jan 24, 2025

Copy link
Copy Markdown
Contributor Author

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

@yadvr yadvr closed this Feb 5, 2025
@yadvr yadvr reopened this Feb 5, 2025

ghost left a comment

Copy link
Copy Markdown
Contributor

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

ghost commented Feb 5, 2025

Copy link
Copy Markdown
Contributor

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

@yadvr

ghost commented Feb 5, 2025

Copy link
Copy Markdown
Member

@blueorangutan package

@blueorangutan

ghost commented Feb 5, 2025

Copy link
Copy Markdown

@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

ghost commented Feb 5, 2025

Copy link
Copy Markdown

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

@yadvr
yadvr merged commit c5afee2 into apache:4.20 Feb 6, 2025
@abh1sar
abh1sar deleted the ui-improv branch February 7, 2025 04:22
@Pearl1594 Pearl1594 moved this to Done in ACS 4.20.1 Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

10 participants