You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "Imvedansh (via GitHub)" <gi...@apache.org> on 2026/01/06 14:13:01 UTC
[PR] UI Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Imvedansh opened a new pull request, #12380:
URL: https://github.com/apache/cloudstack/pull/12380
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)
- [X] 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):
<img width="1823" height="966" alt="Screenshot from 2026-01-05 22-34-21" src="https://github.com/user-attachments/assets/3d072882-2f17-4f51-bb24-46eb22434f16" />
<img width="1823" height="966" alt="Screenshot from 2026-01-05 22-34-31" src="https://github.com/user-attachments/assets/2927d43d-8565-47f4-aec0-00b15be4e8c0" />
### 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
<!-- see how your change affects other areas of the code, etc. -->
<!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3745250632
UI build: :heavy_check_mark:
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/12380 (QA-JID-845)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3715091983
## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/12380?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 4.28%. Comparing base ([`a208db5`](https://app.codecov.io/gh/apache/cloudstack/commit/a208db54ea84a8e3eda406990671c49efc90ef42?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`6e9eb22`](https://app.codecov.io/gh/apache/cloudstack/commit/6e9eb22d9e71cd84253a46311276e858f791062e?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 683 commits behind head on 4.20.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## 4.20 #12380 +/- ##
=========================================
- Coverage 4.28% 4.28% -0.01%
=========================================
Files 372 373 +1
Lines 29745 29786 +41
Branches 5229 5238 +9
=========================================
Hits 1275 1275
- Misses 28324 28365 +41
Partials 146 146
```
| [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/12380/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [uitests](https://app.codecov.io/gh/apache/cloudstack/pull/12380/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `4.28% <ø> (-0.01%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/cloudstack/pull/12380?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3816826054
> Working on the fixes.
thanks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "Imvedansh (via GitHub)" <gi...@apache.org>.
Imvedansh commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3715249186
> @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?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "Imvedansh (via GitHub)" <gi...@apache.org>.
Imvedansh commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3828383449
https://github.com/user-attachments/assets/f78834f2-841b-4069-8002-17ce0fd25e20
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "abh1sar (via GitHub)" <gi...@apache.org>.
abh1sar commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3788985649
@shwstppr Are all your concerns answered?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3789305054
@shwstppr , I think on entering the name you want a deep clean and being able to do a safe/shallow delete should be possible as well. I am not sure what the right ux element would be. A switch could be used as you suggest. (in short; my opinion is of no value)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "Imvedansh (via GitHub)" <gi...@apache.org>.
Imvedansh commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3714857994
@blueorangutan ui
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "Imvedansh (via GitHub)" <gi...@apache.org>.
Imvedansh commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3749091677
> Ok @Imvedansh , I do not care either way, but as https://cloudstack.staged.apache.org/api/apidocs-4.22/apis/deleteDomain.html states there is a `cleanup` option on the `deleteDomain` API and I kind of expected that to be used once I had ok’d the consequences. I am fine with merging like this even when this improvement can be done.
> Ok @Imvedansh , I do not care either way, but as https://cloudstack.staged.apache.org/api/apidocs-4.22/apis/deleteDomain.html states there is a `cleanup` option on the `deleteDomain` API and I kind of expected that to be used once I had ok’d the consequences. I am fine with merging like this even when this improvement can be done.
Gotcha,
I actually didn't used the state ,Let me try it
Thanks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "Imvedansh (via GitHub)" <gi...@apache.org>.
Imvedansh commented on code in PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#discussion_r2667856505
##########
ui/src/views/iam/DomainView.vue:
##########
@@ -319,6 +333,32 @@ export default {
closeAction () {
this.showAction = false
},
+ confirmDeleteDomain () {
+ const params = { id: this.deleteDomainResource.id }
+
+ api('deleteDomain', params)
Review Comment:
Ahh, alrightyy.
I ll shoot changes shortly
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "RosiKyu (via GitHub)" <gi...@apache.org>.
RosiKyu commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3837288633
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland merged PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3783936398
@Imvedansh a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3746014010
looks nice but one issue:
<img width="412" height="239" alt="Screenshot 2026-01-13 at 20 15 15" src="https://github.com/user-attachments/assets/2b859c73-c923-4a68-8f17-754657847951" />
I think you mean to delete users with the domain, don’t you?
deleting an empty domain works.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "Imvedansh (via GitHub)" <gi...@apache.org>.
Imvedansh commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3852859559
@RosiKyu @shwstppr Appreciate it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "Imvedansh (via GitHub)" <gi...@apache.org>.
Imvedansh commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3768599583
> Delete dialog needs cleanup options.
>
> @Imvedansh I don't think you need to check if all resources are actually cleaned up. That is an existing flag and you just need to make sure API is called with the correct value.
>
> cc @DaanHoogland
I remember after adding the flag cleanup true, i tried deleting the domain with running instance ,It took some time and after some, instance and account did got deleted but domain didn't ,didn't think much of it then and assumed this may need testing.
Let me try it again,maybe I made mistake somewhere.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "Imvedansh (via GitHub)" <gi...@apache.org>.
Imvedansh commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3816590331
> @Imvedansh , can you look at @RosiKyu ’s last test case?
Yeah,I was aware of expected behavior before hand,Working on the fixes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3714862526
@Imvedansh a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3828360860
UI build: :heavy_check_mark:
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/12380 (QA-JID-867)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "Imvedansh (via GitHub)" <gi...@apache.org>.
Imvedansh commented on code in PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#discussion_r2754843077
##########
ui/src/components/view/DomainDeleteConfirm.vue:
##########
@@ -0,0 +1,155 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+<template>
+ <a-modal
+ :visible="true"
+ :title="$t('label.action.delete.domain') + ': ' + domain.name"
+ :okText="$t('label.delete.domain')"
+ okType="danger"
+ :confirmLoading="loading"
+ :ok-button-props="{ disabled: !canDelete }"
+ @cancel="emitClose"
+ @ok="emitConfirm">
+
+ <a-alert
+ type="warning"
+ show-icon
+ style="margin-bottom: 16px">
+ <template #message>
+ <div v-html="$t('message.delete.domain.warning')"></div>
+ </template>
+ </a-alert>
+
+ <a-spin v-if="loading" />
+
+ <a-table
+ v-else
+ size="small"
+ :columns="columns"
+ :dataSource="accountVmSummary"
+ :pagination="false"
+ rowKey="account" />
+
+ <div style="margin-top: 16px">
+ <a-alert style="margin-bottom: 10px">
+ <template #message>
+ <div v-html="$t('message.delete.domain.confirm')"></div>
+ </template>
+ </a-alert>
+ <a-input
+ v-model:value="confirmText"
+ :placeholder="$t('label.enter.domain.name')" />
+ </div>
+
+ </a-modal>
+</template>
+
+<script>
+import { api } from '@/api'
+
+export default {
+ name: 'DomainDeleteConfirm',
Review Comment:
For this PR,I've kept the component domain-specific,
If a similar requirement comes up for other resources in future,I'd be cool to refactor it into reusable component and follow up with separate PR. WDYT?
Quite a catch
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "Imvedansh (via GitHub)" <gi...@apache.org>.
Imvedansh commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3828277203
@blueorangutan ui
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "RosiKyu (via GitHub)" <gi...@apache.org>.
RosiKyu commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3784475693
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "Imvedansh (via GitHub)" <gi...@apache.org>.
Imvedansh commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3816579705
> ## Testing Summary
> ### Overall Assessment **LGTM** (with minor observations)
> Great work on this PR, @Imvedansh! The domain deletion confirmation dialog is a significant UX improvement. The implementation is solid and handles the key scenarios well.
>
> ### Test Results
> Test Case Description Result
> TC1 Delete empty domain **PASS**
> TC2 Delete domain with account (no VMs) **PASS**
> TC3 Delete domain with mixed VM states **PASS**
> TC4 Cascading deletion (parent with children) **PASS**
> TC5 Mass delete (rapid succession) **PASS**
> TC6 Whitespace handling + navigation **PARTIAL**
> ### What Works Well
> 1. **Modal displays accurate information** - Account/VM breakdown is correct and helpful
> 2. **Input validation** - Exact domain name match required; child domain names correctly rejected
> 3. **Whitespace handling** - `.trim()` correctly handles leading/trailing spaces
> 4. **Async job handling** - `$pollJob` implementation works correctly
> 5. **Cascading deletion** - `cleanup=true` successfully removes child domains, accounts, VMs, and networks
> 6. **Mass deletion** - Multiple rapid deletions queue and complete without conflicts
> 7. **Dynamic UI updates** - Domain tree refreshes correctly after each deletion
>
> ### Observations & Suggestions
> #### 1. Navigation Issue (TC6)
> When deleting a domain **while viewing it**, the UI does not navigate away. The detail panel shows stale data for the deleted domain.
>
> * **Current behavior:** Domain tree updates, but detail panel shows deleted domain
> * **Expected behavior:** Should navigate to `/domain` after deletion
> * **Workaround:** Hard browser refresh (F5) fixes it
>
> The code exists but doesn't seem to execute:
>
> ```js
> if (this.$route.params.id === domain.id) {
> this.$router.push({ path: '/domain' })
> }
> ```
>
> #### 2. Warning Message Verbiage (Minor)
> Current text: _"All of these **must be removed** before the domain can be deleted."_
>
> Since `cleanup=true` is always passed, the resources **are removed automatically**. Consider updating to something like:
>
> > _"All associated accounts, users, VMs, and sub-domains **will be permanently deleted**. This action cannot be undone."_
>
> This better reflects the actual behavior and addresses the concern raised by @shwstppr about accidental deletion.
>
> ## Detailed Test Execution Report
> ### TC1: Delete Empty Domain
> **Objective:** Verify that an empty domain (no accounts, no VMs, no sub-domains) can be deleted using the new confirmation dialog.
>
> **Test Steps:**
>
> 1. Login to CloudStack UI as admin
> 2. Navigate to Domains section
> 3. Expand ROOT → TestDeleteParent → Click on TestChild3
> 4. Click Delete Domain action button (trash icon) & Observe the confirmation modal displays
> 5. Verify the Account/VM table shows "No Data"
> 6. Verify "Delete domain" button is disabled
> 7. Type `TestChild3` in the confirmation input field (try with whitespaces, etc)
> 8. Verify "Delete domain" button becomes enabled only on exact match (or exact match with whitespaces at the beginnin/end)
> 9. Click "Delete domain" button
> 10. Verify domain is removed from the tree
>
> **Expected Result:**
>
> * Modal displays with warning message and empty table
> * Delete button disabled until correct domain name is entered
> * Domain deletes successfully and is removed from UI
>
> **Actual Result:**
>
> * Modal displayed correctly with warning: "This domain may contain accounts, users, or sub-domains. All of these must be removed before the domain can be deleted. This action cannot be undone."
> * Table showed "No Data" (empty domain)
> * Delete button was disabled until domain name was typed
> * Domain deleted successfully and removed from tree dynamically
> * **Note:** No success notification displayed after deletion
>
> **Test Evidence:**
>
> * Pre-test: TestChild3 existed (ID: 8a64ede9-b598-4be3-b9b9-e6c01b548443)
> * Post-deletion verification:
>
> ```
> (admin) 🐱 > list domains listall=true
> {
> "count": 6,
> "domain": [
> { "name": "ROOT", ... },
> { "name": "Test_With_Subdomain", ... },
> { "name": "Test_Sub_1", ... },
> { "name": "TestDeleteParent", ... },
> { "name": "TestChild1", "vmtotal": 2, ... },
> { "name": "TestChild2", "vmtotal": 0, ... }
> ]
> }
> ```
>
> * TestChild3 no longer present - deletion confirmed
>
> **Status:** PASS
>
> * domain deletion modal
>
> <img alt="Screenshot from 2026-01-27 16-44-19" width="2000" height="1673" src="https://private-user-images.githubusercontent.com/201906357/541102936-935c5ddc-456a-4aba-9ae4-ed7ae6371a5f.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njk2ODAyODksIm5iZiI6MTc2OTY3OTk4OSwicGF0aCI6Ii8yMDE5MDYzNTcvNTQxMTAyOTM2LTkzNWM1ZGRjLTQ1NmEtNGFiYS05YWU0LWVkN2FlNjM3MWE1Zi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwMTI5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDEyOVQwOTQ2MjlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xMzVmZDZhZDJlMGRkZDMyNjY1YzU5ZTkzZTdlNDEwOTY5NWFhY2EzMTZhYzY3NDdhMmQzNjg0ZmRjZjFiZTgwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.eEmJWo4_M679W4L3G06RRyTTfmnfDA9ZP6yArCIpoTQ">
> * domain is deleted and dynamically removed from domains list (left side)
> [Screencast from 2026-01-27 16-44-44.webm](https://github.com/user-attachments/assets/f08e37f1-b08b-455b-8187-053110c2750f)
>
> ### TC2: Delete Domain with Account, No VMs + Input Validation
> **Objective:** Verify that a domain containing an account (but no VMs) displays correctly in the confirmation modal, validates input correctly, and deletes successfully with cleanup=true.
>
> **Test Steps:**
>
> 1. Navigate to Domains section
> 2. Click on TestChild2 (has testuser2 account, 0 VMs)
> 3. Click Delete Domain action button
> 4. Observe modal displays account in table with VM counts
> 5. Verify "Delete domain" button is disabled
> 6. Type incorrect name → verify button stays disabled
> 7. Type `TestChild2` → verify button becomes enabled
> 8. Click "Delete domain" button
> 9. Verify domain and account are deleted via CLI
>
> **Expected Result:**
>
> * Modal shows testuser2 account with 0/0/0 VM counts
> * Input validation prevents deletion until correct name entered
> * Domain and associated account deleted successfully (cleanup=true)
>
> **Actual Result:**
>
> * Modal displayed testuser2 account correctly: Total VMs=0, Running=0, Stopped=0
> * Delete button was disabled until correct domain name entered
> * Domain deleted successfully
> * Account testuser2 also deleted (cleanup=true worked)
> * Domain count reduced from 6 to 5
>
> <img alt="Screenshot from 2026-01-27 16-56-50" width="2000" height="1673" src="https://private-user-images.githubusercontent.com/201906357/541107531-88bd3f66-abdf-402b-9bf1-225199ba6804.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njk2ODAyODksIm5iZiI6MTc2OTY3OTk4OSwicGF0aCI6Ii8yMDE5MDYzNTcvNTQxMTA3NTMxLTg4YmQzZjY2LWFiZGYtNDAyYi05YmYxLTIyNTE5OWJhNjgwNC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwMTI5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDEyOVQwOTQ2MjlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hOWJjZTg3YWJhMDBhZjJlYmZhOGU5ZmJjODJkMzc5YzMyYWYwN2I1YTdiMWVjM2VmMjY0ZTY3NDQ0MGM3OTFiJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.VWrojmO6J_VZb0cZ-PBFm3BhrxX1s5JodAVstA6gDqk">
> Screencast.from.2026-01-27.16-58-53.webm
> * Post-deletion verification:
>
> ```
> (admin) 🐱 > list domains listall=true
> {
> "count": 5,
> "domain": [
> { "name": "ROOT", ... },
> { "name": "Test_With_Subdomain", ... },
> { "name": "Test_Sub_1", ... },
> { "name": "TestDeleteParent", "vmtotal": 2, ... },
> { "name": "TestChild1", "vmtotal": 2, ... }
> ]
> }
> ```
>
> * TestChild2 no longer present
>
> ```
> (admin) 🐱 > list accounts domainid=426023be-6fcd-4b20-ad27-b2b64ff79b30 listall=true
> 🙈 Error: (HTTP 431, error code 4350) Domain id=8 doesn't exist
> # Confirms domain and account were deleted
> ```
>
> **Status:** PASS
>
> ## TC3: Delete Domain with Mixed VM States (cleanup=true)
> **Objective:** Verify that a domain containing an account with running and stopped VMs displays correct counts in the modal and deletes successfully with cleanup=true (cascading deletion of VMs, networks, and account).
>
> **Test Steps:**
>
> 1. Navigate to Domains section
> 2. Click on TestChild1 (has testuser1 account with 2 VMs)
> 3. Click Delete Domain action button
> 4. Observe modal displays account with VM breakdown
> 5. Verify Running/Stopped VM counts are accurate
> 6. Type `TestChild1` in confirmation input
> 7. Click "Delete domain" button
> 8. Observe success notification
> 9. Verify domain, account, and VMs deleted via CLI
>
> **Expected Result:**
>
> * Modal shows testuser1 with Total=2, Running=1, Stopped=1
> * Domain, account, and all VMs deleted via cleanup=true
> * Success notification displayed
>
> **Actual Result:**
>
> * Modal correctly displayed: testuser1 | 2 | 1 | 1
> * Success notification appeared upon deletion
> * Domain TestChild1 deleted
> * Account testuser1 deleted
> * Both VMs (testvm1, testvm2) deleted
> * Network resources cleaned up
> * Domain count reduced from 5 to 4
> * VM count reduced from 3 to 1 (only admin's iso-test-vm remains)
> * domain with mixed VM states - displays correctly
>
> <img alt="image" width="2000" height="1673" src="https://private-user-images.githubusercontent.com/201906357/541108956-e1371a37-0195-4449-adeb-bf3646865729.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njk2ODAyODksIm5iZiI6MTc2OTY3OTk4OSwicGF0aCI6Ii8yMDE5MDYzNTcvNTQxMTA4OTU2LWUxMzcxYTM3LTAxOTUtNDQ0OS1hZGViLWJmMzY0Njg2NTcyOS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwMTI5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDEyOVQwOTQ2MjlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00YTg1YmI4MDZkZmI1OTA1NDU0YjJhM2JmMjM0Mjk1YWViYTYxOWQ1Mjk0OTVmZWRiMzM5MzQzODkzNGEwZTM4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.59loHNfoc8TZ7GeVmwo6z8CcahrD9yVuCQ4saE3eva0">
> * deletion
>
> Screencast.from.2026-01-27.16-58-53.webm
> * Post-deletion - Domains:
>
> ```
> (admin) 🐱 > list domains listall=true
> {
> "count": 4,
> "domain": [
> { "name": "ROOT", "vmtotal": 1, ... },
> { "name": "Test_With_Subdomain", ... },
> { "name": "Test_Sub_1", ... },
> { "name": "TestDeleteParent", "haschild": false, "vmtotal": 0, ... }
> ]
> }
> ```
>
> * TestChild1 deleted, TestDeleteParent now has no children
> * Post-deletion - VMs:
>
> ```
> (admin) 🐱 > list virtualmachines listall=true
> {
> "count": 1,
> "virtualmachine": [
> { "name": "iso-test-vm", "account": "admin", "domain": "ROOT", ... }
> ]
> }
> # testvm1 and testvm2 deleted - only admin's VM remains
> ```
>
> **Status:** PASS
>
> ## TC4: Delete Parent Domain with Children (Cascading Deletion)
> **Objective:** Verify that deleting a parent domain with child domains triggers cascading deletion of all sub-domains and their associated resources (accounts, users) using cleanup=true.
>
> **Test Steps:**
>
> 1. Create test hierarchy: TestDeleteParent → CascadeChild1 (with account), CascadeChild2 (empty)
> 2. Navigate to Domains section in UI
> 3. Click on TestDeleteParent
> 4. Click Delete Domain action button
> 5. Observe modal shows accounts from child domains
> 6. Try typing child domain name (e.g., "CascadeChild1") → verify button stays disabled
> 7. Type `TestDeleteParent` → verify button becomes enabled
> 8. Click "Delete domain" button
> 9. Verify all domains and accounts deleted via CLI
>
> **Expected Result:**
>
> * Modal displays accounts from entire hierarchy
> * Only exact parent domain name enables delete button
> * Parent and all children deleted with cleanup=true
> * All associated accounts deleted
>
> **Actual Result:**
>
> * Modal correctly displayed cascadeuser account (from child domain CascadeChild1)
> * Typing child domain name did NOT enable delete button (correct behavior)
> * Only typing exact name "TestDeleteParent" enabled the button
> * Cascading deletion successful:
>
> * TestDeleteParent deleted
> * CascadeChild1 deleted
> * CascadeChild2 deleted
> * cascadeuser account deleted
> * Domain count reduced from 6 to 3
>
> **Test Evidence:**
>
> * Pre-deletion structure (6 domains):
>
> <img alt="image" width="2000" height="1673" src="https://private-user-images.githubusercontent.com/201906357/541112882-41abeab8-be86-4937-b63b-42376607b5d9.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njk2ODAyODksIm5iZiI6MTc2OTY3OTk4OSwicGF0aCI6Ii8yMDE5MDYzNTcvNTQxMTEyODgyLTQxYWJlYWI4LWJlODYtNDkzNy1iNjNiLTQyMzc2NjA3YjVkOS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwMTI5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDEyOVQwOTQ2MjlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01MWIwYTYyNDhiNDMyNjk2ZTQyZjVhYTU2M2JiNjQ4ZjE4YmZlNWFjODY2NTQwM2IwOTllZjMyYTNmYzg2NmM5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.sn5-rO1fzBzmu1l6szeaspptX_ClyG52_J2YnHDP9X8">
> * Modal showed:
>
> <img alt="Screenshot from 2026-01-27 17-13-41" width="2000" height="1673" src="https://private-user-images.githubusercontent.com/201906357/541115211-5d374195-2472-4704-965e-53b0c9b3cd36.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njk2ODAyODksIm5iZiI6MTc2OTY3OTk4OSwicGF0aCI6Ii8yMDE5MDYzNTcvNTQxMTE1MjExLTVkMzc0MTk1LTI0NzItNDcwNC05NjVlLTUzYjBjOWIzY2QzNi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwMTI5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDEyOVQwOTQ2MjlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zNzMxOTJiNWQ1NGFkNjg5MjY1ZTRkZTc2MWE0NjQxNzEzZDc2ODllNTQ1YjExYjk5YThjNjdlOTJjZDdkNmVhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.EZh3sCG-9PtAkoi_uL5p6c_IWjdo7G3Dj5HJG7zRLpc">
> * Deletion
>
> Screencast.from.2026-01-27.17-14-06.webm
> * Post-deletion verification:
>
> ```
> (admin) 🐱 > list domains listall=true
> {
> "count": 3,
> "domain": [
> { "name": "ROOT", ... },
> { "name": "Test_With_Subdomain", ... },
> { "name": "Test_Sub_1", ... }
> ]
> }
> ```
>
> * TestDeleteParent, CascadeChild1, CascadeChild2 all deleted
>
> ```
> (admin) 🐱 > list accounts listall=true
> {
> "count": 3,
> "account": [
> { "name": "admin", ... },
> { "name": "baremetal-system-account", ... },
> { "name": "ACSUser", ... }
> ]
> }
> ```
>
> * cascadeuser account deleted - only system accounts remain
>
> **Status:** PASS
>
> **Additional Observation:** Input validation correctly rejects child domain names - only the exact parent domain name enables deletion. This prevents accidental deletion of wrong domain.
>
> ### TC5: Mass Delete - Multiple Domains in Rapid Succession
> **Objective:** Verify that multiple domains can be deleted in rapid succession without conflicts, errors, or UI issues. Tests async job handling when multiple deletions are triggered quickly.
>
> **Test Steps:**
>
> 1. Create 3 test domains: MassDelete1, MassDelete2, MassDelete3 under ROOT
> 2. Refresh UI to display all domains
> 3. Delete MassDelete1: Click → Delete action → type name → confirm
> 4. Immediately delete MassDelete2: Click → Delete action → type name → confirm
> 5. Immediately delete MassDelete3: Click → Delete action → type name → confirm
> 6. Observe UI behavior during rapid deletions
> 7. Verify all domains deleted via CLI
>
> **Expected Result:**
>
> * All 3 domains delete without errors
> * Async jobs queue and complete properly
> * UI updates dynamically after each deletion
> * No conflicts between concurrent delete operations
>
> **Actual Result:**
>
> * All 3 domains (MassDelete1, MassDelete2, MassDelete3) deleted successfully
> * No UI lag or delays observed
> * No error messages or conflicts
> * Domain tree updated dynamically after each deletion
> * Async jobs handled properly without interference
> * Domain count reduced from 6 to 3
> * Pre-deletion (6 domains):
>
> ```
> (admin) 🐱 > list domains listall=true
> {
> "count": 6,
> "domain": [
> { "name": "ROOT", ... },
> { "name": "Test_With_Subdomain", ... },
> { "name": "Test_Sub_1", ... },
> { "name": "MassDelete1", "id": "b77d9d7e-20ef-4d52-a1e0-0729a30e8829", ... },
> { "name": "MassDelete2", "id": "93b278bd-ea8a-41f4-a7a4-05a1688fa7e5", ... },
> { "name": "MassDelete3", "id": "9a6a17ad-993c-4ac7-bad2-f09909c97880", ... }
> ]
> }
> ```
>
> * Post-deletion (3 domains):
>
> ```
> (admin) 🐱 > list domains listall=true
> {
> "count": 3,
> "domain": [
> { "name": "ROOT", ... },
> { "name": "Test_With_Subdomain", ... },
> { "name": "Test_Sub_1", ... }
> ]
> }
> ```
>
> * All MassDelete domains successfully removed
>
> Screencast.from.2026-01-27.17-21-09.webm
> **Status:** PASS
>
> ### TC6: Whitespace Handling + Delete While Viewing Domain
> **Objective:** Verify that (1) domain name input correctly handles leading/trailing whitespace, and (2) UI navigates away when deleting a domain while viewing it.
>
> **Test Steps:**
>
> 1. Create WhitespaceTest domain under ROOT
> 2. Navigate to Domains section and click on WhitespaceTest
> 3. Click Delete Domain action button
> 4. Type ` WhitespaceTest ` (with leading and trailing spaces)
> 5. Observe if Delete button becomes enabled
> 6. Click "Delete domain" button
> 7. Observe if UI navigates away from deleted domain
> 8. Click UI Refresh button
> 9. Perform hard browser refresh (F5)
> 10. Verify domain deleted via CLI
>
> **Expected Result:**
>
> * Whitespace trimmed - button should enable despite extra spaces
> * After deletion, UI should navigate away to /domain (domains list)
> * Detail panel should not show stale data
>
> **Actual Result:**
>
> * Whitespace handling: PASS - Button enabled with spaces (trim() working correctly)
> * X Navigation after deletion: FAIL - UI did not navigate away
> * X Detail panel showed stale data for deleted domain
> * X UI Refresh button did not clear stale view
> * Hard browser refresh (F5) correctly navigated to ROOT
> * Domain tree correctly removed WhitespaceTest from list
> * Domain deletion successful (confirmed via CLI)
>
> **Test Evidence:**
>
> * Whitespace input accepted - button enabled with " WhitespaceTest "
> * Code correctly uses .trim() for comparison:
> * canDelete () { return this.confirmText.trim() === this.domain.name.trim() }
>
> -> After deletion:
>
> * Domain tree: WhitespaceTest removed
> * Detail panel: Still showing WhitespaceTest (stale)
> * URL: Still on deleted domain's route
> * UI Refresh: No effect
> * Hard refresh (F5): Navigates to ROOT
> * Post-deletion verification:
>
> ```
> (admin) 🐱 > list domains listall=true
> {
> "count": 3,
> "domain": [
> { "name": "ROOT", ... },
> { "name": "Test_With_Subdomain", ... },
> { "name": "Test_Sub_1", ... }
> ]
> }
> ```
>
> * WhitespaceTest successfully deleted but right panel **not refreshed even via Refresh button** (needs hard bewser refresh)
>
> Screencast.from.2026-01-27.17-29-27.webm
> **Status:** PARTIAL PASS (Whitespace: PASS, Navigation: FAIL - BUG)
I appreciate your efforts !!Thanks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "Imvedansh (via GitHub)" <gi...@apache.org>.
Imvedansh commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3789936741
> @abh1sar no. @Imvedansh I think there needs to be a switch element to toggle cleanup in the new form you added or are we considering the operator entering domain name as cleanup=true. Currently, we are simply passing cleanup=true on submit. (I ended up accidentally deleting a domain on QA env 🤦♂️ ) I'm not sure about this behaviour and it feels a bit confusing compared to the original UI. Others can share their opinion.
The expected behavior of this feature request is to allow deletion of a domain along with all associated accounts and sub-domains (including all resources). This PR implements that behavior.
--- This domain may contain accounts, users, or sub-domains. All of these must be removed before the domain can be deleted. This action cannot be undone.--- is the current verbiage for the form ,It should be more like All associated accounts WILL BE DELETED
and to prevent any catastrophic and unintended action ,added the requirement to enter the name of domain.
If a cleanup flag is added and not checked, the API would simply return an error, and it’s unclear if that would provide a good user experience.
Another approach I can think of is to disable the input container till the cleanup flag is true. with a little more clear warning above which states this will remove all the associated accounts,vm etc. I feel this could be good to have maybe in future not a must have for now.
Current solution make it very easy to see all the accounts and vm in single container of parent domain and extra check of entering the domain name their removes the scope of deleting the resources by mistake while keeping it simpler to do action.
WDYT?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "RosiKyu (via GitHub)" <gi...@apache.org>.
RosiKyu commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3805915611
## Testing Summary for PR #12380
**Environment:** CloudStack 4.20 (KVM) - Trillian test environment
**Tester:** @RosiKyu
**Date:** 2026-01-27
---
### Overall Assessment **LGTM** (with minor observations)
Great work on this PR, @Imvedansh! The domain deletion confirmation dialog is a significant UX improvement. The implementation is solid and handles the key scenarios well.
---
### Test Results
| Test Case | Description | Result |
|-----------|-------------|--------|
| TC1 | Delete empty domain | **PASS** |
| TC2 | Delete domain with account (no VMs) | **PASS** |
| TC3 | Delete domain with mixed VM states | **PASS** |
| TC4 | Cascading deletion (parent with children) | **PASS** |
| TC5 | Mass delete (rapid succession) | **PASS** |
| TC6 | Whitespace handling + navigation | **PARTIAL** |
---
### What Works Well
1. **Modal displays accurate information** - Account/VM breakdown is correct and helpful
2. **Input validation** - Exact domain name match required; child domain names correctly rejected
3. **Whitespace handling** - `.trim()` correctly handles leading/trailing spaces
4. **Async job handling** - `$pollJob` implementation works correctly
5. **Cascading deletion** - `cleanup=true` successfully removes child domains, accounts, VMs, and networks
6. **Mass deletion** - Multiple rapid deletions queue and complete without conflicts
7. **Dynamic UI updates** - Domain tree refreshes correctly after each deletion
---
### Observations & Suggestions
#### 1. Navigation Issue (TC6)
When deleting a domain **while viewing it**, the UI does not navigate away. The detail panel shows stale data for the deleted domain.
- **Current behavior:** Domain tree updates, but detail panel shows deleted domain
- **Expected behavior:** Should navigate to `/domain` after deletion
- **Workaround:** Hard browser refresh (F5) fixes it
The code exists but doesn't seem to execute:
```javascript
if (this.$route.params.id === domain.id) {
this.$router.push({ path: '/domain' })
}
```
This might be a route parameter format mismatch. Consider logging `this.$route.params.id` vs `domain.id` to debug.
#### 2. Warning Message Verbiage (Minor)
Current text: *"All of these **must be removed** before the domain can be deleted."*
Since `cleanup=true` is always passed, the resources **are removed automatically**. Consider updating to something like:
> *"All associated accounts, users, VMs, and sub-domains **will be permanently deleted**. This action cannot be undone."*
This better reflects the actual behavior and addresses the concern raised by @shwstppr about accidental deletion.
## Detailed Test Execution Report
### TC1: Delete Empty Domain
**Objective:**
Verify that an empty domain (no accounts, no VMs, no sub-domains) can be deleted using the new confirmation dialog.
**Test Steps:**
1. Login to CloudStack UI as admin
2. Navigate to Domains section
3. Expand ROOT → TestDeleteParent → Click on TestChild3
4. Click Delete Domain action button (trash icon) & Observe the confirmation modal displays
5. Verify the Account/VM table shows "No Data"
6. Verify "Delete domain" button is disabled
7. Type `TestChild3` in the confirmation input field (try with whitespaces, etc)
9. Verify "Delete domain" button becomes enabled only on exact match (or exact match with whitespaces at the beginnin/end)
10. Click "Delete domain" button
11. Verify domain is removed from the tree
**Expected Result:**
- Modal displays with warning message and empty table
- Delete button disabled until correct domain name is entered
- Domain deletes successfully and is removed from UI
**Actual Result:**
- Modal displayed correctly with warning: "This domain may contain accounts, users, or sub-domains. All of these must be removed before the domain can be deleted. This action cannot be undone."
- Table showed "No Data" (empty domain)
- Delete button was disabled until domain name was typed
- Domain deleted successfully and removed from tree dynamically
- **Note:** No success notification displayed after deletion
**Test Evidence:**
```
# Pre-test: TestChild3 existed (ID: 8a64ede9-b598-4be3-b9b9-e6c01b548443)
# Post-deletion verification:
(admin) 🐱 > list domains listall=true
{
"count": 6,
"domain": [
{ "name": "ROOT", ... },
{ "name": "Test_With_Subdomain", ... },
{ "name": "Test_Sub_1", ... },
{ "name": "TestDeleteParent", ... },
{ "name": "TestChild1", "vmtotal": 2, ... },
{ "name": "TestChild2", "vmtotal": 0, ... }
]
}
# TestChild3 no longer present - deletion confirmed
```
**Status:** PASS (with observation: missing success notification)
- domain deletion modal
<img width="3055" height="1673" alt="Screenshot from 2026-01-27 16-44-19" src="https://github.com/user-attachments/assets/935c5ddc-456a-4aba-9ae4-ed7ae6371a5f" />
- domain is deleted and dynamically removed from domains list (left side)
[Screencast from 2026-01-27 16-44-44.webm](https://github.com/user-attachments/assets/f08e37f1-b08b-455b-8187-053110c2750f)
### TC2: Delete Domain with Account, No VMs + Input Validation
**Objective:**
Verify that a domain containing an account (but no VMs) displays correctly in the confirmation modal, validates input correctly, and deletes successfully with cleanup=true.
**Test Steps:**
1. Navigate to Domains section
2. Click on TestChild2 (has testuser2 account, 0 VMs)
3. Click Delete Domain action button
4. Observe modal displays account in table with VM counts
5. Verify "Delete domain" button is disabled
6. Type incorrect name → verify button stays disabled
7. Type `TestChild2` → verify button becomes enabled
8. Click "Delete domain" button
9. Verify domain and account are deleted via CLI
**Expected Result:**
- Modal shows testuser2 account with 0/0/0 VM counts
- Input validation prevents deletion until correct name entered
- Domain and associated account deleted successfully (cleanup=true)
**Actual Result:**
- Modal displayed testuser2 account correctly: Total VMs=0, Running=0, Stopped=0
- Delete button was disabled until correct domain name entered
- Domain deleted successfully
- Account testuser2 also deleted (cleanup=true worked)
- Domain count reduced from 6 to 5
<img width="3055" height="1673" alt="Screenshot from 2026-01-27 16-56-50" src="https://github.com/user-attachments/assets/88bd3f66-abdf-402b-9bf1-225199ba6804" />
[Screencast from 2026-01-27 16-58-53.webm](https://github.com/user-attachments/assets/ff89663e-8d0a-4c2f-9600-82eab0777624)
# Post-deletion verification:
(admin) 🐱 > list domains listall=true
{
"count": 5,
"domain": [
{ "name": "ROOT", ... },
{ "name": "Test_With_Subdomain", ... },
{ "name": "Test_Sub_1", ... },
{ "name": "TestDeleteParent", "vmtotal": 2, ... },
{ "name": "TestChild1", "vmtotal": 2, ... }
]
}
# TestChild2 no longer present
(admin) 🐱 > list accounts domainid=426023be-6fcd-4b20-ad27-b2b64ff79b30 listall=true
🙈 Error: (HTTP 431, error code 4350) Domain id=8 doesn't exist
# Confirms domain and account were deleted
```
**Status:** PASS
## TC3: Delete Domain with Mixed VM States (cleanup=true)
**Objective:**
Verify that a domain containing an account with running and stopped VMs displays correct counts in the modal and deletes successfully with cleanup=true (cascading deletion of VMs, networks, and account).
**Test Steps:**
1. Navigate to Domains section
2. Click on TestChild1 (has testuser1 account with 2 VMs)
3. Click Delete Domain action button
4. Observe modal displays account with VM breakdown
5. Verify Running/Stopped VM counts are accurate
6. Type `TestChild1` in confirmation input
7. Click "Delete domain" button
8. Observe success notification
9. Verify domain, account, and VMs deleted via CLI
**Expected Result:**
- Modal shows testuser1 with Total=2, Running=1, Stopped=1
- Domain, account, and all VMs deleted via cleanup=true
- Success notification displayed
**Actual Result:**
- Modal correctly displayed: testuser1 | 2 | 1 | 1
- Success notification appeared upon deletion
- Domain TestChild1 deleted
- Account testuser1 deleted
- Both VMs (testvm1, testvm2) deleted
- Network resources cleaned up
- Domain count reduced from 5 to 4
- VM count reduced from 3 to 1 (only admin's iso-test-vm remains)
- domain with mixed VM states - displays correctly
<img width="3055" height="1673" alt="image" src="https://github.com/user-attachments/assets/e1371a37-0195-4449-adeb-bf3646865729" />
- deletion
[Screencast from 2026-01-27 16-58-53.webm](https://github.com/user-attachments/assets/499a5300-f42e-441f-88b4-3893b0860d9a)
# Post-deletion - Domains:
(admin) 🐱 > list domains listall=true
{
"count": 4,
"domain": [
{ "name": "ROOT", "vmtotal": 1, ... },
{ "name": "Test_With_Subdomain", ... },
{ "name": "Test_Sub_1", ... },
{ "name": "TestDeleteParent", "haschild": false, "vmtotal": 0, ... }
]
}
# TestChild1 deleted, TestDeleteParent now has no children
# Post-deletion - VMs:
(admin) 🐱 > list virtualmachines listall=true
{
"count": 1,
"virtualmachine": [
{ "name": "iso-test-vm", "account": "admin", "domain": "ROOT", ... }
]
}
# testvm1 and testvm2 deleted - only admin's VM remains
```
**Status:** PASS
## TC4: Delete Parent Domain with Children (Cascading Deletion)
**Objective:**
Verify that deleting a parent domain with child domains triggers cascading deletion of all sub-domains and their associated resources (accounts, users) using cleanup=true.
**Test Steps:**
1. Create test hierarchy: TestDeleteParent → CascadeChild1 (with account), CascadeChild2 (empty)
2. Navigate to Domains section in UI
3. Click on TestDeleteParent
4. Click Delete Domain action button
5. Observe modal shows accounts from child domains
6. Try typing child domain name (e.g., "CascadeChild1") → verify button stays disabled
7. Type `TestDeleteParent` → verify button becomes enabled
8. Click "Delete domain" button
9. Verify all domains and accounts deleted via CLI
**Expected Result:**
- Modal displays accounts from entire hierarchy
- Only exact parent domain name enables delete button
- Parent and all children deleted with cleanup=true
- All associated accounts deleted
**Actual Result:**
- Modal correctly displayed cascadeuser account (from child domain CascadeChild1)
- Typing child domain name did NOT enable delete button (correct behavior)
- Only typing exact name "TestDeleteParent" enabled the button
- Cascading deletion successful:
- TestDeleteParent deleted
- CascadeChild1 deleted
- CascadeChild2 deleted
- cascadeuser account deleted
- Domain count reduced from 6 to 3
**Test Evidence:**
```
- Pre-deletion structure (6 domains):
<img width="3055" height="1673" alt="image" src="https://github.com/user-attachments/assets/41abeab8-be86-4937-b63b-42376607b5d9" />
- Modal showed:
<img width="3055" height="1673" alt="Screenshot from 2026-01-27 17-13-41" src="https://github.com/user-attachments/assets/5d374195-2472-4704-965e-53b0c9b3cd36" />
- Deletion
[Screencast from 2026-01-27 17-14-06.webm](https://github.com/user-attachments/assets/5d2f890d-f886-4abd-91cc-a355f9296bbd)
- Post-deletion verification:
```
(admin) 🐱 > list domains listall=true
{
"count": 3,
"domain": [
{ "name": "ROOT", ... },
{ "name": "Test_With_Subdomain", ... },
{ "name": "Test_Sub_1", ... }
]
}
```
- TestDeleteParent, CascadeChild1, CascadeChild2 all deleted
```
(admin) 🐱 > list accounts listall=true
{
"count": 3,
"account": [
{ "name": "admin", ... },
{ "name": "baremetal-system-account", ... },
{ "name": "ACSUser", ... }
]
}
```
- cascadeuser account deleted - only system accounts remain
**Status:** PASS
**Additional Observation:**
Input validation correctly rejects child domain names - only the exact parent domain name enables deletion. This prevents accidental deletion of wrong domain.
### TC5: Mass Delete - Multiple Domains in Rapid Succession
**Objective:**
Verify that multiple domains can be deleted in rapid succession without conflicts, errors, or UI issues. Tests async job handling when multiple deletions are triggered quickly.
**Test Steps:**
1. Create 3 test domains: MassDelete1, MassDelete2, MassDelete3 under ROOT
2. Refresh UI to display all domains
3. Delete MassDelete1: Click → Delete action → type name → confirm
4. Immediately delete MassDelete2: Click → Delete action → type name → confirm
5. Immediately delete MassDelete3: Click → Delete action → type name → confirm
6. Observe UI behavior during rapid deletions
7. Verify all domains deleted via CLI
**Expected Result:**
- All 3 domains delete without errors
- Async jobs queue and complete properly
- UI updates dynamically after each deletion
- No conflicts between concurrent delete operations
**Actual Result:**
- All 3 domains (MassDelete1, MassDelete2, MassDelete3) deleted successfully
- No UI lag or delays observed
- No error messages or conflicts
- Domain tree updated dynamically after each deletion
- Async jobs handled properly without interference
- Domain count reduced from 6 to 3
- Pre-deletion (6 domains):
```
(admin) 🐱 > list domains listall=true
{
"count": 6,
"domain": [
{ "name": "ROOT", ... },
{ "name": "Test_With_Subdomain", ... },
{ "name": "Test_Sub_1", ... },
{ "name": "MassDelete1", "id": "b77d9d7e-20ef-4d52-a1e0-0729a30e8829", ... },
{ "name": "MassDelete2", "id": "93b278bd-ea8a-41f4-a7a4-05a1688fa7e5", ... },
{ "name": "MassDelete3", "id": "9a6a17ad-993c-4ac7-bad2-f09909c97880", ... }
]
}
```
- Post-deletion (3 domains):
```
(admin) 🐱 > list domains listall=true
{
"count": 3,
"domain": [
{ "name": "ROOT", ... },
{ "name": "Test_With_Subdomain", ... },
{ "name": "Test_Sub_1", ... }
]
}
```
- All MassDelete domains successfully removed
[Screencast from 2026-01-27 17-21-09.webm](https://github.com/user-attachments/assets/5e3ed63b-b166-4c7d-a68b-89c2c37cd5fa)
**Status:** PASS
### TC6: Whitespace Handling + Delete While Viewing Domain
**Objective:**
Verify that (1) domain name input correctly handles leading/trailing whitespace, and (2) UI navigates away when deleting a domain while viewing it.
**Test Steps:**
1. Create WhitespaceTest domain under ROOT
2. Navigate to Domains section and click on WhitespaceTest
3. Click Delete Domain action button
4. Type ` WhitespaceTest ` (with leading and trailing spaces)
5. Observe if Delete button becomes enabled
6. Click "Delete domain" button
7. Observe if UI navigates away from deleted domain
8. Click UI Refresh button
9. Perform hard browser refresh (F5)
10. Verify domain deleted via CLI
**Expected Result:**
- Whitespace trimmed - button should enable despite extra spaces
- After deletion, UI should navigate away to /domain (domains list)
- Detail panel should not show stale data
**Actual Result:**
- Whitespace handling: PASS - Button enabled with spaces (trim() working correctly)
- X Navigation after deletion: FAIL - UI did not navigate away
- X Detail panel showed stale data for deleted domain
- X UI Refresh button did not clear stale view
- Hard browser refresh (F5) correctly navigated to ROOT
- Domain tree correctly removed WhitespaceTest from list
- Domain deletion successful (confirmed via CLI)
**Test Evidence:**
- Whitespace input accepted - button enabled with " WhitespaceTest "
- Code correctly uses .trim() for comparison:
- canDelete () { return this.confirmText.trim() === this.domain.name.trim() }
-> After deletion:
- Domain tree: WhitespaceTest removed
- Detail panel: Still showing WhitespaceTest (stale)
- URL: Still on deleted domain's route
- UI Refresh: No effect
- Hard refresh (F5): Navigates to ROOT
- Post-deletion verification:
```
(admin) 🐱 > list domains listall=true
{
"count": 3,
"domain": [
{ "name": "ROOT", ... },
{ "name": "Test_With_Subdomain", ... },
{ "name": "Test_Sub_1", ... }
]
}
```
- WhitespaceTest successfully deleted but right panel **not refreshed even via Refresh button** (needs hard bewser refresh)
[Uploading Screencast from 2026-01-27 17-29-27.webm…]()
**Status:** PARTIAL PASS (Whitespace: PASS, Navigation: FAIL - BUG)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3837432338
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16679
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3715076473
@Imvedansh , I moved it to 4.20 as this is the oldest supported LTS.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "Imvedansh (via GitHub)" <gi...@apache.org>.
Imvedansh commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3783934850
@blueorangutan ui
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3784010863
UI build: :heavy_check_mark:
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/12380 (QA-JID-853)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "Imvedansh (via GitHub)" <gi...@apache.org>.
Imvedansh commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3789945675
> > @abh1sar no. @Imvedansh I think there needs to be a switch element to toggle cleanup in the new form you added or are we considering the operator entering domain name as cleanup=true. Currently, we are simply passing cleanup=true on submit. (I ended up accidentally deleting a domain on QA env 🤦♂️ ) I'm not sure about this behaviour and it feels a bit confusing compared to the original UI. Others can share their opinion.
>
> The expected behavior of this PR is to allow deletion of a domain along with all associated accounts and sub-domains (including all resources) while showing any associated accounts and VM.
>
> --- This domain may contain accounts, users, or sub-domains. All of these must be removed before the domain can be deleted. This action cannot be undone.--- is the current verbiage for the form ,It should be more like All associated accounts WILL BE DELETED and to prevent any catastrophic and unintended action ,added the requirement to enter the name of domain.
>
> If a cleanup flag is added and not checked, the API would simply return an error, and it’s unclear if that would provide a good user experience. Another approach I can think of is to disable the input container till the cleanup flag is true. with a little more clear warning above which states this will remove all the associated accounts,vm etc. I feel this could be good to have maybe in future not a must have for now.
>
> Current solution make it very easy to see all the accounts and vm in single container of parent domain and extra check of entering the domain name their removes the scope of deleting the resources by mistake while keeping it simpler to do action.
>
> WDYT?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3715082065
@DaanHoogland a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3715077734
@blueorangutan ui
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3831136738
@RosiKyu can you have another look?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3828278992
@Imvedansh a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on code in PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#discussion_r2752723988
##########
ui/src/components/view/DomainDeleteConfirm.vue:
##########
@@ -0,0 +1,155 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+<template>
+ <a-modal
+ :visible="true"
+ :title="$t('label.action.delete.domain') + ': ' + domain.name"
+ :okText="$t('label.delete.domain')"
+ okType="danger"
+ :confirmLoading="loading"
+ :ok-button-props="{ disabled: !canDelete }"
+ @cancel="emitClose"
+ @ok="emitConfirm">
+
+ <a-alert
+ type="warning"
+ show-icon
+ style="margin-bottom: 16px">
+ <template #message>
+ <div v-html="$t('message.delete.domain.warning')"></div>
+ </template>
+ </a-alert>
+
+ <a-spin v-if="loading" />
+
+ <a-table
+ v-else
+ size="small"
+ :columns="columns"
+ :dataSource="accountVmSummary"
+ :pagination="false"
+ rowKey="account" />
+
+ <div style="margin-top: 16px">
+ <a-alert style="margin-bottom: 10px">
+ <template #message>
+ <div v-html="$t('message.delete.domain.confirm')"></div>
+ </template>
+ </a-alert>
+ <a-input
+ v-model:value="confirmText"
+ :placeholder="$t('label.enter.domain.name')" />
+ </div>
+
+ </a-modal>
+</template>
+
+<script>
+import { api } from '@/api'
+
+export default {
+ name: 'DomainDeleteConfirm',
Review Comment:
Hi @Imvedansh Can have this as a generic vue component for delete confirmation of other resources as well?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "Imvedansh (via GitHub)" <gi...@apache.org>.
Imvedansh commented on code in PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#discussion_r2687003950
##########
ui/src/views/iam/DomainView.vue:
##########
@@ -319,6 +333,32 @@ export default {
closeAction () {
this.showAction = false
},
+ confirmDeleteDomain () {
+ const params = { id: this.deleteDomainResource.id }
+
+ api('deleteDomain', params)
Review Comment:
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?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3745160998
@DaanHoogland a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3745156084
@blueorangutan ui
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3789105373
@abh1sar no.
@Imvedansh I think there needs to be a switch element to toggle cleanup in the new form you added or are we considering the operator entering domain name as cleanup=true. Currently, we are simply passing cleanup=true on submit. (I ended up accidentally deleting a domain on QA env :man_facepalming: )
I'm not sure about this behaviour and it feels a bit confusing compared to the original UI. Others can share their opinion.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3803081477
Thanks @Imvedansh. I don't have a suggestion at this point. It would be good if any of the real users or the reporter could have a look at it. If the behaviour is accepted by others, then :+1:
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3784479944
@RosiKyu 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3784714468
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16499
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on code in PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#discussion_r2667204224
##########
ui/src/views/iam/DomainView.vue:
##########
@@ -319,6 +333,32 @@ export default {
closeAction () {
this.showAction = false
},
+ confirmDeleteDomain () {
+ const params = { id: this.deleteDomainResource.id }
+
+ api('deleteDomain', params)
Review Comment:
@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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3749046117
Ok @Imvedansh , I do not care either way, but as https://cloudstack.staged.apache.org/api/apidocs-4.22/apis/deleteDomain.html states there is a `cleanup` option on the `deleteDomain` API and I kind of expected that to be used once I had ok’d the consequences. I am fine with merging like this even when this improvement can be done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3810018414
@Imvedansh , can you look at @RosiKyu ’s last test case?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "Imvedansh (via GitHub)" <gi...@apache.org>.
Imvedansh commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3748640026
> looks nice but one issue: <img alt="Screenshot 2026-01-13 at 20 15 15" width="412" height="239" src="https://private-user-images.githubusercontent.com/2486961/535267632-2b859c73-c923-4a68-8f17-754657847951.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjgzNzk4MTQsIm5iZiI6MTc2ODM3OTUxNCwicGF0aCI6Ii8yNDg2OTYxLzUzNTI2NzYzMi0yYjg1OWM3My1jOTIzLTRhNjgtOGYxNy03NTQ2NTc4NDc5NTEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDExNCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjAxMTRUMDgzMTU0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YjhjNTQ0N2FkNjdkMWFlNGNkY2Y1YjFiOWZmMWQ4YzhmOGM3ZmRhOTZhOWFmZDg1YmJiNTg2YjhlYWRiM2IzOSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.UnCP2aQcibdgv5EtOH-eQVDJT9VtJ1ArItzesdbme2k"> I think you mean to delete users with the domain, don’t you?
>
> deleting an empty domain works.
Thanks Daan for checking this out
Let me clarify it ,I spend quite time to understand the architecture last when picked it.
Deleting an empty domain works as expected. When a domain contains accounts, users, or sub-domains, the deletion fails because the CloudStack backend does not allow cascading deletion of users or accounts during domain deletion, in order to avoid catastrophic actions. The error shown is therefore correct and comes from the backend async job result.
The UI change in this PR does not attempt to change backend deletion semantics. Instead, it focuses on:
Correctly handling deleteDomain as an async job .
Improving user awareness by clearly showing associated accounts and instances before attempting deletion
Providing better verbiage around domain deletion expectations, as requested in #11497
Previously, after an unsuccessful domain deletion, users had to manually navigate through accounts and instances to identify what was still associated with the domain, quite not cool
With the current change, the UI presents the list of associated accounts and active/stopped instances upfront, making it easier to clean up the domain by deleting the related accounts first and then retrying the domain deletion.
So far this is my understanding ,
If I'm mistaken anywhere do let me know I ll be happy to work on that
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3714939317
UI build: :heavy_check_mark:
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/12380 (QA-JID-838)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "Imvedansh (via GitHub)" <gi...@apache.org>.
Imvedansh commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3714970937
@DaanHoogland WDYT?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3715148987
UI build: :heavy_check_mark:
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/12380 (QA-JID-839)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3837290853
@RosiKyu 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "Imvedansh (via GitHub)" <gi...@apache.org>.
Imvedansh commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3764075530
> Ok @Imvedansh , I do not care either way, but as https://cloudstack.staged.apache.org/api/apidocs-4.22/apis/deleteDomain.html states there is a `cleanup` option on the `deleteDomain` API and I kind of expected that to be used once I had ok’d the consequences. I am fine with merging like this even when this improvement can be done.
Just need to add cleanup:true in domainDelete funtion.
It's not much, but may need to be tested seprately for every state ,such as with account, with instance , state :stopped,state:running.
What would you prefer to merge this as in condition , and I can add another PR shortly for same with proper testing. or to do all in this PR
PS. Im working on what you asked as well
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI Add comprehensive domain deletion confirmation dialog (Feature Request #11497) [cloudstack]
Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #12380:
URL: https://github.com/apache/cloudstack/pull/12380#issuecomment-3767970260
Delete dialog needs cleanup options.
@Imvedansh I don't think you need to check if all resources are actually cleaned up. That is an existing flag and you just need to make sure API is called with the correct value.
cc @DaanHoogland
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org