Skip to content

Hide UserData field from the EditVM view for VMs that do not offer it#9731

Merged
JoaoJandre merged 2 commits intoapache:4.19from
scclouds:remove-userdata-field-if-vm-does-not-offer
Oct 1, 2024
Merged

Hide UserData field from the EditVM view for VMs that do not offer it#9731
JoaoJandre merged 2 commits intoapache:4.19from
scclouds:remove-userdata-field-if-vm-does-not-offer

Conversation

@FelipeM525
Copy link
Copy Markdown
Contributor

Description

Currently in ACS, when editing a VM, the field userdata will be present even if the VM's network does not support the feature. This PR fixes this issue by not showing the field if the VM does not offer userdata.

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

How Has This Been Tested?

I tested this by verifying if the userdata field would still show up in the Edit VM View when editing VMs whose networks did not offer userdata, and it worked as expected. I've also tested cases in which a VM could have more than one network, and for these cases it will consider the default network and disregard the other networks.

…serdata if the vm's network does not offer the feature
@codecov
Copy link
Copy Markdown

codecov bot commented Sep 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 15.08%. Comparing base (9df783c) to head (cda4901).
Report is 10 commits behind head on 4.19.

Additional details and impacted files
@@             Coverage Diff              @@
##               4.19    #9731      +/-   ##
============================================
- Coverage     15.11%   15.08%   -0.03%     
  Complexity    11184    11184              
============================================
  Files          5402     5402              
  Lines        473120   473147      +27     
  Branches      58327    59210     +883     
============================================
- Hits          71507    71370     -137     
- Misses       393812   393838      +26     
- Partials       7801     7939     +138     
Flag Coverage Δ
uitests 4.29% <ø> (-0.47%) ⬇️
unittests 15.80% <ø> (-0.01%) ⬇️

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.

@kiranchavala
Copy link
Copy Markdown
Member

@blueorangutan ui

@blueorangutan
Copy link
Copy Markdown

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

@blueorangutan
Copy link
Copy Markdown

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

Copy link
Copy Markdown
Member

@kiranchavala kiranchavala left a comment

Choose a reason for hiding this comment

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

LGTM

Before fix

The edit vm action had the userdata text box even if the network offering didn't support userdata

Screenshot 2024-09-26 at 11 34 49 AM

--
After fix

There is no userdata box when user clicks on edit vm if the network offering didn't support userdata

Screenshot 2024-09-26 at 11 34 17 AM

@DaanHoogland DaanHoogland added this to the 4.19.2.0 milestone Sep 27, 2024
@DaanHoogland
Copy link
Copy Markdown
Contributor

@blueorangutan ui

@blueorangutan
Copy link
Copy Markdown

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

@blueorangutan
Copy link
Copy Markdown

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

Copy link
Copy Markdown
Contributor

@JoaoJandre JoaoJandre left a comment

Choose a reason for hiding this comment

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

LGTM

@JoaoJandre
Copy link
Copy Markdown
Contributor

Merging based on approvals and manual test by @kiranchavala (#9731 (review))

@JoaoJandre JoaoJandre merged commit 28f425a into apache:4.19 Oct 1, 2024
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Oct 14, 2024
…apache#9731)

* added a v-if directive within the EditVm view to not show the field userdata if the vm's network does not offer the feature

* added the parameter listall:true to the requests made to listNetworks and listVirtualMachines
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.

6 participants