import { getNameDescriptionTableColumn, getTagTableColumn, getRegionTableColumn, getTimeTableColumn, } from '@/utils/common/tableColumn' import i18n from '@/locales' export default { created () { this.columns = [ getNameDescriptionTableColumn({ vm: this, hideField: true, title: i18n.t('network.text_21'), onManager: this.onManager, slotCallback: row => { return ( this.handleOpenSidepage(row) }>{ row.name } ) }, }), getTagTableColumn({ onManager: this.onManager, resource: 'lb_loadbalanceragents', columns: () => this.columns }), { field: 'ha_state', title: i18n.t('network.text_22'), width: 90, }, { field: 'hb_last_seen', title: i18n.t('network.text_23'), width: 100, formatter: ({ cellValue }) => { return this.$moment(cellValue).fromNow() }, }, { field: 'ip', title: 'IP', width: 140, }, { field: 'version', title: i18n.t('network.version'), width: 300, }, { field: 'cluster', title: i18n.t('network.text_19'), showOverflow: 'ellipsis', minWidth: 100, }, { field: 'priority', title: this.$t('network.priority'), width: 100, }, { field: 'interface', title: this.$t('network.interface'), width: 100, }, getRegionTableColumn(), getTimeTableColumn(), ] }, }