diff --git a/src/components/ListTable/formatters/OutputExpandFormatter.vue b/src/components/ListTable/formatters/OutputExpandFormatter.vue new file mode 100644 index 000000000..1594ff04f --- /dev/null +++ b/src/components/ListTable/formatters/OutputExpandFormatter.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/src/components/ListTable/formatters/RouterFormatter.vue b/src/components/ListTable/formatters/RouterFormatter.vue new file mode 100644 index 000000000..062ab04fa --- /dev/null +++ b/src/components/ListTable/formatters/RouterFormatter.vue @@ -0,0 +1,23 @@ + + + + + diff --git a/src/components/ListTable/formatters/index.js b/src/components/ListTable/formatters/index.js index 8aeb390f9..986d906b1 100644 --- a/src/components/ListTable/formatters/index.js +++ b/src/components/ListTable/formatters/index.js @@ -5,14 +5,7 @@ import ActionsFormatter from './ActionsFormatter' import ExpandPreFormatter from './ExpandPreFormatter' import LengthFormatter from './LengthFormatter' -// export { default as DetailFormatter } from './DetailFormatter' -// export { default as DisplayFormatter } from './DisplayFormatter' -// 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 const modules = { +export default { DetailFormatter, DisplayFormatter, BooleanFormatter, @@ -21,7 +14,6 @@ export const modules = { LengthFormatter } -export default modules export { DetailFormatter, DisplayFormatter, diff --git a/src/i18n/langs/cn.js b/src/i18n/langs/cn.js index 77947aa81..d69f95f84 100644 --- a/src/i18n/langs/cn.js +++ b/src/i18n/langs/cn.js @@ -90,6 +90,7 @@ const cn = { 'Sessions': '会话管理', 'SessionOnline': '在线会话', 'SessionOffline': '历史会话', + 'SessionDetail': '会话详情', 'Commands': '命令记录', 'WebTerminal': 'Web终端', 'FileManager': '文件管理', @@ -384,14 +385,15 @@ const cn = { 'active': '激活中', 'alive': '在线', 'StorageConfiguration': '存储配置', - 'join': '加入' + 'join': '加入', + 'goto': '转到' }, jobcenter: { 'RunTimes': '执行次数', - 'hosts': '主机', - 'success': '成功', - 'date': '日期', - 'time': '时间', + 'Hosts': '主机', + 'Success': '成功', + 'Date': '日期', + 'Time': '时间', 'run': '执行' }, tickets: { 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 06d452745..7f99f0113 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/jobcenter/TaskList.vue b/src/views/jobcenter/TaskList.vue index 432e9bdaf..1c08ea5bc 100644 --- a/src/views/jobcenter/TaskList.vue +++ b/src/views/jobcenter/TaskList.vue @@ -3,8 +3,9 @@ + + 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')