diff --git a/src/components/Table/TableFormatters/DetailFormatter.vue b/src/components/Table/TableFormatters/DetailFormatter.vue index ddd2dc405..786593e51 100644 --- a/src/components/Table/TableFormatters/DetailFormatter.vue +++ b/src/components/Table/TableFormatters/DetailFormatter.vue @@ -30,6 +30,7 @@ export default { routeQuery: null, can: true, openInNewPage: false, + openLink: null, getTitle({ col, row, cellValue }) { return cellValue }, @@ -100,7 +101,15 @@ export default { methods: { goDetail() { if (this.formatterArgs.openInNewPage) { - const { href } = this.$router.resolve(this.detailRoute) + console.log(this.detailRoute) + let { href } = this.$router.resolve(this.detailRoute) + if (this.formatterArgs.openLink && typeof this.formatterArgs.openLink === 'function') { + href = this.formatterArgs.openLink({ + row: this.row, + col: this.col, + cellValue: this.cellValue + }) + } window.open(href, '_blank') } else { this.$router.push(this.detailRoute) diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index c717067c6..d74ae27bf 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -1513,6 +1513,7 @@ "riskLevels": { "common": "common" }, + "position": "Position", "SessionID": "Session ID", "TargetResources": "Target resources", "UseProtocol": "Use protocol", diff --git a/src/i18n/langs/ja.json b/src/i18n/langs/ja.json index b4ab63593..e4a0b8dd9 100644 --- a/src/i18n/langs/ja.json +++ b/src/i18n/langs/ja.json @@ -1508,6 +1508,7 @@ "riskLevels": { "common": "普通" }, + "position": "位置", "SessionID": "セッションID", "TargetResources": "ターゲットリソース", "UseProtocol": "使用契約", diff --git a/src/i18n/langs/zh.json b/src/i18n/langs/zh.json index f52127525..797c4adbe 100644 --- a/src/i18n/langs/zh.json +++ b/src/i18n/langs/zh.json @@ -1501,6 +1501,7 @@ "riskLevels": { "common": "普通" }, + "position": "定位", "SessionID": "会话ID", "TargetResources": "目标资源", "UseProtocol": "使用协议", diff --git a/src/layout/components/NavHeader/About.vue b/src/layout/components/NavHeader/About.vue index 9ae74b016..4df233132 100644 --- a/src/layout/components/NavHeader/About.vue +++ b/src/layout/components/NavHeader/About.vue @@ -81,7 +81,7 @@ export default { }, { label: this.$t('common.Version'), - value: 'version-dev' + value: 'v3.6.2' }, { label: this.$t('common.PermissionCompany'), diff --git a/src/views/sessions/CommandList.vue b/src/views/sessions/CommandList.vue index 747bd6d3e..6c4dc2f27 100644 --- a/src/views/sessions/CommandList.vue +++ b/src/views/sessions/CommandList.vue @@ -49,7 +49,7 @@ export default { }, columns: [ 'expandCol', 'input', 'risk_level', 'user', 'remote_addr', - 'asset', 'account', 'session', 'timestamp' + 'asset', 'account', 'session', 'replay', 'timestamp' ], extraQuery: { date_to: dateTo, @@ -86,7 +86,6 @@ export default { session: { label: this.$t('sessions.session'), formatter: DetailFormatter, - width: '80px', formatterArgs: { openInNewPage: true, can: this.$hasPerm('terminal.view_session'), @@ -101,6 +100,20 @@ export default { } } }, + replay: { + label: this.$t('sessions.replay'), + formatter: DetailFormatter, + formatterArgs: { + openInNewPage: true, + can: this.$hasPerm('terminal.view_session'), + getTitle() { + return vm.$t('sessions.position') + }, + openLink({ row }) { + return '/luna/replay/' + row.session + '?start_at=' + row.timestamp + } + } + }, timestamp: { label: this.$t('sessions.date'), width: '150px',