mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
UI: Fix userdata and load balancer selection (#10016)
This commit is contained in:
parent
5ee61c226a
commit
9960e40030
@ -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
|
||||
})
|
||||
|
||||
@ -30,6 +30,7 @@
|
||||
:rowKey="record => record.id"
|
||||
:pagination="false"
|
||||
:rowSelection="rowSelection"
|
||||
:customRow="onClickRow"
|
||||
size="middle"
|
||||
:scroll="{ y: 225 }">
|
||||
<template #headerCell="{ column }">
|
||||
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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>
|
||||
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user