From f4aad41b751184794c8eb46acb2f6b7c497f6c8a Mon Sep 17 00:00:00 2001 From: Nancy Butler <42977925+mantis-toboggan-md@users.noreply.github.com> Date: Tue, 15 Oct 2024 08:30:29 -0700 Subject: [PATCH] update vsphere machine config to use new networks endpoint --- shell/components/form/ArrayList.vue | 10 +++++++--- shell/machine-config/vmwarevsphere.vue | 6 ++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/shell/components/form/ArrayList.vue b/shell/components/form/ArrayList.vue index aea41aed334..e48b76fb05f 100644 --- a/shell/components/form/ArrayList.vue +++ b/shell/components/form/ArrayList.vue @@ -138,10 +138,14 @@ export default { } }, watch: { - value() { - this.lastUpdateWasFromValue = true; - this.rows = (this.value || []).map((v) => ({ value: v })); + value: { + deep: true, + handler() { + this.lastUpdateWasFromValue = true; + this.rows = (this.value || []).map((v) => ({ value: v })); + } }, + rows: { deep: true, handler(newValue, oldValue) { diff --git a/shell/machine-config/vmwarevsphere.vue b/shell/machine-config/vmwarevsphere.vue index 7025dcbee97..85a827358bb 100644 --- a/shell/machine-config/vmwarevsphere.vue +++ b/shell/machine-config/vmwarevsphere.vue @@ -546,8 +546,10 @@ export default { async loadNetworks() { set(this, 'networksResults', null); - const options = await this.requestOptions('networks', this.value.datacenter); - const content = this.mapPathOptionsToContent(options); + const options = await this.requestOptions('networks-extended', this.value.datacenter); + const content = options.map((opt) => { + return { label: `${ opt.name } (${ opt.moid })`, value: opt.moid }; + }); this.resetValueIfNecessary('network', content, options, true);