NEZ-2358 feat :teminal sftp 二级页面开发
This commit is contained in:
@@ -27,8 +27,9 @@
|
||||
<endpoint-tab v-if="from === fromRoute.asset && targetTab === fromRoute.endpoint" v-show="subResizeShow" :from="from" :obj="obj" @changeTab="changeTab" :targetTab.sync="targetTab"></endpoint-tab>
|
||||
|
||||
<!--terminal-log的记录和回放-->
|
||||
<terminal-log-cmd-tab v-if="from === fromRoute.terminalLog && targetTab === 'cmdTab'" :from="from" :obj="obj" :tabs="tabs.terminalLog.cmd" @changeTab="changeTab" :targetTab.sync="targetTab"></terminal-log-cmd-tab>
|
||||
<terminal-log-record-tab v-if="from === fromRoute.terminalLog && targetTab === 'recordTab'" ref="reminalLogRecordTab" :from="from" :obj="obj" :tabs="tabs.terminalLog.record" @changeTab="changeTab" :targetTab.sync="targetTab"></terminal-log-record-tab>
|
||||
<terminal-log-cmd-tab v-if="from === fromRoute.terminalLog && targetTab === 'cmdTab'" :from="from" :obj="obj" :tabs="hasTerminalLogTabs" @changeTab="changeTab" :targetTab.sync="targetTab"></terminal-log-cmd-tab>
|
||||
<terminal-log-sftp-tab v-if="from === fromRoute.terminalLog && targetTab === 'sftpTab' && obj.protocol == 'SSH'" :from="from" :obj="obj" :tabs="hasTerminalLogTabs" @changeTab="changeTab" :targetTab.sync="targetTab"></terminal-log-sftp-tab>
|
||||
<terminal-log-record-tab v-if="from === fromRoute.terminalLog && targetTab === 'recordTab'" ref="reminalLogRecordTab" :from="from" :obj="obj" :tabs="hasTerminalLogTabs" @changeTab="changeTab" :targetTab.sync="targetTab"></terminal-log-record-tab>
|
||||
<terminal-log-monitor-tab v-if="from === fromRoute.terminalLog && targetTab === 'monitorTab'" :from="from" :obj="obj" :tabs="tabs.terminalLog.monitor" @changeTab="changeTab" @exit="closeSubList" :targetTab.sync="targetTab"></terminal-log-monitor-tab>
|
||||
|
||||
<asset-tab v-if="from === fromRoute.dc && targetTab === 'asset'" :tabs="tabs.dc.asset" ref="assetTab" :from="from" :obj="obj" @changeTab="changeTab" @exit="closeSubList" :targetTab.sync="targetTab"></asset-tab>
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user