diff --git a/src/components/AutoDataTable/index.vue b/src/components/AutoDataTable/index.vue index 5a0070b80..685672c06 100644 --- a/src/components/AutoDataTable/index.vue +++ b/src/components/AutoDataTable/index.vue @@ -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)) diff --git a/src/views/xpack/GatheredUser/GatheredUserList.vue b/src/views/xpack/GatheredUser/GatheredUserList.vue index e6a1be356..a2924f5c3 100644 --- a/src/views/xpack/GatheredUser/GatheredUserList.vue +++ b/src/views/xpack/GatheredUser/GatheredUserList.vue @@ -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: { diff --git a/src/views/xpack/GatheredUser/TaskList.vue b/src/views/xpack/GatheredUser/TaskList.vue index 1f5e245f2..4d241b1e8 100644 --- a/src/views/xpack/GatheredUser/TaskList.vue +++ b/src/views/xpack/GatheredUser/TaskList.vue @@ -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 } } }