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 2020/07/07 12:37:15 UTC
[cloudstack-primate] branch master updated: component: override
projectid in case tags are in project
This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack-primate.git
The following commit(s) were added to refs/heads/master by this push:
new 611e517 component: override projectid in case tags are in project
611e517 is described below
commit 611e5177865612e832964b502fca7e0852d4c42e
Author: Rohit Yadav <ro...@shapeblue.com>
AuthorDate: Tue Jul 7 18:06:15 2020 +0530
component: override projectid in case tags are in project
Fixes #500
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
---
src/components/view/InfoCard.vue | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/src/components/view/InfoCard.vue b/src/components/view/InfoCard.vue
index ae93566..067cacb 100644
--- a/src/components/view/InfoCard.vue
+++ b/src/components/view/InfoCard.vue
@@ -680,10 +680,6 @@ export default {
watch: {
resource: function (newItem, oldItem) {
this.resource = newItem
- if (newItem.id === oldItem.id) {
- return
- }
-
this.resourceType = this.$route.meta.resourceType
this.annotationType = ''
this.showKeys = false
@@ -706,8 +702,7 @@ export default {
if ('tags' in this.resource) {
this.tags = this.resource.tags
- }
- if (this.resourceType) {
+ } else if (this.resourceType) {
this.getTags()
}
if (this.annotationType) {
@@ -745,7 +740,15 @@ export default {
return
}
this.tags = []
- api('listTags', { listall: true, resourceid: this.resource.id, resourcetype: this.resourceType }).then(json => {
+ const params = {
+ listall: true,
+ resourceid: this.resource.id,
+ resourcetype: this.resourceType
+ }
+ if (this.$route.meta.name === 'project') {
+ params.projectid = this.resource.id
+ }
+ api('listTags', params).then(json => {
if (json.listtagsresponse && json.listtagsresponse.tag) {
this.tags = json.listtagsresponse.tag
}