From 574367bd95cb74122e31e17d619a3fb6cb19bbd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernardo=20De=20Marco=20Gon=C3=A7alves?= Date: Sun, 1 Dec 2024 20:35:23 -0300 Subject: [PATCH 1/2] fix userdata form selection --- ui/src/views/compute/DeployVM.vue | 12 +++++------- ui/src/views/compute/wizard/UserDataSelection.vue | 10 +++++----- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/ui/src/views/compute/DeployVM.vue b/ui/src/views/compute/DeployVM.vue index 3c4742d64b20..cb9f4a6dce76 100644 --- a/ui/src/views/compute/DeployVM.vue +++ b/ui/src/views/compute/DeployVM.vue @@ -1940,18 +1940,16 @@ export default { this.form.userdataid = undefined return } + this.form.userdataid = id this.userDataParams = [] api('listUserData', { id: id }).then(json => { const resp = json?.listuserdataresponse?.userdata || [] if (resp[0]) { - var params = resp[0].params - if (params) { - var dataParams = params.split(',') - } - var that = this - dataParams.forEach(function (val, index) { - that.userDataParams.push({ + const params = resp[0].params + const dataParams = params ? params.split(',') : [] + dataParams.forEach((val, index) => { + this.userDataParams.push({ id: index, key: val }) diff --git a/ui/src/views/compute/wizard/UserDataSelection.vue b/ui/src/views/compute/wizard/UserDataSelection.vue index 87e0bb3f32a9..74e3a3be400a 100644 --- a/ui/src/views/compute/wizard/UserDataSelection.vue +++ b/ui/src/views/compute/wizard/UserDataSelection.vue @@ -33,6 +33,7 @@ :scroll="{ y: 225 }" > @@ -78,6 +79,7 @@ export default { filter: '', columns: [ { + key: 'name', dataIndex: 'name', title: this.$t('label.userdata'), width: '40%' @@ -181,11 +183,9 @@ export default { }, onClickRow (record) { return { - on: { - click: () => { - this.selectedRowKeys = [record.key] - this.$emit('select-user-data-item', record.key) - } + onClick: () => { + this.selectedRowKeys = [record.key] + this.$emit('select-user-data-item', record.key) } } } From 10922e704a170f856ac846e0eea74111e21941f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernardo=20De=20Marco=20Gon=C3=A7alves?= Date: Sun, 1 Dec 2024 20:45:59 -0300 Subject: [PATCH 2/2] fix LB form selection --- ui/src/views/compute/wizard/LoadBalancerSelection.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ui/src/views/compute/wizard/LoadBalancerSelection.vue b/ui/src/views/compute/wizard/LoadBalancerSelection.vue index e2ffb991e987..3ba66241d56b 100644 --- a/ui/src/views/compute/wizard/LoadBalancerSelection.vue +++ b/ui/src/views/compute/wizard/LoadBalancerSelection.vue @@ -30,6 +30,7 @@ :rowKey="record => record.id" :pagination="false" :rowSelection="rowSelection" + :customRow="onClickRow" size="middle" :scroll="{ y: 225 }">