diff --git a/ui/src/components/view/DetailsTab.vue b/ui/src/components/view/DetailsTab.vue
index 9800448b7977..2554ad233b89 100644
--- a/ui/src/components/view/DetailsTab.vue
+++ b/ui/src/components/view/DetailsTab.vue
@@ -49,6 +49,13 @@
{{ dataResource[item]? $t('message.egress.rules.allow') : $t('message.egress.rules.deny') }}
+
+
+
+ {{ securityGroup.name }}
+
+
+
{{ dataResource[item] }}
diff --git a/ui/src/config/section/compute.js b/ui/src/config/section/compute.js
index 955383b8d7c2..350c00d94927 100644
--- a/ui/src/config/section/compute.js
+++ b/ui/src/config/section/compute.js
@@ -67,7 +67,15 @@ export default {
return fields
},
searchFilters: ['name', 'zoneid', 'domainid', 'account', 'tags'],
- details: ['displayname', 'name', 'id', 'state', 'ipaddress', 'ip6address', 'templatename', 'ostypename', 'serviceofferingname', 'isdynamicallyscalable', 'haenable', 'hypervisor', 'boottype', 'bootmode', 'account', 'domain', 'zonename'],
+ details: () => {
+ var fields = ['displayname', 'name', 'id', 'state', 'ipaddress', 'ip6address', 'templatename', 'ostypename', 'serviceofferingname', 'isdynamicallyscalable', 'haenable', 'hypervisor', 'boottype', 'bootmode', 'account', 'domain', 'zonename']
+ const listZoneHaveSGEnabled = store.getters.zones.filter(zone => zone.securitygroupsenabled === true)
+ if (!listZoneHaveSGEnabled || listZoneHaveSGEnabled.length === 0) {
+ return fields
+ }
+ fields.push('securitygroup')
+ return fields
+ },
tabs: [{
component: shallowRef(defineAsyncComponent(() => import('@/views/compute/InstanceTab.vue')))
}],
diff --git a/ui/src/views/compute/EditVM.vue b/ui/src/views/compute/EditVM.vue
index ffd13e2459c1..87545c7e11c3 100644
--- a/ui/src/views/compute/EditVM.vue
+++ b/ui/src/views/compute/EditVM.vue
@@ -91,6 +91,25 @@
+
+
+
+
+ {{ securitygroup.name || securitygroup.id }}
+
+
+
+