Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions ui/src/views/compute/EditVM.vue
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export default {
},
fetchZoneDetails () {
api('listZones', {
zoneid: this.resource.zoneid
id: this.resource.zoneid
}).then(response => {
const zone = response?.listzonesresponse?.zone || []
this.securityGroupsEnabled = zone?.[0]?.securitygroupsenabled
Expand Down Expand Up @@ -328,10 +328,8 @@ export default {
params.name = values.name
params.displayname = values.displayname
params.ostypeid = values.ostypeid
if (this.securityGroupsEnabled) {
if (values.securitygroupids) {
params.securitygroupids = values.securitygroupids
}
if (this.securityGroupsEnabled && Array.isArray(values.securitygroupids) && values.securitygroupids.length > 0) {
params.securitygroupids = values.securitygroupids
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this work? I saw a similar code block yesterday where we were using it like the following,
params.securitygroupids = values.securitygroupids.join(',')

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this in QA, @shwstppr. The only thing not working is clearing the list of security groups completely. Which, I think, is a separate issue.
What do you think might happen when not calling join(‘,’)?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DaanHoogland, that was just a question from my side. I've not tested it and do not know if it makes any difference at the moment. If it is already tested then 👍

}
if (values.isdynamicallyscalable !== undefined) {
params.isdynamicallyscalable = values.isdynamicallyscalable
Expand Down
Loading