Skip to content
Merged
Show file tree
Hide file tree
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
12 changes: 5 additions & 7 deletions ui/src/views/compute/DeployVM.vue
Original file line numberDiff line numberDiff line change
Expand Up@@ -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
})
Expand Down
9 changes: 9 additions & 0 deletions ui/src/views/compute/wizard/LoadBalancerSelection.vue
Original file line numberDiff line numberDiff line change
Expand Up@@ -30,6 +30,7 @@
:rowKey="record => record.id"
:pagination="false"
:rowSelection="rowSelection"
:customRow="onClickRow"
size="middle"
:scroll="{ y: 225 }">
<template #headerCell="{ column }">
Expand DownExpand Up@@ -197,6 +198,14 @@ export default {
this.options.page = page
this.options.pageSize = pageSize
this.$emit('handle-search-filter', this.options)
},
onClickRow (record) {
return {
onClick: () => {
this.selectedRowKeys = [record.id]
this.$emit('select-load-balancer-item', record.id)
}
}
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions ui/src/views/compute/wizard/UserDataSelection.vue
Original file line numberDiff line numberDiff line change
Expand Up@@ -33,6 +33,7 @@
:scroll="{ y: 225 }"
>
<template #headerCell="{ column }">
<template v-if="column.key === 'name'"><solution-outlined /> {{ $t('label.userdata') }}</template>
<template v-if="column.key === 'account'"><user-outlined /> {{ $t('label.account') }}</template>
<template v-if="column.key === 'domain'"><block-outlined /> {{ $t('label.domain') }}</template>
</template>
Expand DownExpand Up@@ -78,6 +79,7 @@ export default {
filter: '',
columns: [
{
key: 'name',
dataIndex: 'name',
title: this.$t('label.userdata'),
width: '40%'
Expand DownExpand Up@@ -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)
}
}
}
Expand Down