diff --git a/nezha-fronted/src/components/common/bottomBox/bottomBox.vue b/nezha-fronted/src/components/common/bottomBox/bottomBox.vue
index 1ef73098a..d0c772817 100644
--- a/nezha-fronted/src/components/common/bottomBox/bottomBox.vue
+++ b/nezha-fronted/src/components/common/bottomBox/bottomBox.vue
@@ -27,8 +27,9 @@
-
-
+
+
+
@@ -93,6 +94,7 @@ import endpointTab from './tabs/endpointTab'
import endpointTabNew from './tabs/endpointTabNew'
import panelTabNew from './tabs/panelTabNew'
import terminalLogRecordTab from './tabs/terminalLogRecordTab'
+import terminalLogSftpTab from './tabs/terminalLogSftpTab'
import terminalLogMonitorTab from './tabs/terminalLogMonitorTab'
import terminalLogCMDTab from './tabs/terminalLogCMDTab'
import operationLogTab from './tabs/operationLogTab'
@@ -119,6 +121,7 @@ export default {
alertMessageTab,
endpointTab,
terminalLogRecordTab,
+ terminalLogSftpTab,
terminalLogMonitorTab,
operationLogTab,
terminalLogTab,
@@ -160,15 +163,15 @@ export default {
terminalLog: {
monitor: [
{ prop: 'monitorTab', name: this.$t('config.terminallog.monitor.monitor'), active: true }
- ],
- cmd: [
- { prop: 'cmdTab', name: this.$t('config.terminallog.cmd.cmd'), active: true },
- { prop: 'recordTab', name: this.$t('config.terminallog.record.record'), active: false }
- ],
- record: [
- { prop: 'cmdTab', name: this.$t('config.terminallog.cmd.cmd'), active: false },
- { prop: 'recordTab', name: this.$t('config.terminallog.record.record'), active: true }
]
+ // // cmd: [
+ // // { prop: 'cmdTab', name: this.$t('config.terminallog.cmd.cmd'), active: true },
+ // // { prop: 'recordTab', name: this.$t('config.terminallog.record.record'), active: false }
+ // // ],
+ // // record: [
+ // // { prop: 'cmdTab', name: this.$t('config.terminallog.cmd.cmd'), active: false },
+ // // { prop: 'recordTab', name: this.$t('config.terminallog.record.record'), active: true }
+ // // ]
},
user: {
operationLog: [
@@ -261,6 +264,17 @@ export default {
}
},
computed: {
+ hasTerminalLogTabs () {
+ const hasSftp = this.obj && this.obj.protocol == 'SSH'
+ const tabs = [
+ { prop: 'cmdTab', name: this.$t('config.terminallog.cmd.cmd') },
+ { prop: 'recordTab', name: this.$t('config.terminallog.record.record') }
+ ]
+ if (hasSftp) {
+ tabs.splice(1, 0, { prop: 'sftpTab', name: 'SFTP ' })
+ }
+ return tabs
+ },
hasLogConfig () {
const config = this.obj.configs.find(c => c.type === 'logs')
return config && config.enable === 1
diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/terminalLogCMDTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/terminalLogCMDTab.vue
index 27d0c6631..6083074bd 100644
--- a/nezha-fronted/src/components/common/bottomBox/tabs/terminalLogCMDTab.vue
+++ b/nezha-fronted/src/components/common/bottomBox/tabs/terminalLogCMDTab.vue
@@ -93,7 +93,8 @@ export default {
records: [ // 加载更多时有多个record,否则只有一个
],
- tableId: 'terminaLogCMDTab'
+ tableId: 'terminaLogCMDTab',
+ detailType: 'list'
}
},
methods: {
diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/terminalLogRecordTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/terminalLogRecordTab.vue
index 0e545d601..82572c30c 100644
--- a/nezha-fronted/src/components/common/bottomBox/tabs/terminalLogRecordTab.vue
+++ b/nezha-fronted/src/components/common/bottomBox/tabs/terminalLogRecordTab.vue
@@ -78,7 +78,8 @@ export default {
speedOffset: 0, // 快进倍数index
progress: 0, // 进度条进度
needSkip: true, // 是否跳过无操作时间,为true时表示需要,即不跳过无操作时间
- timeUsed: 0
+ timeUsed: 0,
+ detailType: 'list'
}
},
methods: {
diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/terminalLogSftpTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/terminalLogSftpTab.vue
new file mode 100644
index 000000000..3254e153c
--- /dev/null
+++ b/nezha-fronted/src/components/common/bottomBox/tabs/terminalLogSftpTab.vue
@@ -0,0 +1,109 @@
+
+
+ {{obj.uuid.substring(0, 8).toUpperCase()}}
+
+
+
+
+
+
+
diff --git a/nezha-fronted/src/components/common/detailView/view/detailViewRight.vue b/nezha-fronted/src/components/common/detailView/view/detailViewRight.vue
index feafee828..8978e4afd 100644
--- a/nezha-fronted/src/components/common/detailView/view/detailViewRight.vue
+++ b/nezha-fronted/src/components/common/detailView/view/detailViewRight.vue
@@ -10,8 +10,9 @@
-
-
+
+
+
@@ -62,6 +63,7 @@ import endpointTab from '@/components/common/bottomBox/tabs/endpointTab'
import endpointTabNew from '@/components/common/bottomBox/tabs/endpointTabNew'
import panelTabNew from '@/components/common/bottomBox/tabs/panelTabNew'
import terminalLogRecordTab from '@/components/common/bottomBox/tabs/terminalLogRecordTab'
+import terminalLogSftpTab from '@/components/common/bottomBox/tabs/terminalLogSftpTab'
import terminalLogMonitorTab from '@/components/common/bottomBox/tabs/terminalLogMonitorTab'
import terminalLogCMDTab from '@/components/common/bottomBox/tabs/terminalLogCMDTab'
import operationLogTab from '@/components/common/bottomBox/tabs/operationLogTab'
@@ -83,6 +85,7 @@ export default {
alertMessageTab,
endpointTab,
terminalLogRecordTab,
+ terminalLogSftpTab,
terminalLogMonitorTab,
operationLogTab,
terminalLogTab,
@@ -133,15 +136,15 @@ export default {
terminalLog: {
monitor: [
{ prop: 'monitorTab', name: this.$t('config.terminallog.monitor.monitor'), active: true }
- ],
- cmd: [
- { prop: 'cmdTab', name: this.$t('config.terminallog.cmd.cmd'), active: true },
- { prop: 'recordTab', name: this.$t('config.terminallog.record.record'), active: false }
- ],
- record: [
- { prop: 'cmdTab', name: this.$t('config.terminallog.cmd.cmd'), active: false },
- { prop: 'recordTab', name: this.$t('config.terminallog.record.record'), active: true }
]
+ // cmd: [
+ // { prop: 'cmdTab', name: this.$t('config.terminallog.cmd.cmd'), active: true },
+ // { prop: 'recordTab', name: this.$t('config.terminallog.record.record'), active: false }
+ // ],
+ // record: [
+ // { prop: 'cmdTab', name: this.$t('config.terminallog.cmd.cmd'), active: false },
+ // { prop: 'recordTab', name: this.$t('config.terminallog.record.record'), active: true }
+ // ]
},
user: {
operationLog: [
@@ -213,6 +216,17 @@ export default {
}
},
computed: {
+ hasTerminalLogTabs () {
+ const hasSftp = this.obj && this.obj.protocol == 'SSH'
+ const tabs = [
+ { prop: 'cmdTab', name: this.$t('config.terminallog.cmd.cmd') },
+ { prop: 'recordTab', name: this.$t('config.terminallog.record.record') }
+ ]
+ if (hasSftp) {
+ tabs.splice(1, 0, { prop: 'sftpTab', name: 'SFTP ' })
+ }
+ return tabs
+ },
hasLogConfig () {
const config = this.obj.configs.find(c => c.type === 'logs')
return config && config.enable === 1
diff --git a/nezha-fronted/src/components/common/mixin/dataList.js b/nezha-fronted/src/components/common/mixin/dataList.js
index a9da10084..c2fa0414b 100644
--- a/nezha-fronted/src/components/common/mixin/dataList.js
+++ b/nezha-fronted/src/components/common/mixin/dataList.js
@@ -1323,10 +1323,12 @@ export default {
}
let localStorageTableTitle = localStorage.getItem('nz-tableTitle-' + localStorage.getItem('nz-username') + '-' + this.tableId)
localStorageTableTitle = localStorageTableTitle ? JSON.parse(localStorageTableTitle) : tableTitle
- this.tools.customTableTitle = tableTitle.map((item, index) => { // 修复切换中英文的问题
- item.show = localStorageTableTitle[index].show
- return item
- })
+ if (tableTitle) {
+ this.tools.customTableTitle = tableTitle.map((item, index) => { // 修复切换中英文的问题
+ item.show = localStorageTableTitle[index].show
+ return item
+ })
+ }
if (localStorageTableTitle && (localStorageTableTitle.length > tableTitle.length)) {
const arr = localStorageTableTitle.splice(tableTitle.length, localStorageTableTitle.length)
arr.forEach(item => {
diff --git a/nezha-fronted/src/components/common/mixin/routerPathParams.js b/nezha-fronted/src/components/common/mixin/routerPathParams.js
index ab5ff4417..ef85cebf9 100644
--- a/nezha-fronted/src/components/common/mixin/routerPathParams.js
+++ b/nezha-fronted/src/components/common/mixin/routerPathParams.js
@@ -68,6 +68,7 @@ export default {
configs: this.$refs[detailType].bottomBox.object.configs ? this.$refs[detailType].bottomBox.object.configs.map(item => { return { type: item.type, enable: item.enable } }) : '',
childrenNum: this.$refs[detailType].bottomBox.object.childrenNum || '',
clientState: this.$refs[detailType].bottomBox.object.clientState || '',
+ protocol: this.$refs[detailType].bottomBox.object.protocol || '',
model: {
tsgAppliance: this.$refs[detailType].bottomBox.object.model ? this.$refs[detailType].bottomBox.object.model.tsgAppliance : ''
}
@@ -80,6 +81,7 @@ export default {
configs: this.$refs[detailType].detailViewRightObj.configs ? this.$refs[detailType].detailViewRightObj.configs.map(item => { return { type: item.type, enable: item.enable } }) : '',
childrenNum: this.$refs[detailType].detailViewRightObj.childrenNum || '',
clientState: this.$refs[detailType].detailViewRightObj.clientState || '',
+ protocol: this.$refs[detailType].detailViewRightObj.protocol || '',
model: {
tsgAppliance: this.$refs[detailType].detailViewRightObj.model ? this.$refs[detailType].detailViewRightObj.model.tsgAppliance : ''
}
@@ -96,6 +98,7 @@ export default {
configs: this.bottomBox.object.configs ? this.bottomBox.object.configs.map(item => { return { type: item.type, enable: item.enable } }) : '',
childrenNum: this.bottomBox.object.childrenNum || '',
clientState: this.bottomBox.object.clientState || '',
+ protocol: this.bottomBox.object.protocol || '',
model: {
tsgAppliance: this.bottomBox.object.model ? this.bottomBox.object.model.tsgAppliance : ''
}
@@ -109,6 +112,7 @@ export default {
configs: this.detailViewRightObj.configs ? this.detailViewRightObj.configs.map(item => { return { type: item.type, enable: item.enable } }) : '',
childrenNum: this.detailViewRightObj.childrenNum || '',
clientState: this.detailViewRightObj.clientState || '',
+ protocol: this.detailViewRightObj.protocol || '',
model: {
tsgAppliance: this.detailViewRightObj.model ? this.detailViewRightObj.model.tsgAppliance : ''
}
diff --git a/nezha-fronted/src/components/common/table/settings/terminalLogSftpTable.vue b/nezha-fronted/src/components/common/table/settings/terminalLogSftpTable.vue
new file mode 100644
index 000000000..5dee7a1f8
--- /dev/null
+++ b/nezha-fronted/src/components/common/table/settings/terminalLogSftpTable.vue
@@ -0,0 +1,108 @@
+
+ {queryMessage(row)}"
+ >
+
+
+ {{item.label}}
+
+
+
+
+ {{scope.row[item.prop] ? scope.row[item.prop] : '-'}}
+
+
+ {{scope.row[item.prop] ? momentTz(scope.row[item.prop]) : '-'}}
+
+ {{scope.row[item.prop] ? scope.row[item.prop] : '-'}}
+ -
+
+
+
+
+
+
No results found
+
+
+
+
+
+
+
+