mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-29 21:28:52 +00:00
fix(xpack): 修复收集任务表头设置的bug
This commit is contained in:
@@ -228,7 +228,8 @@ export default {
|
||||
const _tableConfig = localStorage.getItem('tableConfig')
|
||||
? JSON.parse(localStorage.getItem('tableConfig'))
|
||||
: {}
|
||||
const configShowColumnsNames = _.get(_tableConfig[this.$route.name], 'showColumns', null)
|
||||
const tableName = this.config.name || this.$route.name
|
||||
const configShowColumnsNames = _.get(_tableConfig[tableName], 'showColumns', null)
|
||||
let showColumnsNames = configShowColumnsNames || defaultColumnsNames
|
||||
if (showColumnsNames.length === 0) {
|
||||
showColumnsNames = totalColumnsNames
|
||||
@@ -270,7 +271,8 @@ export default {
|
||||
const _tableConfig = localStorage.getItem('tableConfig')
|
||||
? JSON.parse(localStorage.getItem('tableConfig'))
|
||||
: {}
|
||||
_tableConfig[this.$route.name] = {
|
||||
const tableName = this.config.name || this.$route.name
|
||||
_tableConfig[tableName] = {
|
||||
'showColumns': columns
|
||||
}
|
||||
localStorage.setItem('tableConfig', JSON.stringify(_tableConfig))
|
||||
|
||||
@@ -24,7 +24,8 @@ export default {
|
||||
url: '/api/v1/assets/gathered-users/',
|
||||
hasTree: true,
|
||||
columns: [
|
||||
'hostname', 'ip', 'username', 'date_last_login', 'present', 'ip_last_login', 'date_updated'
|
||||
'hostname', 'ip', 'username', 'date_last_login', 'present',
|
||||
'ip_last_login', 'date_updated'
|
||||
],
|
||||
columnsMeta: {
|
||||
hostname: {
|
||||
|
||||
@@ -14,10 +14,14 @@ export default {
|
||||
|
||||
return {
|
||||
tableConfig: {
|
||||
name: 'TaskListTable',
|
||||
url: '/api/v1/xpack/gathered-user/tasks/',
|
||||
columns: [
|
||||
'name', 'nodes', 'periodic_display', 'executed_times', 'actions'
|
||||
],
|
||||
columnsShow: {
|
||||
min: ['name', 'nodes', 'periodic_display', 'executed_times', 'actions']
|
||||
},
|
||||
columnsMeta: {
|
||||
name: {
|
||||
formatter: null
|
||||
@@ -61,7 +65,8 @@ export default {
|
||||
hasRefresh: false,
|
||||
hasExport: false,
|
||||
hasMoreActions: false,
|
||||
createRoute: 'GatherUserTaskCreate'
|
||||
createRoute: 'GatherUserTaskCreate',
|
||||
hasColumnSetting: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user