diff --git a/ui/src/components/view/InfoCard.vue b/ui/src/components/view/InfoCard.vue index fadead44684..6347c4c3a89 100644 --- a/ui/src/components/view/InfoCard.vue +++ b/ui/src/components/view/InfoCard.vue @@ -651,7 +651,7 @@ -
+
{{ $t('label.tags') }}
@@ -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