Skip to content

Commit

Permalink
Merge pull request #7508 from swordqiu/hotfix/qj-host-hide-topo-info
Browse files Browse the repository at this point in the history
fix: host list ignore topo info
  • Loading branch information
swordqiu authored Jan 14, 2025
2 parents 846a093 + 7e51145 commit 2ad0416
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions containers/Compute/views/host/components/List.vue
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,7 @@ export default {
const ret = {
...(R.is(Function, this.getParams) ? this.getParams() : this.getParams),
}
ret.hide_cpu_topo_info = true
return ret
},
handleOpenSidepage (row, tab) {
Expand Down
11 changes: 9 additions & 2 deletions src/utils/common/tableColumn.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,15 +221,22 @@ export const getStatusTableColumn = ({ vm = {}, field = 'status', title = i18n.t
}
}

export const getEnabledTableColumn = ({ field = 'enabled', title = i18n.t('table.title.enable_status'), minWidth = 90, hidden } = {}) => {
export const getEnabledTableColumn = ({
field = 'enabled',
title = i18n.t('table.title.enable_status'),
enableText = i18n.t('status.enabled.true'),
disableText = i18n.t('status.enabled.false'),
minWidth = 90,
hidden,
} = {}) => {
return getStatusTableColumn({
field,
title,
statusModule: 'enabled',
minWidth,
hidden,
formatter: ({ row }) => {
return row[field] ? i18n.t('status.enabled.true') : i18n.t('status.enabled.false')
return row[field] ? enableText : disableText
},
})
}
Expand Down

0 comments on commit 2ad0416

Please sign in to comment.