mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
ui: show tags only for supported resources (#5798)
* ui: prevent incorrect tags displa for primary storage Tags in info card of the UI are related to tags functionality(create/delete/lsitTags API) UI was incorrectly showing storage tags as these tags in the UI. Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com> * remove logging Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com> * ui: show tags only for supported resources Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
parent
6728b696cd
commit
d13057ace5
@ -651,7 +651,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="account-center-tags" v-if="!isStatic && resourceType && 'listTags' in $store.getters.apis">
|
||||
<div class="account-center-tags" v-if="!isStatic && resourceType && tagsSupportingResourceTypes.includes(this.resourceType) && 'listTags' in $store.getters.apis">
|
||||
<a-divider/>
|
||||
<a-spin :spinning="loadingTags">
|
||||
<div class="title">{{ $t('label.tags') }}</div>
|
||||
@ -772,10 +772,12 @@ export default {
|
||||
this.showKeys = false
|
||||
this.setData()
|
||||
|
||||
if ('tags' in this.resource) {
|
||||
this.tags = this.resource.tags
|
||||
} else if (this.resourceType) {
|
||||
this.getTags()
|
||||
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()
|
||||
@ -794,6 +796,12 @@ export default {
|
||||
await this.getIcons()
|
||||
},
|
||||
computed: {
|
||||
tagsSupportingResourceTypes () {
|
||||
return ['UserVm', 'Template', 'ISO', 'Volume', 'Snapshot', 'Backup', 'Network',
|
||||
'LoadBalancer', 'PortForwardingRule', 'FirewallRule', 'SecurityGroup', 'SecurityGroupRule',
|
||||
'PublicIpAddress', 'Project', 'Account', 'Vpc', 'NetworkACL', 'StaticRoute', 'VMSnapshot',
|
||||
'RemoteAccessVpn', 'User', 'SnapshotPolicy', 'VpcOffering']
|
||||
},
|
||||
name () {
|
||||
return this.resource.displayname || this.resource.displaytext || this.resource.name || this.resource.username ||
|
||||
this.resource.ipaddress || this.resource.virtualmachinename || this.resource.templatetype
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user