Skip to content

Conversation

@Imvedansh
Copy link
Contributor

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

Implements a confirmation modal for domain deletion that shows detailed
impact before proceeding, making it consistent with account deletion
@Imvedansh
Copy link
Contributor Author

@blueorangutan ui

@blueorangutan
Copy link

@Imvedansh 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/12380 (QA-JID-838)

@Imvedansh
Copy link
Contributor Author

@DaanHoogland WDYT?

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

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

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

@DaanHoogland
Copy link
Contributor

@blueorangutan ui

@blueorangutan
Copy link

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

@codecov
Copy link

codecov bot commented Jan 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 15.17%. Comparing base (a208db5) to head (6e9eb22).
⚠️ Report is 683 commits behind head on 4.20.

Additional details and impacted files
@@             Coverage Diff              @@
##              4.20   #12380       +/-   ##
============================================
+ Coverage     4.28%   15.17%   +10.88%     
- Complexity       0    11366    +11366     
============================================
  Files          372     5416     +5044     
  Lines        29745   476130   +446385     
  Branches      5229    58139    +52910     
============================================
+ Hits          1275    72243    +70968     
- Misses       28324   395796   +367472     
- Partials       146     8091     +7945     
Flag Coverage Δ
uitests 4.28% <ø> (-0.01%) ⬇️
unittests 15.89% <ø> (?)

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.

@blueorangutan
Copy link

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

@Imvedansh
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?

@Imvedansh Imvedansh requested a review from DaanHoogland January 6, 2026 15:58
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

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

Copy link
Contributor Author

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

@abh1sar abh1sar added this to the 4.20.3 milestone Jan 7, 2026
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.

5 participants