2020-03-27 15:41:26 +08:00
|
|
|
|
<template>
|
2022-03-09 11:01:17 +08:00
|
|
|
|
<div class="sub-box bottom-box" :style="{height: isFullScreen ? '100%' : ''}">
|
2020-07-24 19:22:52 +08:00
|
|
|
|
<div class="resize-modal">
|
|
|
|
|
|
<div class="sub-list-resize-copy">一</div>
|
|
|
|
|
|
</div>
|
2020-03-29 16:33:49 +08:00
|
|
|
|
<!-- 副列表 -->
|
2020-07-24 19:22:52 +08:00
|
|
|
|
<div @mousedown="listResize" class="sub-list-resize" v-if="!isFullScreen">一</div>
|
2020-07-15 10:58:45 +08:00
|
|
|
|
<div class="sub-list">
|
|
|
|
|
|
<!--窗口大小控制-->
|
2020-03-27 15:41:26 +08:00
|
|
|
|
<div class="sub-list-window-control">
|
2020-03-29 16:33:49 +08:00
|
|
|
|
<!--退出全屏-->
|
2022-07-01 09:39:20 +08:00
|
|
|
|
<div class="window-control-btn" v-if="isFullScreen" @click="exitFullScreen" :id="from+'-bottom-exit-full'" :title="$t('dashboard.screen.exit')"><i class="nz-icon nz-icon-exit-full-screen" ></i></div>
|
2020-03-27 15:41:26 +08:00
|
|
|
|
<!--全屏-->
|
2022-07-01 09:39:20 +08:00
|
|
|
|
<div v-if="!isFullScreen" :id="from+'-bottom-full'" class="window-control-btn" @click="fullScreen" :title="$t('dashboard.screen')"><i class="nz-icon nz-icon-full-screen"></i></div>
|
2020-03-27 15:41:26 +08:00
|
|
|
|
<!--关闭-->
|
2022-07-01 09:39:20 +08:00
|
|
|
|
<div class="window-control-btn" @click="closeSubList" :id="from+'-bottom-close'" :title="$t('overall.close')"><i class="nz-icon nz-icon-close"></i></div>
|
2020-03-27 15:41:26 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
2021-04-14 18:35:42 +08:00
|
|
|
|
<!------TAB区------>
|
|
|
|
|
|
<div class="sub-list__tabs">
|
|
|
|
|
|
<!--机柜-->
|
2021-11-25 14:39:45 +08:00
|
|
|
|
<cabinet-tab v-if="from === fromRoute.dc && targetTab === 'cabinet'" :tabs="tabs.dc.cabinet" v-show="subResizeShow" :obj="obj" @changeTab="changeTab" :targetTab.sync="targetTab"></cabinet-tab>
|
|
|
|
|
|
<alertMessageTabNew v-if="from === fromRoute.dc && targetTab === 'alertMessageTab'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="tabs.dc.alertMessage" @changeTab="changeTab" :targetTab.sync="targetTab"></alertMessageTabNew>
|
2021-04-14 18:35:42 +08:00
|
|
|
|
<!--告警信息-->
|
2021-11-25 14:39:45 +08:00
|
|
|
|
<alert-message-tab v-if="((from === fromRoute.alertRule || from === fromRoute.asset || from === fromRoute.endpoint || from === fromRoute.project ) && targetTab === 'alertMessage')" v-show="subResizeShow" :from="from" :obj="obj" @changeTab="changeTab" :targetTab.sync="targetTab"></alert-message-tab>
|
2020-05-19 20:26:11 +08:00
|
|
|
|
|
2021-04-14 18:35:42 +08:00
|
|
|
|
<!--terminal-log的记录和回放-->
|
2022-11-07 09:31:36 +08:00
|
|
|
|
<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>
|
2021-11-25 14:39:45 +08:00
|
|
|
|
<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>
|
2021-03-04 16:11:11 +08:00
|
|
|
|
|
2021-11-09 11:22:52 +08:00
|
|
|
|
<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>
|
2021-04-23 20:06:58 +08:00
|
|
|
|
|
2021-04-14 18:35:42 +08:00
|
|
|
|
<!--user列表的两个日志-->
|
2021-11-25 14:39:45 +08:00
|
|
|
|
<operation-log-tab v-if="from === fromRoute.user && targetTab === 'operationLogTab'" :from="from" :obj="obj" :tabs="tabs.user.operationLog" @changeTab="changeTab" :targetTab.sync="targetTab"></operation-log-tab>
|
|
|
|
|
|
<terminal-log-tab v-if="from === fromRoute.user && targetTab === 'terminalLogTab'" :from="from" :obj="obj" :tabs="tabs.user.terminalLog" @changeTab="changeTab" :targetTab.sync="targetTab"></terminal-log-tab>
|
2021-04-26 21:42:15 +08:00
|
|
|
|
<!-- asset列表的3个 -->
|
2023-03-15 15:39:06 +08:00
|
|
|
|
<dashboard-tab @exit="closeSubList" @getTableData="getTableData" :paramsType="'asset'" v-if="from === fromRoute.asset && targetTab === 'dashboardTab'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="assetTabs" :targetTab.sync="targetTab" @changeTab="changeTab"></dashboard-tab>
|
2022-09-08 15:10:10 +08:00
|
|
|
|
<alertMessageTabNew v-if="from === fromRoute.asset && targetTab === 'alertMessageTab'" v-show="subResizeShow" :sign="sign+'alert'" :from="from" :obj="obj" :tabs="assetTabs" :targetTab.sync="targetTab" @changeTab="changeTab" ></alertMessageTabNew>
|
|
|
|
|
|
<endpointTabNew v-if="from === fromRoute.asset && targetTab === 'endpointTab'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="assetTabs" :targetTab.sync="targetTab" @changeTab="changeTab"></endpointTabNew>
|
|
|
|
|
|
<log-bottom-tab v-if="from === fromRoute.asset && targetTab === 'log'" v-show="subResizeShow" :sign="sign+'log'" :from="from" :obj="obj" :tabs="assetTabs" :targetTab.sync="targetTab" @changeTab="changeTab"></log-bottom-tab>
|
|
|
|
|
|
<process-bottom-tab v-if="from === fromRoute.asset && targetTab === 'process' && obj.clientState == '1'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="assetTabs" :targetTab.sync="targetTab" @changeTab="changeTab"></process-bottom-tab>
|
|
|
|
|
|
<assetSubTab v-if="from === fromRoute.asset && targetTab === 'assetSubTab' && obj.childrenNum" v-show="subResizeShow" :from="from" :obj="obj" :tabs="assetTabs" @changeTab="changeTab" :targetTab.sync="targetTab"></assetSubTab>
|
2022-09-16 16:11:09 +08:00
|
|
|
|
<network-bottom-tab v-if="from === fromRoute.asset && targetTab === 'network' && obj.clientState == '1'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="assetTabs" :targetTab.sync="targetTab" @changeTab="changeTab"></network-bottom-tab>
|
2022-09-20 14:35:42 +08:00
|
|
|
|
<comments-bottom-tab v-if="from === fromRoute.asset && targetTab === 'comments'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="assetTabs" @changeTab="changeTab" :targetTab.sync="targetTab"></comments-bottom-tab>
|
2022-10-11 15:59:15 +08:00
|
|
|
|
<vsys-bottom-tab v-if="from === fromRoute.asset && targetTab === 'vsys' && obj.model.tsgAppliance == '1'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="assetTabs" :targetTab.sync="targetTab" @changeTab="changeTab"></vsys-bottom-tab>
|
2021-04-20 15:31:57 +08:00
|
|
|
|
<!--module列表的tab-->
|
2021-04-26 21:42:15 +08:00
|
|
|
|
<endpointTabNew v-if="from === fromRoute.module && targetTab === 'endpoint'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="tabs.module.moduleTabTitle" :targetTab="targetTab" @changeTab="changeTab"></endpointTabNew>
|
2021-04-20 15:31:57 +08:00
|
|
|
|
<alertMessageTabNew v-if="from === fromRoute.module && targetTab === 'moduleAlertMessage'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="tabs.module.moduleTabTitle" @changeTab="changeTab" :targetTab="targetTab"></alertMessageTabNew>
|
2023-03-15 15:39:06 +08:00
|
|
|
|
<dashboard-tab @exit="closeSubList" @getTableData="getTableData" :paramsType="'module'" v-if="from === fromRoute.module && targetTab === 'dashboardTab'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="tabs.module.moduleTabTitle" :targetTab.sync="targetTab" @changeTab="changeTab"></dashboard-tab>
|
2021-04-20 15:31:57 +08:00
|
|
|
|
<!--endpoint列表的tab-->
|
2023-03-15 15:39:06 +08:00
|
|
|
|
<dashboard-tab @exit="closeSubList" v-if="from === fromRoute.endpoint && targetTab === 'dashboardTab'" v-show="subResizeShow" :from="from" :obj="obj" :paramsType="'endpoint'" :tabs="endpointTabs" :targetTab.sync="targetTab" @changeTab="changeTab" @getTableData="getTableData"></dashboard-tab>
|
2022-04-13 18:14:08 +08:00
|
|
|
|
<endpointQuery v-if="from === fromRoute.endpoint && targetTab === 'Metrics'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="endpointTabs" :targetTab.sync="targetTab" @changeTab="changeTab"></endpointQuery>
|
2022-04-13 17:09:59 +08:00
|
|
|
|
<log-bottom-tab v-if="from === fromRoute.endpoint && targetTab === 'log' && hasLogConfig" :sign="sign+'log'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="endpointTabs" :targetTab.sync="targetTab" @changeTab="changeTab"></log-bottom-tab>
|
|
|
|
|
|
<alertMessageTabNew v-if="from === fromRoute.endpoint && targetTab === 'endpointAlertMessage'" :sign="sign+'alert'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="endpointTabs" :targetTab.sync="targetTab" @changeTab="changeTab"></alertMessageTabNew>
|
2021-04-25 14:58:03 +08:00
|
|
|
|
<!--chartTemp的Tab-->
|
2023-03-15 15:39:06 +08:00
|
|
|
|
<dashboard-tab @exit="closeSubList" @getTableData="getTableData" :paramsType="'template'" v-if="from === fromRoute.chartTemp && targetTab === 'dashboardTab'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="tabs.chartTemp.chartTempTabTitle" :targetTab.sync="targetTab" @changeTab="changeTab"></dashboard-tab>
|
2022-11-22 19:16:59 +08:00
|
|
|
|
<!--dashboardTemp的Tab-->
|
2023-03-15 15:39:06 +08:00
|
|
|
|
<dashboard-tab @exit="closeSubList" @getTableData="getTableData" :paramsType="'template'" v-if="from === fromRoute.dashboardTemp && targetTab === 'dashboardTab'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="tabs.dashboardTemp.dashboardTempTabTitle" :targetTab.sync="targetTab" @changeTab="changeTab"></dashboard-tab>
|
2021-05-08 18:08:32 +08:00
|
|
|
|
<!--alertRule Tab-->
|
2021-11-02 18:34:00 +08:00
|
|
|
|
<alertMessageTabNew v-if="from === fromRoute.alertRule && targetTab === 'alertRuleAlertMessage'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="tabs.alertRule.alertRule" @changeTab="changeTab" :targetTab.sync="targetTab"></alertMessageTabNew>
|
|
|
|
|
|
<alertRuleEvalLog v-if="from === fromRoute.alertRule && targetTab === 'evalLog'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="tabs.alertRule.alertRule" @changeTab="changeTab" :targetTab.sync="targetTab"></alertRuleEvalLog>
|
2021-05-14 17:09:57 +08:00
|
|
|
|
<!--model 下滑-->
|
2021-11-09 11:22:52 +08:00
|
|
|
|
<asset-tab v-if="(from === fromRoute.model) && targetTab === 'asset'" :tabs="tabs.model" ref="assetTab" :from="from" :obj="obj" @changeTab="changeTab" @exit="closeSubList" :targetTab.sync="targetTab"></asset-tab>
|
2022-01-14 09:17:53 +08:00
|
|
|
|
<!-- agent 下滑-->
|
2023-01-13 15:29:53 +08:00
|
|
|
|
<scrape-endpoint v-if="from === fromRoute.agent && targetTab === 'scrapeEndpoint'" :from="from" :obj="obj" :tabs="tabs.agent.scrapeEndpoint" @changeTab="changeTab" :targetTab.sync="targetTab"></scrape-endpoint>
|
|
|
|
|
|
<cortex-detail v-if="from === fromRoute.agent && targetTab === 'cortexDetail'" :from="from" :obj="obj" :tabs="tabs.agent.cortexDetail" @changeTab="changeTab" :targetTab.sync="targetTab"></cortex-detail>
|
2023-02-02 13:54:10 +08:00
|
|
|
|
<loki-status v-if="from === fromRoute.agent && targetTab === 'lokiStatus'" :from="from" :obj="obj" :tabs="tabs.agent.lokiStatus" @changeTab="changeTab" :targetTab.sync="targetTab"></loki-status>
|
2022-03-16 15:55:19 +08:00
|
|
|
|
<!-- ipam -->
|
|
|
|
|
|
<ip-details v-if="from === fromRoute.ipam && targetTab === 'ipam'" :from="from" :obj="obj" :tabs="tabs.ipam" @changeTab="changeTab" :targetTab.sync="targetTab"></ip-details>
|
2022-08-08 09:09:08 +08:00
|
|
|
|
<!-- recordRule 下滑-->
|
2022-11-03 10:17:57 +08:00
|
|
|
|
<record-rule-eval-log v-if="from === fromRoute.recordRule && targetTab === 'recordRule'" :from="from" :obj="obj" :tabs="tabs.recordRule.evalLog" @changeTab="changeTab" :targetTab.sync="targetTab"></record-rule-eval-log>
|
|
|
|
|
|
<recordRulesQuery v-if="from === fromRoute.recordRule && targetTab === 'Metrics'" :from="from" :obj="obj" :tabs="tabs.recordRule.Metrics" @changeTab="changeTab" :targetTab.sync="targetTab"></recordRulesQuery>
|
2022-03-18 09:20:44 +08:00
|
|
|
|
<!--alertRule Tab-->
|
|
|
|
|
|
<alertMessageTabNew v-if="from === fromRoute.alertSilence && targetTab === 'alertMessageTab'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="tabs.alertSilence" @changeTab="changeTab" :targetTab.sync="targetTab"></alertMessageTabNew>
|
2023-03-07 15:51:02 +08:00
|
|
|
|
<!--roles Tab-->
|
|
|
|
|
|
<roles-tab v-if="from === fromRoute.role && targetTab === 'roles'" :from="from" :obj="obj" :tabs="tabs.role" @changeTab="changeTab" :targetTab.sync="targetTab"></roles-tab>
|
2022-08-30 16:48:17 +08:00
|
|
|
|
<!--issue Tab-->
|
2022-11-22 19:16:59 +08:00
|
|
|
|
<!-- <issueTab v-if="from === fromRoute.issue && targetTab === 'issue'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="tabs.alertSilence" @changeTab="changeTab" :targetTab.sync="targetTab"></issueTab> -->
|
2021-04-14 18:35:42 +08:00
|
|
|
|
</div>
|
2020-03-27 15:41:26 +08:00
|
|
|
|
</div>
|
2020-07-15 10:58:45 +08:00
|
|
|
|
</div>
|
2020-03-27 15:41:26 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2021-03-19 18:52:19 +08:00
|
|
|
|
import cabinetTab from './tabs/cabinetTab'
|
|
|
|
|
|
import alertMessageTab from './tabs/alertMessageTab'
|
2021-04-20 15:31:57 +08:00
|
|
|
|
import alertMessageTabNew from './tabs/alertMessageTabNew'
|
2022-08-30 16:48:17 +08:00
|
|
|
|
import issueTab from './tabs/issueTab'
|
2021-11-02 18:34:00 +08:00
|
|
|
|
import alertRuleEvalLog from './tabs/alertRuleEvalLog'
|
2021-07-15 14:38:55 +08:00
|
|
|
|
import assetSubTab from './tabs/assetSubTab'
|
2022-09-20 14:35:42 +08:00
|
|
|
|
import commentsBottomTab from './tabs/commentsBottomTab'
|
2022-10-08 10:16:09 +08:00
|
|
|
|
import vsysBottomTab from './tabs/vsysBottomTab'
|
2021-04-20 19:27:49 +08:00
|
|
|
|
import endpointQuery from './tabs/endpointQuery'
|
2022-11-03 10:17:57 +08:00
|
|
|
|
import recordRulesQuery from './tabs/recordRulesQuery'
|
2021-04-20 14:38:24 +08:00
|
|
|
|
import endpointTabNew from './tabs/endpointTabNew'
|
2023-03-15 15:39:06 +08:00
|
|
|
|
import dashboardTab from './tabs/dashboardTab'
|
2021-03-19 18:52:19 +08:00
|
|
|
|
import terminalLogRecordTab from './tabs/terminalLogRecordTab'
|
2022-11-07 09:31:36 +08:00
|
|
|
|
import terminalLogSftpTab from './tabs/terminalLogSftpTab'
|
2021-03-19 18:52:19 +08:00
|
|
|
|
import terminalLogMonitorTab from './tabs/terminalLogMonitorTab'
|
|
|
|
|
|
import terminalLogCMDTab from './tabs/terminalLogCMDTab'
|
2021-04-08 20:28:54 +08:00
|
|
|
|
import operationLogTab from './tabs/operationLogTab'
|
|
|
|
|
|
import terminalLogTab from './tabs/terminalLogTab'
|
2021-04-25 15:00:01 +08:00
|
|
|
|
import assetTab from '@/components/common/bottomBox/tabs/assetTab'
|
2021-04-08 20:28:54 +08:00
|
|
|
|
import { fromRoute } from '@/components/common/js/constants'
|
2021-08-05 22:25:55 +08:00
|
|
|
|
import LogBottomTab from '@/components/common/bottomBox/tabs/logBottomTab'
|
2022-09-08 15:10:10 +08:00
|
|
|
|
import processBottomTab from '@/components/common/bottomBox/tabs/processBottomTab'
|
2022-09-15 09:30:32 +08:00
|
|
|
|
import networkBottomTab from '@/components/common/bottomBox/tabs/networkBottomTab'
|
2022-01-14 09:17:53 +08:00
|
|
|
|
import scrapeEndpoint from '@/components/common/bottomBox/tabs/scrapeEndpoint'
|
2023-01-13 15:29:53 +08:00
|
|
|
|
import cortexDetail from '@/components/common/bottomBox/tabs/cortexDetail'
|
2023-02-02 13:54:10 +08:00
|
|
|
|
import lokiStatus from '@/components/common/bottomBox/tabs/lokiStatus'
|
2023-03-07 15:51:02 +08:00
|
|
|
|
import rolesTab from '@/components/common/bottomBox/tabs/rolesTab'
|
2022-03-16 15:55:19 +08:00
|
|
|
|
import IpDetails from '@/components/common/bottomBox/tabs/IpDetails'
|
2022-08-08 09:09:08 +08:00
|
|
|
|
import recordRuleEvalLog from '@/components/common/bottomBox/tabs/recordRuleEvalLog'
|
2022-09-05 15:35:32 +08:00
|
|
|
|
import routerPathParams from '@/components/common/mixin/routerPathParams'
|
2020-03-27 15:41:26 +08:00
|
|
|
|
|
2021-03-19 18:52:19 +08:00
|
|
|
|
export default {
|
|
|
|
|
|
name: 'bottomBox',
|
2022-09-05 15:35:32 +08:00
|
|
|
|
mixins: [routerPathParams],
|
2021-03-19 18:52:19 +08:00
|
|
|
|
components: {
|
2022-01-14 09:17:53 +08:00
|
|
|
|
scrapeEndpoint,
|
2023-01-13 15:29:53 +08:00
|
|
|
|
cortexDetail,
|
2023-02-02 13:54:10 +08:00
|
|
|
|
lokiStatus,
|
2021-08-05 22:25:55 +08:00
|
|
|
|
LogBottomTab,
|
2022-09-08 15:10:10 +08:00
|
|
|
|
processBottomTab,
|
2022-09-15 09:30:32 +08:00
|
|
|
|
networkBottomTab,
|
2021-04-08 20:28:54 +08:00
|
|
|
|
cabinetTab,
|
|
|
|
|
|
alertMessageTab,
|
2021-03-19 18:52:19 +08:00
|
|
|
|
terminalLogRecordTab,
|
2022-11-07 09:31:36 +08:00
|
|
|
|
terminalLogSftpTab,
|
2021-04-08 20:28:54 +08:00
|
|
|
|
terminalLogMonitorTab,
|
|
|
|
|
|
operationLogTab,
|
|
|
|
|
|
terminalLogTab,
|
2021-04-20 14:38:24 +08:00
|
|
|
|
'terminal-log-cmd-tab': terminalLogCMDTab,
|
2021-04-20 15:31:57 +08:00
|
|
|
|
endpointTabNew,
|
2021-04-20 19:27:49 +08:00
|
|
|
|
alertMessageTabNew,
|
2021-04-22 11:47:24 +08:00
|
|
|
|
endpointQuery,
|
2023-03-15 15:39:06 +08:00
|
|
|
|
dashboardTab,
|
2021-07-15 14:38:55 +08:00
|
|
|
|
assetTab,
|
2021-11-02 18:34:00 +08:00
|
|
|
|
assetSubTab,
|
2022-03-16 15:55:19 +08:00
|
|
|
|
alertRuleEvalLog,
|
2022-08-08 09:09:08 +08:00
|
|
|
|
IpDetails,
|
2022-08-30 16:48:17 +08:00
|
|
|
|
recordRuleEvalLog,
|
2022-11-03 10:17:57 +08:00
|
|
|
|
recordRulesQuery,
|
2022-09-20 14:35:42 +08:00
|
|
|
|
issueTab,
|
2022-10-08 10:16:09 +08:00
|
|
|
|
commentsBottomTab,
|
2023-03-07 15:51:02 +08:00
|
|
|
|
vsysBottomTab,
|
|
|
|
|
|
rolesTab
|
2021-03-19 18:52:19 +08:00
|
|
|
|
},
|
|
|
|
|
|
props: {
|
|
|
|
|
|
isFullScreen: Boolean, // 是否全屏
|
|
|
|
|
|
subResizeShow: Boolean, // resize时,用v-show="subResizeShow"控制页面内容是否显示
|
|
|
|
|
|
obj: Object, // 关联的实体对象
|
|
|
|
|
|
from: String, // 来自哪个页面
|
|
|
|
|
|
tabList: Array, // 动态页签列表
|
2022-04-14 11:51:57 +08:00
|
|
|
|
targetTab: String, // 展示哪个页签
|
2022-08-08 09:09:08 +08:00
|
|
|
|
sign: [Number, String] // pickTime历史记录的唯一标识
|
2021-07-15 14:38:55 +08:00
|
|
|
|
},
|
|
|
|
|
|
watch: {
|
|
|
|
|
|
obj: {
|
|
|
|
|
|
immediate: true,
|
|
|
|
|
|
handler (n) {
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2021-03-19 18:52:19 +08:00
|
|
|
|
},
|
|
|
|
|
|
data () {
|
2021-04-08 20:28:54 +08:00
|
|
|
|
return {
|
2021-04-14 18:35:42 +08:00
|
|
|
|
fromRoute: fromRoute,
|
|
|
|
|
|
tabs: {
|
2021-04-29 22:24:38 +08:00
|
|
|
|
terminalLog: {
|
|
|
|
|
|
monitor: [
|
|
|
|
|
|
{ prop: 'monitorTab', name: this.$t('config.terminallog.monitor.monitor'), active: true }
|
|
|
|
|
|
]
|
2022-11-07 09:31:36 +08:00
|
|
|
|
// // 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 }
|
|
|
|
|
|
// // ]
|
2021-04-29 22:24:38 +08:00
|
|
|
|
},
|
2021-04-14 18:35:42 +08:00
|
|
|
|
user: {
|
|
|
|
|
|
operationLog: [
|
2022-12-28 10:12:34 +08:00
|
|
|
|
{ prop: 'operationLogTab', name: this.$t('profile.operationRecord'), active: true },
|
|
|
|
|
|
{ prop: 'terminalLogTab', name: this.$t('overall.terminallog'), active: false }
|
2021-04-14 18:35:42 +08:00
|
|
|
|
],
|
|
|
|
|
|
terminalLog: [
|
2022-12-28 10:12:34 +08:00
|
|
|
|
{ prop: 'operationLogTab', name: this.$t('profile.operationRecord'), active: false },
|
|
|
|
|
|
{ prop: 'terminalLogTab', name: this.$t('overall.terminallog'), active: true }
|
2021-04-20 15:31:57 +08:00
|
|
|
|
]
|
|
|
|
|
|
// module tab
|
|
|
|
|
|
},
|
2021-04-26 21:42:15 +08:00
|
|
|
|
asset: {
|
2022-09-08 15:10:10 +08:00
|
|
|
|
assetTabTitle: [
|
2023-03-15 15:39:06 +08:00
|
|
|
|
{ prop: 'dashboardTab', name: this.$t('overall.dashboard') },
|
2022-09-08 15:10:10 +08:00
|
|
|
|
{ prop: 'alertMessageTab', name: this.$t('overall.alert') },
|
|
|
|
|
|
{ prop: 'endpointTab', name: this.$t('asset.endpoint') },
|
2023-03-17 12:46:56 +08:00
|
|
|
|
{ prop: 'log', name: this.$t('dashboard.dashboard.chartForm.typeVal.log.label') }
|
2021-04-26 21:42:15 +08:00
|
|
|
|
]
|
|
|
|
|
|
},
|
2021-04-20 15:31:57 +08:00
|
|
|
|
module: {
|
2021-04-20 14:38:24 +08:00
|
|
|
|
moduleTabTitle: [
|
2021-04-25 16:28:09 +08:00
|
|
|
|
{ prop: 'endpoint', name: this.$t('asset.endpoint') },
|
2021-05-14 17:50:06 +08:00
|
|
|
|
{ prop: 'moduleAlertMessage', name: this.$t('overall.alert') }
|
2021-04-20 15:31:57 +08:00
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
endpoint: {
|
|
|
|
|
|
endpointTabTitle: [
|
2023-03-15 15:39:06 +08:00
|
|
|
|
{ prop: 'dashboardTab', name: this.$t('overall.dashboard') },
|
2021-08-25 16:05:33 +08:00
|
|
|
|
{ prop: 'endpointAlertMessage', name: this.$t('overall.alert') },
|
2022-06-21 18:14:21 +08:00
|
|
|
|
{ prop: 'Metrics', name: this.$t('overall.metric') },
|
2023-03-17 12:46:56 +08:00
|
|
|
|
{ prop: 'log', name: this.$t('dashboard.dashboard.chartForm.typeVal.log.label') }
|
2021-04-14 18:35:42 +08:00
|
|
|
|
]
|
2021-04-25 14:58:03 +08:00
|
|
|
|
},
|
|
|
|
|
|
chartTemp: {
|
|
|
|
|
|
chartTempTabTitle: [
|
2023-03-15 15:39:06 +08:00
|
|
|
|
{ prop: 'dashboardTab', name: this.$t('overall.tempPrev') }
|
2021-04-25 14:58:03 +08:00
|
|
|
|
]
|
2021-04-25 15:00:01 +08:00
|
|
|
|
},
|
2022-11-22 19:16:59 +08:00
|
|
|
|
dashboardTemp: {
|
|
|
|
|
|
dashboardTempTabTitle: [
|
2023-03-15 15:39:06 +08:00
|
|
|
|
{ prop: 'dashboardTab', name: this.$t('overall.dashboardTemp') }
|
2022-11-22 19:16:59 +08:00
|
|
|
|
]
|
|
|
|
|
|
},
|
2021-05-08 18:08:32 +08:00
|
|
|
|
alertRule: {
|
|
|
|
|
|
alertRule: [
|
2021-11-02 18:34:00 +08:00
|
|
|
|
{ prop: 'alertRuleAlertMessage', name: this.$t('overall.alert') },
|
|
|
|
|
|
{ prop: 'evalLog', name: this.$t('overall.alertRuleEvalLog') }
|
2021-05-08 18:08:32 +08:00
|
|
|
|
]
|
|
|
|
|
|
},
|
2021-05-14 17:09:57 +08:00
|
|
|
|
model: [
|
2022-06-21 11:29:55 +08:00
|
|
|
|
{ prop: 'asset', name: this.$t('asset.asset'), active: true }
|
2021-05-14 17:09:57 +08:00
|
|
|
|
],
|
2021-04-23 20:06:58 +08:00
|
|
|
|
dc: {
|
|
|
|
|
|
cabinet: [
|
2022-06-16 15:58:17 +08:00
|
|
|
|
{ prop: 'cabinet', name: this.$t('asset.cabinet'), active: true },
|
2022-06-21 11:29:55 +08:00
|
|
|
|
{ prop: 'asset', name: this.$t('asset.asset'), active: false },
|
2021-05-08 09:40:53 +08:00
|
|
|
|
{ prop: 'alertMessageTab', name: this.$t('overall.alert'), active: false }
|
2021-04-23 20:06:58 +08:00
|
|
|
|
],
|
2021-04-25 15:00:01 +08:00
|
|
|
|
asset: [
|
2022-06-16 15:58:17 +08:00
|
|
|
|
{ prop: 'cabinet', name: this.$t('asset.cabinet'), active: false },
|
2022-06-21 11:29:55 +08:00
|
|
|
|
{ prop: 'asset', name: this.$t('asset.asset'), active: true },
|
2021-05-08 09:40:53 +08:00
|
|
|
|
{ prop: 'alertMessageTab', name: this.$t('overall.alert'), active: false }
|
|
|
|
|
|
],
|
|
|
|
|
|
alertMessage: [
|
2022-06-16 15:58:17 +08:00
|
|
|
|
{ prop: 'cabinet', name: this.$t('asset.cabinet'), active: false },
|
2022-06-21 11:29:55 +08:00
|
|
|
|
{ prop: 'asset', name: this.$t('asset.asset'), active: false },
|
2021-05-08 09:40:53 +08:00
|
|
|
|
{ prop: 'alertMessageTab', name: this.$t('overall.alert'), active: true }
|
2021-04-23 20:06:58 +08:00
|
|
|
|
]
|
2022-01-14 09:17:53 +08:00
|
|
|
|
},
|
2023-01-13 15:29:53 +08:00
|
|
|
|
agent: {
|
|
|
|
|
|
scrapeEndpoint: [
|
|
|
|
|
|
{ prop: 'scrapeEndpoint', name: this.$t('config.agent.scrapeEndpoint'), active: true },
|
2023-02-02 13:54:10 +08:00
|
|
|
|
{ prop: 'cortexDetail', name: this.$t('config.agent.cortexDetail'), active: false },
|
|
|
|
|
|
{ prop: 'lokiStatus', name: this.$t('config.agent.lokiStatus'), active: false }
|
2023-01-13 15:29:53 +08:00
|
|
|
|
],
|
|
|
|
|
|
cortexDetail: [
|
|
|
|
|
|
{ prop: 'scrapeEndpoint', name: this.$t('config.agent.scrapeEndpoint'), active: false },
|
2023-02-02 13:54:10 +08:00
|
|
|
|
{ prop: 'cortexDetail', name: this.$t('config.agent.cortexDetail'), active: true },
|
|
|
|
|
|
{ prop: 'lokiStatus', name: this.$t('config.agent.lokiStatus'), active: false }
|
|
|
|
|
|
],
|
|
|
|
|
|
lokiStatus: [
|
|
|
|
|
|
{ prop: 'scrapeEndpoint', name: this.$t('config.agent.scrapeEndpoint'), active: false },
|
|
|
|
|
|
{ prop: 'cortexDetail', name: this.$t('config.agent.cortexDetail'), active: false },
|
|
|
|
|
|
{ prop: 'lokiStatus', name: this.$t('config.agent.lokiStatus'), active: true }
|
2023-01-13 15:29:53 +08:00
|
|
|
|
]
|
|
|
|
|
|
},
|
2022-03-16 15:55:19 +08:00
|
|
|
|
ipam: [
|
2022-03-21 18:07:26 +08:00
|
|
|
|
{ prop: 'ipam', name: this.$t('ipam.subnet.ipDetails'), active: true }
|
2022-03-18 09:20:44 +08:00
|
|
|
|
],
|
2022-11-03 10:17:57 +08:00
|
|
|
|
recordRule: {
|
|
|
|
|
|
Metrics: [
|
2022-11-22 16:34:56 +08:00
|
|
|
|
{ prop: 'Metrics', name: this.$t('overall.metric'), active: true },
|
|
|
|
|
|
{ prop: 'recordRule', name: this.$t('overall.alertRuleEvalLog'), active: false }
|
|
|
|
|
|
],
|
|
|
|
|
|
evalLog: [
|
|
|
|
|
|
{ prop: 'Metrics', name: this.$t('overall.metric'), active: false },
|
|
|
|
|
|
{ prop: 'recordRule', name: this.$t('overall.alertRuleEvalLog'), active: true }
|
2022-11-03 10:17:57 +08:00
|
|
|
|
]
|
|
|
|
|
|
},
|
2022-03-18 09:20:44 +08:00
|
|
|
|
alertSilence: [
|
2022-03-21 18:07:26 +08:00
|
|
|
|
{ prop: 'alertMessageTab', name: this.$t('overall.alert'), active: true }
|
2022-08-30 16:48:17 +08:00
|
|
|
|
],
|
2023-03-07 15:51:02 +08:00
|
|
|
|
role: [
|
|
|
|
|
|
{ prop: 'userTab', name: this.$t('config.operationlog.username'), active: true }
|
|
|
|
|
|
],
|
2022-08-30 16:48:17 +08:00
|
|
|
|
issue: [
|
2022-09-07 10:19:50 +08:00
|
|
|
|
// { prop: 'issue', name: this.$t('overall.issue'), active: true }
|
2022-01-14 09:17:53 +08:00
|
|
|
|
]
|
2021-04-14 18:35:42 +08:00
|
|
|
|
}
|
2021-04-08 20:28:54 +08:00
|
|
|
|
}
|
2021-03-19 18:52:19 +08:00
|
|
|
|
},
|
2021-08-06 17:20:36 +08:00
|
|
|
|
computed: {
|
2022-11-07 09:31:36 +08:00
|
|
|
|
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
|
|
|
|
|
|
},
|
2021-08-06 17:20:36 +08:00
|
|
|
|
hasLogConfig () {
|
|
|
|
|
|
const config = this.obj.configs.find(c => c.type === 'logs')
|
|
|
|
|
|
return config && config.enable === 1
|
|
|
|
|
|
},
|
2022-09-08 15:10:10 +08:00
|
|
|
|
assetTabs () {
|
|
|
|
|
|
const hasSub = this.obj && this.obj.childrenNum
|
|
|
|
|
|
const hasProcess = this.obj && this.obj.clientState == '1'
|
2022-12-01 10:44:09 +08:00
|
|
|
|
const hasVays = this.obj && this.obj.model && this.obj.model.tsgAppliance == '1'
|
2022-09-08 15:10:10 +08:00
|
|
|
|
const tabs = [
|
2023-03-15 15:39:06 +08:00
|
|
|
|
{ prop: 'dashboardTab', name: this.$t('overall.dashboard') },
|
2022-09-08 15:10:10 +08:00
|
|
|
|
{ prop: 'alertMessageTab', name: this.$t('overall.alert') },
|
|
|
|
|
|
{ prop: 'endpointTab', name: this.$t('asset.endpoint') },
|
2023-03-17 12:46:56 +08:00
|
|
|
|
{ prop: 'log', name: this.$t('dashboard.dashboard.chartForm.typeVal.log.label') }
|
2022-09-08 15:10:10 +08:00
|
|
|
|
]
|
|
|
|
|
|
if (hasSub) {
|
|
|
|
|
|
tabs.push({ prop: 'assetSubTab', name: this.$t('overall.assetSubTab') })
|
|
|
|
|
|
}
|
|
|
|
|
|
if (hasProcess) {
|
2022-09-16 16:11:09 +08:00
|
|
|
|
tabs.push({ prop: 'process', name: this.$t('overall.process') }, { prop: 'network', name: this.$t('overall.network') })
|
2022-09-08 15:10:10 +08:00
|
|
|
|
}
|
2022-09-20 14:35:42 +08:00
|
|
|
|
tabs.push({ prop: 'comments', name: this.$t('overall.comments') })
|
2022-10-08 10:16:09 +08:00
|
|
|
|
if (hasVays) {
|
|
|
|
|
|
tabs.push({ prop: 'vsys', name: this.$t('asset.vsys') })
|
|
|
|
|
|
}
|
2022-09-08 15:10:10 +08:00
|
|
|
|
return tabs
|
|
|
|
|
|
},
|
2021-08-06 17:20:36 +08:00
|
|
|
|
endpointTabs () {
|
|
|
|
|
|
const config = this.obj.configs.find(c => c.type === 'logs')
|
|
|
|
|
|
const hasLog = config && config.enable === 1
|
|
|
|
|
|
const tabs = [
|
2023-03-15 15:39:06 +08:00
|
|
|
|
{ prop: 'dashboardTab', name: this.$t('overall.dashboard') },
|
2021-08-25 16:05:33 +08:00
|
|
|
|
{ prop: 'endpointAlertMessage', name: this.$t('overall.alert') },
|
2022-06-21 18:14:21 +08:00
|
|
|
|
{ prop: 'Metrics', name: this.$t('overall.metric') }
|
2021-08-06 17:20:36 +08:00
|
|
|
|
]
|
|
|
|
|
|
if (hasLog) {
|
2023-03-17 12:46:56 +08:00
|
|
|
|
tabs.push({ prop: 'log', name: this.$t('dashboard.dashboard.chartForm.typeVal.log.label') })
|
2021-08-06 17:20:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
return tabs
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2021-03-19 18:52:19 +08:00
|
|
|
|
methods: {
|
|
|
|
|
|
exitFullScreen () {
|
|
|
|
|
|
this.$emit('exitFullScreen')
|
|
|
|
|
|
this.$nextTick(() => { this.afterResize() })
|
2020-03-27 15:41:26 +08:00
|
|
|
|
},
|
2021-03-19 18:52:19 +08:00
|
|
|
|
fullScreen () {
|
|
|
|
|
|
this.$emit('fullScreen')
|
|
|
|
|
|
this.$nextTick(() => { this.afterResize() })
|
2020-03-27 15:41:26 +08:00
|
|
|
|
},
|
2021-03-19 18:52:19 +08:00
|
|
|
|
closeSubList () {
|
|
|
|
|
|
this.$emit('closeSubList')
|
|
|
|
|
|
},
|
|
|
|
|
|
listResize (e) {
|
2022-10-10 10:19:14 +08:00
|
|
|
|
this.$emit('listResize', e, this.afterResize)
|
2021-03-19 18:52:19 +08:00
|
|
|
|
this.$nextTick(() => { this.afterResize() })
|
2020-11-20 11:19:25 +08:00
|
|
|
|
},
|
2021-03-19 18:52:19 +08:00
|
|
|
|
changeTab (tab) {
|
|
|
|
|
|
this.$emit('update:targetTab', tab)
|
2022-09-05 15:35:32 +08:00
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
|
this.updatePath(this.$route.query, this.$route.path, 'bottomBox')
|
|
|
|
|
|
})
|
2021-03-19 18:52:19 +08:00
|
|
|
|
},
|
|
|
|
|
|
afterResize () {
|
2021-04-08 20:28:54 +08:00
|
|
|
|
if (this.from === this.fromRoute.endpoint && this.targetTab === 'endpointQuery') {
|
2021-03-19 18:52:19 +08:00
|
|
|
|
this.$refs.endpointQuery.tableReload()
|
2022-10-17 14:34:56 +08:00
|
|
|
|
} else if (this.from === this.fromRoute.terminalLog && this.targetTab === 'recordTab') {
|
2021-03-19 18:52:19 +08:00
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
this.$refs.reminalLogRecordTab.consoleResize()
|
|
|
|
|
|
}, 600)
|
|
|
|
|
|
}
|
2022-10-10 10:19:14 +08:00
|
|
|
|
const subListDom = document.querySelector('.sub-list') // 副列表
|
|
|
|
|
|
if (subListDom.offsetHeight < 505) {
|
|
|
|
|
|
this.$store.dispatch('dispatchTimeBoxClass', 'date-range-panel--top')
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.$store.dispatch('dispatchTimeBoxClass', '')
|
|
|
|
|
|
}
|
2021-07-29 16:23:15 +08:00
|
|
|
|
},
|
|
|
|
|
|
getTableData () {
|
|
|
|
|
|
this.$emit('getTableData')
|
2021-03-19 18:52:19 +08:00
|
|
|
|
}
|
2022-10-10 10:19:14 +08:00
|
|
|
|
},
|
|
|
|
|
|
beforeDestroy () {
|
|
|
|
|
|
this.$store.dispatch('dispatchTimeBoxClass', '')
|
2020-03-27 15:41:26 +08:00
|
|
|
|
}
|
2021-03-19 18:52:19 +08:00
|
|
|
|
}
|
2020-03-27 15:41:26 +08:00
|
|
|
|
</script>
|