diff --git a/src/components/ListTable/formatters/DateFormatter.vue b/src/components/ListTable/formatters/DateFormatter.vue index 07ec2c99f..31e041ae3 100644 --- a/src/components/ListTable/formatters/DateFormatter.vue +++ b/src/components/ListTable/formatters/DateFormatter.vue @@ -8,8 +8,13 @@ export default { name: 'DateFormatter', extends: BaseFormatter, data() { - const dt = new Date(this.cellValue) - const value = this.$d(dt, 'medium') + let value + if (this.cellValue) { + const dt = new Date(this.cellValue) + value = this.$d(dt, 'medium') + } else { + value = '' + } // const locale = this.$i18n.locale // const value = dt.toLocaleString(locale, { hourCycle: 'h23' }) // console.log(this.$i18n.locale) diff --git a/src/i18n/langs/cn.json b/src/i18n/langs/cn.json index 7245ff629..f8e1bfda3 100644 --- a/src/i18n/langs/cn.json +++ b/src/i18n/langs/cn.json @@ -543,7 +543,8 @@ "user": "用户", "riskLevels": { "common": "普通" - } + }, + "Monitor": "监控" }, "setting": { "ApiKeyList": "API Key 列表", diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index 65fff0537..15cfb41f2 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -543,7 +543,8 @@ "user": "Use", "riskLevels": { "common": "common" - } + }, + "Monitor": "Monitor" }, "setting": { "ApiKeyList": "Api key list", diff --git a/src/views/sessions/SessionList/BaseList.vue b/src/views/sessions/SessionList/BaseList.vue index a1447b7d4..97332a8d0 100644 --- a/src/views/sessions/SessionList/BaseList.vue +++ b/src/views/sessions/SessionList/BaseList.vue @@ -43,14 +43,27 @@ export default { return { label } } }, + user: { + showOverflowTooltip: true + }, + asset: { + showOverflowTooltip: true + }, command_amount: { - label: this.$t('sessions.command') + label: this.$t('sessions.command'), + width: '60px' }, login_from: { - label: this.$t('sessions.loginFrom') + label: this.$t('sessions.loginFrom'), + width: '110px' + }, + remote_addr: { + width: '130px' }, protocol: { label: this.$t('sessions.protocol'), + width: '60px', + sortable: false, formatter: null }, date_start: { @@ -62,7 +75,8 @@ export default { label: this.$t('sessions.duration'), formatter: function(row) { return timeOffset(row.date_start, row.date_end) - } + }, + width: '80px' }, actions: { prop: 'id', diff --git a/src/views/sessions/SessionList/OnlineList.vue b/src/views/sessions/SessionList/OnlineList.vue index 03170644b..44eccbd9d 100644 --- a/src/views/sessions/SessionList/OnlineList.vue +++ b/src/views/sessions/SessionList/OnlineList.vue @@ -31,7 +31,7 @@ export default { }, { name: 'join', - title: this.$t('sessions.join'), + title: this.$t('sessions.Monitor'), type: 'primary', can: (row, cellValue) => { return row.can_join diff --git a/src/views/xpack/Cloud/Account/AccountList.vue b/src/views/xpack/Cloud/Account/AccountList.vue index 27636cecf..c426ab0ae 100644 --- a/src/views/xpack/Cloud/Account/AccountList.vue +++ b/src/views/xpack/Cloud/Account/AccountList.vue @@ -2,7 +2,7 @@ -