From 7e457068008aa79c3bab8256f97a0ba0f94fd657 Mon Sep 17 00:00:00 2001 From: Damans227 <61474540+Damans227@users.noreply.github.com> Date: Mon, 9 Mar 2026 12:54:24 -0400 Subject: [PATCH] Show security group selection in Basic zone VM deployment and fix SG listing for cross-domain deployments --- ui/src/views/compute/DeployVM.vue | 6 +++++ .../compute/wizard/SecurityGroupSelection.vue | 26 ++++++++++++++++--- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/ui/src/views/compute/DeployVM.vue b/ui/src/views/compute/DeployVM.vue index 1966203e7dd7..88521861f18e 100644 --- a/ui/src/views/compute/DeployVM.vue +++ b/ui/src/views/compute/DeployVM.vue @@ -459,6 +459,9 @@ :value="securitygroupids" :loading="loading.networks" :preFillContent="dataPreFill" + :domainId="owner.domainid" + :account="owner.account" + :projectId="owner.projectid" @select-security-group-item="($event) => updateSecurityGroups($event)"> @@ -1501,6 +1504,9 @@ export default { return tabList }, showSecurityGroupSection () { + if (this.zone && this.zone.networktype === 'Basic') { + return true + } if (this.networks.length < 1) { return false } diff --git a/ui/src/views/compute/wizard/SecurityGroupSelection.vue b/ui/src/views/compute/wizard/SecurityGroupSelection.vue index 9d91cc1cbe19..0ea08ec8887d 100644 --- a/ui/src/views/compute/wizard/SecurityGroupSelection.vue +++ b/ui/src/views/compute/wizard/SecurityGroupSelection.vue @@ -75,6 +75,18 @@ export default { preFillContent: { type: Object, default: () => {} + }, + domainId: { + type: String, + default: () => '' + }, + account: { + type: String, + default: () => '' + }, + projectId: { + type: String, + default: () => '' } }, data () { @@ -102,6 +114,9 @@ export default { } }, computed: { + ownerParams () { + return `${this.domainId}-${this.account}-${this.projectId}` + }, rowSelection () { return { type: 'checkbox', @@ -121,6 +136,11 @@ export default { this.selectedRowKeys = newValue } }, + ownerParams () { + this.selectedRowKeys = [] + this.$emit('select-security-group-item', null) + this.fetchData() + }, loading () { if (!this.loading) { if (this.preFillContent.securitygroupids) { @@ -140,9 +160,9 @@ export default { methods: { fetchData () { const params = { - projectid: this.$store.getters.project ? this.$store.getters.project.id : null, - domainid: this.$store.getters.project && this.$store.getters.project.id ? null : this.$store.getters.userInfo.domainid, - account: this.$store.getters.project && this.$store.getters.project.id ? null : this.$store.getters.userInfo.account, + projectid: this.projectId || (this.$store.getters.project ? this.$store.getters.project.id : null), + domainid: this.projectId || (this.$store.getters.project && this.$store.getters.project.id) ? null : (this.domainId || this.$store.getters.userInfo.domainid), + account: this.projectId || (this.$store.getters.project && this.$store.getters.project.id) ? null : (this.account || this.$store.getters.userInfo.account), page: this.page, pageSize: this.pageSize }