mirror of https://github.com/apache/cloudstack.git
ui: fix conflict/regression found in AutogenView
After forward merged from 4.18->main, found a regression due to
3c25a35426 where any columns which are
custom functions don't render. Such as metrics columns.
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
62feb24de6
commit
d22a3d517d
|
|
@ -835,6 +835,7 @@ export default {
|
|||
})
|
||||
}
|
||||
|
||||
const customRender = {}
|
||||
for (var columnKey of this.columnKeys) {
|
||||
let key = columnKey
|
||||
let title = columnKey === 'cidr' && this.columnKeys.includes('ip6cidr') ? 'ipv4.cidr' : columnKey
|
||||
|
|
@ -842,9 +843,11 @@ export default {
|
|||
if ('customTitle' in columnKey && 'field' in columnKey) {
|
||||
key = columnKey.field
|
||||
title = columnKey.customTitle
|
||||
customRender[key] = columnKey[key]
|
||||
} else {
|
||||
key = Object.keys(columnKey)[0]
|
||||
title = Object.keys(columnKey)[0]
|
||||
customRender[key] = columnKey[key]
|
||||
}
|
||||
}
|
||||
this.columns.push({
|
||||
|
|
@ -981,6 +984,12 @@ export default {
|
|||
|
||||
for (let idx = 0; idx < this.items.length; idx++) {
|
||||
this.items[idx].key = idx
|
||||
for (const key in customRender) {
|
||||
const func = customRender[key]
|
||||
if (func && typeof func === 'function') {
|
||||
this.items[idx][key] = func(this.items[idx])
|
||||
}
|
||||
}
|
||||
if (this.$route.path.startsWith('/ldapsetting')) {
|
||||
this.items[idx].id = this.items[idx].hostname
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue