You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2022/08/17 10:17:40 UTC
[cloudstack] branch 4.17 updated: ui: fix resource tags visibility in infocard (#6650)
This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch 4.17
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.17 by this push:
new 052a34c1fb9 ui: fix resource tags visibility in infocard (#6650)
052a34c1fb9 is described below
commit 052a34c1fb97bfb532ffde2bb8c3c5af6f7eafec
Author: Abhishek Kumar <ab...@gmail.com>
AuthorDate: Wed Aug 17 15:47:31 2022 +0530
ui: fix resource tags visibility in infocard (#6650)
Fixes #6649
Signed-off-by: Abhishek Kumar <ab...@gmail.com>
---
ui/src/components/view/InfoCard.vue | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/ui/src/components/view/InfoCard.vue b/ui/src/components/view/InfoCard.vue
index aca442688b6..02385ff174a 100644
--- a/ui/src/components/view/InfoCard.vue
+++ b/ui/src/components/view/InfoCard.vue
@@ -772,21 +772,13 @@ export default {
handler (newData, oldData) {
if (newData === oldData) return
this.newResource = newData
- this.resourceType = this.$route.meta.resourceType
this.showKeys = false
this.setData()
- if (this.tagsSupportingResourceTypes.includes(this.resourceType)) {
- if ('tags' in this.resource) {
- this.tags = this.resource.tags
- } else if (this.resourceType) {
- this.getTags()
- }
- }
if ('apikey' in this.resource) {
this.getUserKeys()
}
- this.getIcons()
+ this.updateResourceAdditionalData()
}
},
async templateIcon () {
@@ -798,7 +790,7 @@ export default {
eventBus.on('handle-close', (showModal) => {
this.showUploadModal(showModal)
})
- this.getIcons()
+ this.updateResourceAdditionalData()
},
computed: {
tagsSupportingResourceTypes () {
@@ -834,6 +826,18 @@ export default {
}
},
methods: {
+ updateResourceAdditionalData () {
+ if (!this.resource) return
+ this.resourceType = this.$route.meta.resourceType
+ if (this.tagsSupportingResourceTypes.includes(this.resourceType)) {
+ if ('tags' in this.resource) {
+ this.tags = this.resource.tags
+ } else if (this.resourceType) {
+ this.getTags()
+ }
+ }
+ this.getIcons()
+ },
showUploadModal (show) {
if (show) {
if (this.$showIcon()) {