From b02508ef19546c58220dc3e21fdf6a964cdc12f9 Mon Sep 17 00:00:00 2001 From: jym503558564 <503558564@qq.com> Date: Wed, 8 Apr 2020 19:37:20 +0800 Subject: [PATCH 1/5] =?UTF-8?q?[Update]=20=E4=BF=AE=E6=94=B9=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E5=88=97=E8=A1=A8=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../el-data-table/el-data-table.vue | 1 + src/i18n/langs/cn.js | 8 +- src/views/jobcenter/TaskList.vue | 83 ++++++++++++------- 3 files changed, 56 insertions(+), 36 deletions(-) diff --git a/src/components/DataTable/compenents/el-data-table/el-data-table.vue b/src/components/DataTable/compenents/el-data-table/el-data-table.vue index 74d78fd45..efe36b50a 100644 --- a/src/components/DataTable/compenents/el-data-table/el-data-table.vue +++ b/src/components/DataTable/compenents/el-data-table/el-data-table.vue @@ -910,6 +910,7 @@ export default { } this.data = data + console.log(this.data) // 树形结构逻辑 if (this.isTree) { diff --git a/src/i18n/langs/cn.js b/src/i18n/langs/cn.js index fc12efae1..28ec59499 100644 --- a/src/i18n/langs/cn.js +++ b/src/i18n/langs/cn.js @@ -384,10 +384,10 @@ const cn = { }, jobcenter: { 'RunTimes': '执行次数', - 'hosts': '主机', - 'success': '成功', - 'date': '日期', - 'time': '时间', + 'Hosts': '主机', + 'Success': '成功', + 'Date': '日期', + 'Time': '时间', 'run': '执行' }, tickets: { diff --git a/src/views/jobcenter/TaskList.vue b/src/views/jobcenter/TaskList.vue index 432e9bdaf..1946064de 100644 --- a/src/views/jobcenter/TaskList.vue +++ b/src/views/jobcenter/TaskList.vue @@ -3,8 +3,9 @@ + + diff --git a/src/views/sessions/CommandList.vue b/src/views/sessions/CommandList.vue index c3544ff95..92bcf4400 100644 --- a/src/views/sessions/CommandList.vue +++ b/src/views/sessions/CommandList.vue @@ -4,6 +4,8 @@ + + diff --git a/src/components/ListTable/formatters/index.js b/src/components/ListTable/formatters/index.js index d92f9ba0f..3af4df17e 100644 --- a/src/components/ListTable/formatters/index.js +++ b/src/components/ListTable/formatters/index.js @@ -4,3 +4,5 @@ export { default as BooleanFormatter } from './ChoicesFormatter' export { default as ActionsFormatter } from './ActionsFormatter' export { default as ExpandPreFormatter } from './ExpandPreFormatter' export { default as LengthFormatter } from './LengthFormatter' +export { default as RouterFormatter } from './RouterFormatter' +export { default as OutputExpandFormatter } from './OutputExpandFormatter' diff --git a/src/i18n/langs/cn.js b/src/i18n/langs/cn.js index 28ec59499..572729fa0 100644 --- a/src/i18n/langs/cn.js +++ b/src/i18n/langs/cn.js @@ -87,6 +87,7 @@ const cn = { 'Sessions': '会话管理', 'SessionOnline': '在线会话', 'SessionOffline': '历史会话', + 'SessionDetail': '会话详情', 'Commands': '命令记录', 'WebTerminal': 'Web终端', 'FileManager': '文件管理', @@ -380,7 +381,8 @@ const cn = { 'active': '激活中', 'alive': '在线', 'StorageConfiguration': '存储配置', - 'join': '加入' + 'join': '加入', + 'goto': '转到' }, jobcenter: { 'RunTimes': '执行次数', diff --git a/src/i18n/langs/en.js b/src/i18n/langs/en.js index 1c8d7d64c..5359545ef 100644 --- a/src/i18n/langs/en.js +++ b/src/i18n/langs/en.js @@ -18,7 +18,11 @@ const en = { 'assets': 'Assets', 'applications': 'Applications', 'perms': 'Perms', - 'sessions': 'Sessions', + 'Sessions': 'Sessions', + 'SessionOnline': 'Session Online', + 'SessionOffline': 'Session Offline', + 'SessionDetail': 'Session Detail', + 'Goto': 'Goto', 'jobcenter': 'Job Center' }, users: { @@ -289,7 +293,8 @@ const en = { 'terminate_session': 'Terminate session', 'confirm': 'Confirm', 'commands': 'Commands', - 'join': 'join' + 'join': 'join', + 'goto': 'Goto' }, setting: { 'setting': 'System Setting', diff --git a/src/router/index.js b/src/router/index.js index f2d37a8be..b946eb853 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -274,6 +274,13 @@ export const constantRoutes = [ component: () => import('@/views/sessions/CommandList'), meta: { title: 'Commands' } }, + { + path: 'sessions/:id', + name: 'SessionDetail', + component: () => import('@/views/sessions/SessionDetail'), + meta: { title: 'SessionDetail' }, + hidden: true + }, { path: 'luna', name: 'WebTerminal', diff --git a/src/views/sessions/CommandList.vue b/src/views/sessions/CommandList.vue index 92bcf4400..48c6198b7 100644 --- a/src/views/sessions/CommandList.vue +++ b/src/views/sessions/CommandList.vue @@ -5,7 +5,7 @@ + + diff --git a/src/views/sessions/SessionOfflineList.vue b/src/views/sessions/SessionOfflineList.vue index a95a88080..a422fd538 100644 --- a/src/views/sessions/SessionOfflineList.vue +++ b/src/views/sessions/SessionOfflineList.vue @@ -22,8 +22,10 @@ export default { ], columnsMeta: { index: { - type: 'index', - label: this.$t('sessions.id') + label: this.$t('sessions.id'), + formatter: function(row, column, cellValue, index) { + return { index + 1} + } }, command_amount: { label: this.$t('sessions.command') diff --git a/src/views/sessions/SessionOnlineList.vue b/src/views/sessions/SessionOnlineList.vue index 9facf05a0..fc12c2ef4 100644 --- a/src/views/sessions/SessionOnlineList.vue +++ b/src/views/sessions/SessionOnlineList.vue @@ -22,8 +22,10 @@ export default { ], columnsMeta: { index: { - type: 'index', - label: this.$t('sessions.id') + label: this.$t('sessions.id'), + formatter: function(row, column, cellValue, index) { + return { index + 1} + } }, command_amount: { label: this.$t('sessions.command')