Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

UI Add comprehensive domain deletion confirmation dialog (Feature Request #11497) #12380

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

Open
Imvedansh wants to merge 2 commits into apache:4.20
base: 4.20
Choose a base branch
Loading
from Imvedansh:Domain-Ui-4.19

Conversation

@Imvedansh
Copy link
Contributor

@Imvedansh Imvedansh commented Jan 6, 2026

Implements a confirmation modal for domain deletion that shows detailed impact before proceeding, making it consistent with account deletion

Description

This PR implements a comprehensive domain deletion confirmation dialog, making the domain deletion process consistent with account deletion and providing better warnings to users about the impact of their actions.

Fixes #11497

New Component: DomainDeleteConfirm

  • Created a modal component that shows detailed impact before domain deletion
  • Displays a table with account-wise VM statistics:
    • Account name
    • Total VMs
    • Running VMs
    • Stopped VMs
  • Shows prominent warning about permanent deletion of accounts and VMs
  • Requires user to type the exact domain name to enable deletion
  • Fetches live data using listAccounts and listVirtualMachines APIs

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 from 2026年01月05日 22-34-21 Screenshot from 2026年01月05日 22-34-31

How Has This Been Tested?

  1. Navigate to Domains section
  2. Select a domain with multiple accounts and VMs
  3. Click "Delete Domain" action
  4. Verify modal shows:
    • Warning message about permanent deletion
    • Table with accurate account and VM counts
    • Confirmation input field
  5. Try clicking "Delete Domain" without typing name → button should be disabled
  6. Type incorrect domain name → button should remain disabled
  7. Type correct domain name → button should enable
  8. Click "Delete Domain" → domain should be deleted and UI should update

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

  • Domain with no accounts
  • Domain with accounts but no VMs
  • Domain with mix of running and stopped VMs
  • Deleting domain while viewing it (should navigate away)
  • Whitespace handling in domain name input

Copy link
Contributor Author

Copy link

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

Copy link

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

Copy link
Contributor Author

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

clgtm

Imvedansh reacted with rocket emoji
@DaanHoogland DaanHoogland changed the base branch from 4.19 to 4.20 January 6, 2026 15:10
Copy link
Contributor

@Imvedansh , I moved it to 4.20 as this is the oldest supported LTS.

Copy link
Contributor

Copy link

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

Copy link

codecov bot commented Jan 6, 2026
edited
Loading

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 16.23%. Comparing base (6a324da) to head (3562cd3).

Additional details and impacted files
@@ Coverage Diff @@
## 4.20 #12380 +/- ##
============================================
- Coverage 16.23% 16.23% -0.01% 
+ Complexity 13382 13380 -2 
============================================
 Files 5657 5658 +1 
 Lines 498999 499042 +43 
 Branches 60566 60574 +8 
============================================
- Hits 81035 81033 -2 
- Misses 408928 408973 +45 
 Partials 9036 9036 
Flag Coverage Δ
uitests 4.02% <ø> (-0.01%) ⬇️
unittests 17.09% <ø> (-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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

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

Copy link
Contributor Author

@DaanHoogland WDYT?

I was working on

@Imvedansh , I moved it to 4.20 as this is the oldest supported LTS.

Yeah , was thinking same.
I was thinking of 4.22 or for now 4.20 is fine?

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.

Need update for async deleteDomain (try deleting a domain which has an account)

confirmDeleteDomain () {
const params = { id: this.deleteDomainResource.id }
api('deleteDomain', params)
Copy link
Contributor

@shwstppr shwstppr Jan 7, 2026

Choose a reason for hiding this comment

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

@Imvedansh deleteDomain is an async API. You would mostly always get a 200 response as it would return the jobid. So you'll have to poll that job ID instead showing success immediately

Imvedansh reacted with rocket emoji
Copy link
Contributor Author

@Imvedansh Imvedansh Jan 7, 2026

Choose a reason for hiding this comment

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

Ahh, alrightyy.
I ll shoot changes shortly

Copy link
Contributor Author

@Imvedansh Imvedansh Jan 13, 2026

Choose a reason for hiding this comment

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

Thanks for the clarification @shwstppr
I’ve updated the UI to treat deleteDomain as an async API by polling the returned jobId using the existing $pollJob helper, consistent with other async actions in the UI.
Success and failure are now shown only after the async job completes.
WDYS?

@abh1sar abh1sar added this to the 4.20.3 milestone Jan 7, 2026
Implements a confirmation modal for domain deletion that shows detailed
impact before proceeding, making it consistent with account deletion
Copy link
Contributor

Copy link

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

Copy link

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

Copy link
Contributor

looks nice but one issue:
Screenshot 2026年01月13日 at 20 15 15
I think you mean to delete users with the domain, don’t you?

deleting an empty domain works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@DaanHoogland DaanHoogland Awaiting requested review from DaanHoogland

@shwstppr shwstppr Awaiting requested review from shwstppr

Assignees

No one assigned

Projects

None yet

Milestone

4.20.3

Development

Successfully merging this pull request may close these issues.

UI: Make Domain Deletion Consistent with Account Deletion

AltStyle によって変換されたページ (->オリジナル) /