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

Extra checks in UI before deleting an account #10242

Open
wants to merge 1 commit into
base: 4.19
Choose a base branch
from

Conversation

abh1sar
Copy link
Collaborator

@abh1sar abh1sar commented Jan 22, 2025

Description

This PR fixes #9480

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 2025-01-23 at 12 53 05 AM

How Has This Been Tested?

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

@abh1sar
Copy link
Collaborator Author

abh1sar commented Jan 22, 2025

@weizhouapache @DaanHoogland had to create a new PR due to issues with rebase.

Copy link

codecov bot commented Jan 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 15.14%. Comparing base (d053bb9) to head (f762f20).
Report is 3 commits behind head on 4.19.

Additional details and impacted files
@@            Coverage Diff             @@
##               4.19   #10242    +/-   ##
==========================================
  Coverage     15.13%   15.14%            
  Complexity    11279    11279            
==========================================
  Files          5408     5409     +1     
  Lines        474007   473786   -221     
  Branches      57822    57813     -9     
==========================================
- Hits          71746    71741     -5     
+ Misses       394240   394025   -215     
+ Partials       8021     8020     -1     
Flag Coverage Δ
uitests 4.29% <ø> (-0.01%) ⬇️
unittests 15.86% <ø> (+<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.

@abh1sar
Copy link
Collaborator Author

abh1sar commented Jan 22, 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 22, 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

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

Copy link
Collaborator

@bernardodemarco bernardodemarco left a comment

Choose a reason for hiding this comment

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

Overall lgtm, manually tested it in a local environment. Here are some small suggestions.

<a-input
v-model:value="form.name"
:placeholder="$t('label.enter.account.name')"
style="width: auto"/>
Copy link
Collaborator

Choose a reason for hiding this comment

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

We could set the input width to 100%, in order to fill all available space:

Suggested change
style="width: auto"/>
style="width: 100%"/>

image

Comment on lines +95 to +107
api('deleteAccount', {
id: this.resource.id
}).then(response => {
this.$pollJob({
jobId: response.deleteaccountresponse.jobid,
title: this.$t('label.action.delete.account'),
description: this.resource.id,
successMessage: `${this.$t('message.delete.account.success')} - ${this.resource.name}`,
errorMessage: `${this.$t('message.delete.account.failed')} - ${this.resource.name}`,
loadingMessage: `${this.$t('message.delete.account.processing')} - ${this.resource.name}`,
catchMessage: this.$t('error.fetching.async.job.result')
})
this.closeModal()
Copy link
Collaborator

Choose a reason for hiding this comment

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

After deleting an account, the UI does not redirect the user to another page. As a consequence of that, the following errors are rendered on screen:

image

It would be interesting to redirect the user to the accounts section

@@ -225,11 +225,10 @@ export default {
message: 'message.delete.account',
dataView: true,
disabled: (record, store) => {
return record.id !== 'undefined' && store.userInfo.accountid === record.id
Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be interesting to find a way to indicate to the users that the delete button will only become enabled when the account is disabled.

One way of achieving this would be keep the DeleteAccount component always enabled. When accounts are not disabled, then the component could show a message explaining that the account needs first to be disabled in order to proceed with the deletion.

@DaanHoogland
Copy link
Contributor

as there seems to be confusing/disagreement on how to implement this I am moving it to 4.19.3 provisionally.

@DaanHoogland DaanHoogland modified the milestones: 4.19.2, 4.19.3 Jan 30, 2025
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.

Improve "Delete Account" pop-up verbiage
4 participants