This is an automated email from the ASF dual-hosted git repository.
gutoveronezi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/main by this push:
new 7aa9d3c UI: fix delete domain (#5882)
7aa9d3c is described below
commit 7aa9d3cd51fa1f3974af79a470f08612c4498cf7
Author: JoaoJandre <[email protected]>
AuthorDate: Fri Feb 11 16:45:16 2022 -0300
UI: fix delete domain (#5882)
Co-authored-by: Joao <[email protected]>
---
ui/src/views/iam/DomainActionForm.vue | 3 ++-
ui/src/views/iam/DomainView.vue | 8 +++++++-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/ui/src/views/iam/DomainActionForm.vue
b/ui/src/views/iam/DomainActionForm.vue
index 1696d52..6ada6b1 100644
--- a/ui/src/views/iam/DomainActionForm.vue
+++ b/ui/src/views/iam/DomainActionForm.vue
@@ -180,7 +180,7 @@ export default {
this.fillEditFormFieldValues()
}
},
- inject: ['parentCloseAction', 'parentFetchData'],
+ inject: ['parentCloseAction', 'parentFetchData', 'parentForceRerender'],
methods: {
handleSubmit (e) {
e.preventDefault()
@@ -249,6 +249,7 @@ export default {
successMethod: result => {
if (this.action.api === 'deleteDomain') {
this.parentFetchData()
+ this.parentForceRerender()
}
if (this.action.response) {
const description =
this.action.response(result.jobresult)
diff --git a/ui/src/views/iam/DomainView.vue b/ui/src/views/iam/DomainView.vue
index e69edc5..6aefbcd 100644
--- a/ui/src/views/iam/DomainView.vue
+++ b/ui/src/views/iam/DomainView.vue
@@ -60,6 +60,7 @@
:tabs="$route.meta.tabs" />
<tree-view
v-else
+ :key="treeViewKey"
:treeData="treeData"
:treeSelected="treeSelected"
:treeStore="domainStore"
@@ -105,6 +106,7 @@ export default {
resource: {},
loading: false,
selectedRowKeys: [],
+ treeViewKey: 0,
treeData: [],
treeSelected: {},
showAction: false,
@@ -158,7 +160,8 @@ export default {
provide () {
return {
parentCloseAction: this.closeAction,
- parentFetchData: this.fetchData
+ parentFetchData: this.fetchData,
+ parentForceRerender: this.forceRerender
}
},
methods: {
@@ -323,6 +326,9 @@ export default {
},
closeAction () {
this.showAction = false
+ },
+ forceRerender () {
+ this.treeViewKey += 1
}
}
}