diff --git a/nezha-fronted/src/assets/css/common/loading.scss b/nezha-fronted/src/assets/css/common/loading.scss index f4af96a93..426ef4fe1 100644 --- a/nezha-fronted/src/assets/css/common/loading.scss +++ b/nezha-fronted/src/assets/css/common/loading.scss @@ -8,7 +8,8 @@ height: 100%; width: 100%; position: absolute; - z-index: 2000; + // z-index: 2000; + z-index: 1000; background-color: $--background-color-empty; opacity: 0.8; margin: 0; diff --git a/nezha-fronted/src/assets/css/components/common/bottomBox/bottomBox.scss b/nezha-fronted/src/assets/css/components/common/bottomBox/bottomBox.scss index 96d42dca7..fa9023310 100644 --- a/nezha-fronted/src/assets/css/components/common/bottomBox/bottomBox.scss +++ b/nezha-fronted/src/assets/css/components/common/bottomBox/bottomBox.scss @@ -45,7 +45,7 @@ } } } - & > .bottom-panel { + & > .bottom-dashboard { padding: 15px 10px 0px 10px !important; } } @@ -190,7 +190,7 @@ transition: 0.4s height; } -.bottom-panel { +.bottom-dashboard { background-color: $--background-color-empty; height: calc(100% - 30px); } diff --git a/nezha-fronted/src/assets/css/components/common/bottomBox/panelTabNew.scss b/nezha-fronted/src/assets/css/components/common/bottomBox/dashboardTab.scss similarity index 99% rename from nezha-fronted/src/assets/css/components/common/bottomBox/panelTabNew.scss rename to nezha-fronted/src/assets/css/components/common/bottomBox/dashboardTab.scss index c607404a4..4255bd244 100644 --- a/nezha-fronted/src/assets/css/components/common/bottomBox/panelTabNew.scss +++ b/nezha-fronted/src/assets/css/components/common/bottomBox/dashboardTab.scss @@ -1,4 +1,4 @@ -.panel-tab-new { +.dashboard-tab { .panel { height: 100%; } diff --git a/nezha-fronted/src/assets/css/components/index.scss b/nezha-fronted/src/assets/css/components/index.scss index 073284802..925db1048 100644 --- a/nezha-fronted/src/assets/css/components/index.scss +++ b/nezha-fronted/src/assets/css/components/index.scss @@ -12,7 +12,7 @@ @import './common/alert/alertMessageInfo.scss'; @import './common/alert/alertDaysInfo.scss'; @import './common/bottomBox/bottomBox.scss'; -@import './common/bottomBox/panelTabNew.scss'; +@import './common/bottomBox/dashboardTab.scss'; @import './common/bottomBox/issueTab.scss'; @import './common/bottomBox/terminalLogCMDTab.scss'; @import './common/bottomBox/terminalLogMonitorTab.scss'; diff --git a/nezha-fronted/src/components/chart/chart/chart-table.vue b/nezha-fronted/src/components/chart/chart/chart-table.vue index df35bbebe..c0b01298b 100644 --- a/nezha-fronted/src/components/chart/chart/chart-table.vue +++ b/nezha-fronted/src/components/chart/chart/chart-table.vue @@ -130,7 +130,7 @@ export default { type: Object }, // 看板id - panelId: { + dashboardId: { type: Number, default: 0 }, @@ -179,7 +179,7 @@ export default { xAxis: [], theData: [] // series数据组 }, - panelIdInner: '', // 看板id=panelId,原写作chart,由set_data获取 + panelIdInner: '', // 看板id=dashboardId,原写作chart,由set_data获取 firstLoad: false, // 是否第一次加载 chartType: 'table', // 图表类型 screenModal: false, @@ -357,7 +357,7 @@ export default { this.screenPageObj.pageSize = this.pageObj.pageSize }, // 设置数据, filter区分 - setData (chartItem, seriesItem, panelId, filter, area, errorMsg) { + setData (chartItem, seriesItem, dashboardId, filter, area, errorMsg) { if (filter) { this.stableFilter = filter } @@ -416,7 +416,7 @@ export default { }) this.firstShow = true // 展示操作按键 - this.panelIdInner = panelId + this.panelIdInner = dashboardId this.storedTableData = seriesItem this.storedScreanTableData = seriesItem this.storedTableData = Object.assign([], this.storedTableData.reverse()) diff --git a/nezha-fronted/src/components/chart/chart/chartMap.vue b/nezha-fronted/src/components/chart/chart/chartMap.vue index 1665c83b0..f90059829 100644 --- a/nezha-fronted/src/components/chart/chart/chartMap.vue +++ b/nezha-fronted/src/components/chart/chart/chartMap.vue @@ -12,7 +12,7 @@
-
{{$t('panel.assetOk')}}
+
{{$t('dashboard.assetOk')}}
@@ -20,7 +20,7 @@
{{dcStat.asset.ok}}
-
{{$t('panel.assetAlarm')}}
+
{{$t('dashboard.assetAlarm')}}
@@ -31,7 +31,7 @@
-
{{$t('overall.agent')}} {{$t('config.agent.up')}}}
+
{{$t('overall.agent')}} {{$t('config.agent.up')}}
diff --git a/nezha-fronted/src/components/chart/chart/line-chart-block.vue b/nezha-fronted/src/components/chart/chart/line-chart-block.vue index 6c95fd271..78efac75f 100644 --- a/nezha-fronted/src/components/chart/chart/line-chart-block.vue +++ b/nezha-fronted/src/components/chart/chart/line-chart-block.vue @@ -220,7 +220,7 @@ export default { type: Object }, // 看板id - panelId: { + dashboardId: { type: Number, default: 0 }, @@ -254,7 +254,7 @@ export default { return function (from, type) { let code = '' switch (from) { - case this.$CONSTANTS.fromRoute.panel: + case this.$CONSTANTS.fromRoute.dashboard: if (type == 'chartToEdit') { code = '' } @@ -286,7 +286,7 @@ export default { xAxis: [], theData: [] // series数据组 }, - panelIdInner: '', // 看板id=panelId,原写作chart,由set_data获取 + panelIdInner: '', // 看板id=dashboardId,原写作chart,由set_data获取 chartName: '', firstLoad: false, // 是否第一次加载 divFirstShow: false, @@ -1018,9 +1018,9 @@ export default { delete option.yAxis.maxInterval } if (this.fromTopo) { - const panelTime = localStorage.getItem('panelTime') ? JSON.parse(localStorage.getItem('panelTime')) : ['', ''] - if (panelTime[0]) { - const numInterval = new Date(panelTime[1]).getTime() - new Date(panelTime[0]).getTime() + const dashboardTime = localStorage.getItem('dashboardTime') ? JSON.parse(localStorage.getItem('dashboardTime')) : ['', ''] + if (dashboardTime[0]) { + const numInterval = new Date(dashboardTime[1]).getTime() - new Date(dashboardTime[0]).getTime() if (numInterval >= 60 * 60 * 1000) { option.xAxis.minInterval = 20 * 60 * 1000 } else if (numInterval >= 30 * 60 * 1000 && numInterval < 60 * 60 * 1000) { @@ -1460,7 +1460,7 @@ export default { } }, // 设置数据, filter区分 - setData (chartItem, seriesItem, panelId, filter, legend, area, errorMsg) { + setData (chartItem, seriesItem, dashboardId, filter, legend, area, errorMsg) { legend && this.setColor(legend.length) legend && legend.forEach((t, i) => { t.color = this.bgColorList[i] }) this.filter.from = filter.from @@ -1486,7 +1486,7 @@ export default { this.$refs['localLoading' + this.chartIndex].startLoading() this.divFirstShow = true this.firstShow = true // 展示操作按键 - this.panelIdInner = panelId + this.panelIdInner = dashboardId this.data = chartItem this.seriesItem = seriesItem this.seriesItemScreen = seriesItem @@ -2125,9 +2125,9 @@ export default { let minInterval = '' let splitNumber = '' if (this.fromTopo) { - const panelTime = localStorage.getItem('panelTime') ? JSON.parse(localStorage.getItem('panelTime')) : ['', ''] - if (panelTime[0]) { - const numInterval = new Date(panelTime[1]).getTime() - new Date(panelTime[0]).getTime() + const dashboardTime = localStorage.getItem('dashboardTime') ? JSON.parse(localStorage.getItem('dashboardTime')) : ['', ''] + if (dashboardTime[0]) { + const numInterval = new Date(dashboardTime[1]).getTime() - new Date(dashboardTime[0]).getTime() if (numInterval >= 60 * 60 * 1000) { minInterval = 20 * 60 * 1000 } else if (numInterval >= 30 * 60 * 1000 && numInterval < 60 * 60 * 1000) { diff --git a/nezha-fronted/src/components/chart/chartList.vue b/nezha-fronted/src/components/chart/chartList.vue index e6760bada..7b27c7bac 100644 --- a/nezha-fronted/src/components/chart/chartList.vue +++ b/nezha-fronted/src/components/chart/chartList.vue @@ -107,7 +107,7 @@ export default { name: 'chartList', props: { // TODO isModel - panelId: {}, + dashboardId: {}, chartDetailInfo: Object, timeRange: Array, // 时间范围 isGroup: Boolean, @@ -231,7 +231,7 @@ export default { findItem.h = newH // bus.$emit('groupMove', this.copyDataList, this.groupInfo) } - this.$put('/visual/panel/chart/modify', { + this.$put('/visual/dashboard/chart/modify', { id: i, span: newW, height: newH @@ -338,11 +338,11 @@ export default { } }) const params = { - panelId: this.panelId, + dashboardId: this.dashboardId, charts: charts } if (charts && charts.length) { - this.$put('/visual/panel/chart/weights', params).then(() => { + this.$put('/visual/dashboard/chart/weights', params).then(() => { const position = getLayoutPosition(this.copyDataList) this.$store.commit('setChartLastPosition', position) }) @@ -480,11 +480,11 @@ export default { } }) const chartParams = { - panelId: this.panelId, + dashboardId: this.dashboardId, charts: charts } if (charts && charts.length) { - this.$put('/visual/panel/chart/weights', chartParams).then(() => { + this.$put('/visual/dashboard/chart/weights', chartParams).then(() => { if (params.cb) { params.cb() } diff --git a/nezha-fronted/src/components/chart/defaultLineData.js b/nezha-fronted/src/components/chart/defaultLineData.js index e001a0879..b5c5fed06 100644 --- a/nezha-fronted/src/components/chart/defaultLineData.js +++ b/nezha-fronted/src/components/chart/defaultLineData.js @@ -3,7 +3,7 @@ const data = { loaded: true, showHeader: true, name: '', - panelId: 1244, + dashboardId: 1244, groupId: 0, span: 4, height: 4, @@ -54,7 +54,7 @@ const data = { } ], sync: null, - panel: { + dashboard: { id: 1244, name: 'testnodata', createBy: null, @@ -71,7 +71,7 @@ const data = { group: { id: 0, name: null, - panelId: null, + dashboardId: null, groupId: null, span: null, height: null, @@ -89,7 +89,7 @@ const data = { y: null, elements: null, sync: null, - panel: null, + dashboard: null, group: null, children: null, chartNums: null, diff --git a/nezha-fronted/src/components/chart/defaultLogData.js b/nezha-fronted/src/components/chart/defaultLogData.js index 799c598f0..4419ea689 100644 --- a/nezha-fronted/src/components/chart/defaultLogData.js +++ b/nezha-fronted/src/components/chart/defaultLogData.js @@ -3,7 +3,7 @@ const data = { loaded: true, showHeader: true, name: '', - panelId: 1244, + dashboardId: 1244, groupId: 0, span: 4, height: 4, @@ -42,7 +42,7 @@ const data = { y: 12, elements: [], sync: null, - panel: { + dashboard: { id: 1244, name: 'testnodata', createBy: null, @@ -59,7 +59,7 @@ const data = { group: { id: 0, name: null, - panelId: null, + dashboardId: null, groupId: null, span: null, height: null, @@ -77,7 +77,7 @@ const data = { y: null, elements: null, sync: null, - panel: null, + dashboard: null, group: null, children: null, chartNums: null, diff --git a/nezha-fronted/src/components/chart/defaultTableData.js b/nezha-fronted/src/components/chart/defaultTableData.js index c7e1b4464..15d9395d6 100644 --- a/nezha-fronted/src/components/chart/defaultTableData.js +++ b/nezha-fronted/src/components/chart/defaultTableData.js @@ -2,7 +2,7 @@ const TableData = { id: 697356, name: 'Table', loaded: true, - panelId: 1479, + dashboardId: 1479, groupId: 0, span: 4.0, height: 3.0, @@ -41,7 +41,7 @@ const TableData = { y: 10.0, elements: [], sync: null, - panel: { + dashboard: { id: 1479, name: 'Chart Component Configuration Test', createBy: null, @@ -58,7 +58,7 @@ const TableData = { group: { id: 0, name: null, - panelId: null, + dashboardId: null, groupId: null, span: null, height: null, @@ -76,7 +76,7 @@ const TableData = { y: null, elements: null, sync: null, - panel: null, + dashboard: null, group: null, children: null, chartNums: null, diff --git a/nezha-fronted/src/components/chart/panelChart.vue b/nezha-fronted/src/components/chart/panelChart.vue index 986985a7e..5301efcd4 100644 --- a/nezha-fronted/src/components/chart/panelChart.vue +++ b/nezha-fronted/src/components/chart/panelChart.vue @@ -360,8 +360,8 @@ export default { } // assetInfo or endpointInfo let linkId = '' - if (this.from == 'panel') { - linkId = this.chartInfo.panel.link + if (this.from == 'dashboard') { + linkId = this.chartInfo.varId } else { linkId = this.chartDetailInfo.id } @@ -722,7 +722,7 @@ export default { }, chartSync () { this.loading = true - this.$post('visual/panel/chart/syncTmpl', { ids: [this.chartInfo.id] }).then(res => { + this.$post('visual/dashboard/chart/syncTmpl', { ids: [this.chartInfo.id] }).then(res => { if (res.code === 200) { this.$message.success(this.$t('tip.syncSuccess')) this.$emit('refreshPanel') diff --git a/nezha-fronted/src/components/chart/tempGroup.js b/nezha-fronted/src/components/chart/tempGroup.js index d24ee4cf7..26acdc1a7 100644 --- a/nezha-fronted/src/components/chart/tempGroup.js +++ b/nezha-fronted/src/components/chart/tempGroup.js @@ -1,7 +1,7 @@ const group = { id: -2, name: 'groupTemp', - panelId: 1346, + dashboardId: 1346, groupId: 0, span: 12, height: 1, @@ -21,9 +21,9 @@ const group = { y: 0, elements: null, sync: null, - panel: { + dashboard: { id: 1346, - name: 'panel-newChart', + name: 'dashboard-newChart', createBy: null, type: null, link: null, @@ -38,7 +38,7 @@ const group = { group: { id: 0, name: null, - panelId: null, + dashboardId: null, groupId: null, span: null, height: null, @@ -56,7 +56,7 @@ const group = { y: null, elements: null, sync: null, - panel: null, + dashboard: null, group: null, children: null, chartNums: null, diff --git a/nezha-fronted/src/components/cli/consoleNew.vue b/nezha-fronted/src/components/cli/consoleNew.vue index 47f25cdc4..734f66d5f 100644 --- a/nezha-fronted/src/components/cli/consoleNew.vue +++ b/nezha-fronted/src/components/cli/consoleNew.vue @@ -122,7 +122,6 @@ export default { let url = '' this.terminal.height = document.body.clientHeight - 100 this.terminal.width = document.body.clientWidth - console.log(this.term.cols, this.term.cols) if (this.terminal.type === 'asset') { url = baseUrl + '/terminal.ws?width=' + this.terminal.width + '&height=' + this.terminal.height + '&cols=' + this.term.cols + '&rows=' + this.term.rows + '&token=' + token + '&assetId=' + this.terminal.assetId + '&accountId=' + this.terminal.accountId + '&uuid=' + this.terminal.uuid } else if (this.terminal.type === 'custom') { diff --git a/nezha-fronted/src/components/cli/fileDirectory.vue b/nezha-fronted/src/components/cli/fileDirectory.vue index bb823d4d0..209ca5546 100644 --- a/nezha-fronted/src/components/cli/fileDirectory.vue +++ b/nezha-fronted/src/components/cli/fileDirectory.vue @@ -585,7 +585,6 @@ export default { return '-' }, resetState (type) { - console.log(type) if (type == 'sizeOrderType') { this.dateOrderType = 0 this.nameOrderType = 0 diff --git a/nezha-fronted/src/components/common/ChartDiagram/diagram.vue b/nezha-fronted/src/components/common/ChartDiagram/diagram.vue index bb87d6433..f20f96b4b 100644 --- a/nezha-fronted/src/components/common/ChartDiagram/diagram.vue +++ b/nezha-fronted/src/components/common/ChartDiagram/diagram.vue @@ -660,6 +660,7 @@ export default { initPens (data) { // 获取对应的值 给节点 连线添加对应动画 this.lineName = data.lineName ? data.lineName : this.lineName + getTopology(this.topologyIndex).setOptions({ drawingLineName: this.lineName }) this.chartGetData = [] const axiosArr = [] const promiseArr = [] @@ -673,9 +674,9 @@ export default { }) }) } - const panelTime = localStorage.getItem('panelTime') ? JSON.parse(localStorage.getItem('panelTime')) : ['', ''] - const endTime = panelTime[1] || this.filterTime[1] - const startTime = panelTime[0] || this.filterTime[0] + const dashboardTime = localStorage.getItem('dashboardTime') ? JSON.parse(localStorage.getItem('dashboardTime')) : ['', ''] + const endTime = dashboardTime[1] || this.filterTime[1] + const startTime = dashboardTime[0] || this.filterTime[0] const step = bus.getStep(startTime, endTime) data.pens && data.pens.forEach((item, index) => { this.chartGetData.push({ id: item.id, res: [] }) @@ -1635,9 +1636,8 @@ export default { // this.topologyData.data[key]=this.colorRGBtoHex(val); // getTopology(this.index).data[key]=val; // getTopology(this.index).render(); - const dataOption = getTopology(this.topologyIndex).data() - dataOption[key] = this.lineName - getTopology(this.topologyIndex).render() + getTopology(this.topologyIndex).store.data.lineName = val + getTopology(this.topologyIndex).setOptions({ drawingLineName: val }) }, notModuleIDArrChange (id) { this.notModuleIDArr = this.notModuleIDArr.filter(item => item.id !== id) diff --git a/nezha-fronted/src/components/common/bottomBox/bottomBox.vue b/nezha-fronted/src/components/common/bottomBox/bottomBox.vue index 7cc9cbb2a..3d08c6bd8 100644 --- a/nezha-fronted/src/components/common/bottomBox/bottomBox.vue +++ b/nezha-fronted/src/components/common/bottomBox/bottomBox.vue @@ -23,8 +23,6 @@ - - @@ -38,7 +36,7 @@ - + @@ -50,16 +48,16 @@ - + - + - + - + @@ -96,9 +94,8 @@ import commentsBottomTab from './tabs/commentsBottomTab' import vsysBottomTab from './tabs/vsysBottomTab' import endpointQuery from './tabs/endpointQuery' import recordRulesQuery from './tabs/recordRulesQuery' -import endpointTab from './tabs/endpointTab' import endpointTabNew from './tabs/endpointTabNew' -import panelTabNew from './tabs/panelTabNew' +import dashboardTab from './tabs/dashboardTab' import terminalLogRecordTab from './tabs/terminalLogRecordTab' import terminalLogSftpTab from './tabs/terminalLogSftpTab' import terminalLogMonitorTab from './tabs/terminalLogMonitorTab' @@ -130,7 +127,6 @@ export default { networkBottomTab, cabinetTab, alertMessageTab, - endpointTab, terminalLogRecordTab, terminalLogSftpTab, terminalLogMonitorTab, @@ -140,7 +136,7 @@ export default { endpointTabNew, alertMessageTabNew, endpointQuery, - panelTabNew, + dashboardTab, assetTab, assetSubTab, alertRuleEvalLog, @@ -198,7 +194,7 @@ export default { }, asset: { assetTabTitle: [ - { prop: 'panelTab', name: this.$t('overall.dashboard') }, + { prop: 'dashboardTab', name: this.$t('overall.dashboard') }, { prop: 'alertMessageTab', name: this.$t('overall.alert') }, { prop: 'endpointTab', name: this.$t('asset.endpoint') }, { prop: 'log', name: this.$t('dashboard.panel.chartForm.typeVal.log.label') } @@ -206,14 +202,13 @@ export default { }, module: { moduleTabTitle: [ - // { prop: 'panel', name: 'Detail' }, { prop: 'endpoint', name: this.$t('asset.endpoint') }, { prop: 'moduleAlertMessage', name: this.$t('overall.alert') } ] }, endpoint: { endpointTabTitle: [ - { prop: 'panelTab', name: this.$t('overall.dashboard') }, + { prop: 'dashboardTab', name: this.$t('overall.dashboard') }, { prop: 'endpointAlertMessage', name: this.$t('overall.alert') }, { prop: 'Metrics', name: this.$t('overall.metric') }, { prop: 'log', name: this.$t('dashboard.panel.chartForm.typeVal.log.label') } @@ -221,12 +216,12 @@ export default { }, chartTemp: { chartTempTabTitle: [ - { prop: 'panel', name: this.$t('overall.tempPrev') } + { prop: 'dashboardTab', name: this.$t('overall.tempPrev') } ] }, dashboardTemp: { dashboardTempTabTitle: [ - { prop: 'panel', name: this.$t('overall.dashboardTemp') } + { prop: 'dashboardTab', name: this.$t('overall.dashboardTemp') } ] }, alertRule: { @@ -318,7 +313,7 @@ export default { const hasProcess = this.obj && this.obj.clientState == '1' const hasVays = this.obj && this.obj.model && this.obj.model.tsgAppliance == '1' const tabs = [ - { prop: 'panelTab', name: this.$t('overall.dashboard') }, + { prop: 'dashboardTab', name: this.$t('overall.dashboard') }, { prop: 'alertMessageTab', name: this.$t('overall.alert') }, { prop: 'endpointTab', name: this.$t('asset.endpoint') }, { prop: 'log', name: this.$t('dashboard.panel.chartForm.typeVal.log.label') } @@ -339,7 +334,7 @@ export default { const config = this.obj.configs.find(c => c.type === 'logs') const hasLog = config && config.enable === 1 const tabs = [ - { prop: 'panelTab', name: this.$t('overall.dashboard') }, + { prop: 'dashboardTab', name: this.$t('overall.dashboard') }, { prop: 'endpointAlertMessage', name: this.$t('overall.alert') }, { prop: 'Metrics', name: this.$t('overall.metric') } ] diff --git a/nezha-fronted/src/components/common/bottomBox/nzBottomDataList.vue b/nezha-fronted/src/components/common/bottomBox/nzBottomDataList.vue index 9382465b9..9ff6cff3b 100644 --- a/nezha-fronted/src/components/common/bottomBox/nzBottomDataList.vue +++ b/nezha-fronted/src/components/common/bottomBox/nzBottomDataList.vue @@ -99,8 +99,8 @@ export default { subContentClass () { const className = [] switch (this.targetTab) { - case 'panelTab': - className.push('nz-table-list bottom-panel') + case 'dashboardTab': + className.push('nz-table-list bottom-dashboard') break case 'log': { className.push('bottom-log') diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTab.vue index 1d17afd0a..563e59fd4 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTab.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/alertMessageTab.vue @@ -11,10 +11,10 @@ -
{{$t("overall.detail")}}
{{$t("alert.alertMessage")}}
{{$t("asset.endpoint")}}
+
+
{{$t("overall.detail")}}
+
{{$t("alert.alertMessage")}}
+
{{$t("asset.endpoint")}}
{{$t("overall.query")}}
diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/panelTabNew.vue b/nezha-fronted/src/components/common/bottomBox/tabs/dashboardTab.vue similarity index 93% rename from nezha-fronted/src/components/common/bottomBox/tabs/panelTabNew.vue rename to nezha-fronted/src/components/common/bottomBox/tabs/dashboardTab.vue index ce7302aaf..940f5855e 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/panelTabNew.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/dashboardTab.vue @@ -1,5 +1,5 @@ @@ -52,7 +52,7 @@
- + @@ -67,8 +67,8 @@ :showLock="from === fromRoute.endpoint" class="top-tool-export margin-r-10" export-file-name="endpoint-charts" - export-url="/visual/panel/export" - import-url="/visual/panel/import" + export-url="/visual/dashboard/export" + import-url="/visual/dashboard/import" @afterImport="getTableData" :exportBoxShow="true" @export="exportType" @@ -81,7 +81,7 @@
{{ $t('overall.syncChart') }}
--> - +
{{ $t('overall.snapshoot') }}
@@ -117,7 +117,7 @@ { + this.$get('visual/dashboard?pageSize=-1').then(response => { if (response.code === 200) { this.panelData = response.data.list for (let i = 0; i < this.panelData.length; i++) { @@ -367,7 +367,7 @@ export default { addChart () { this.chart = this.newChart() this.chart.param.thresholds = [{ value: undefined, color: randomcolor() }] - this.chart.panelId = this.showPanel.id + this.chart.dashboardId = this.showPanel.id this.chart.panelName = this.showPanel.name this.$nextTick(() => { this.$refs.addChartModal.isStable = 'stable' @@ -375,7 +375,7 @@ export default { }, addChartByTemp () { this.chart = JSON.parse(JSON.stringify(this.blankChartTemp)) - this.chart.panelId = this.showPanel.id + this.chart.dashboardId = this.showPanel.id if (this.from === fromRoute.endpoint) { this.chart.varType = 2 } @@ -400,7 +400,7 @@ export default { if (refresh) { this.refresh() if (this.from === fromRoute.chartTemp) { - this.$get('/visual/panel/chart', { ids: this.obj.id }).then(res => { + this.$get('/visual/dashboard/chart', { ids: this.obj.id }).then(res => { res.data.list.forEach(item => { if (!item.children) { item.children = [] @@ -408,7 +408,7 @@ export default { }) this.panelDataList = res.data.list if (this.panelDataList.length > 0) { - this.showPanel.id = this.filter.panelId = 0 + this.showPanel.id = this.filter.dashboardId = 0 this.getData(this.filter) } else { this.chartListLoading = false @@ -426,7 +426,7 @@ export default { this.chart = JSON.parse(JSON.stringify(data)) this.chart.x = 0 this.chart.y = 0 - this.chart.panelId = this.showPanel.id + this.chart.dashboardId = this.showPanel.id this.chart.panelName = this.showPanel.name this.chart.id = '' this.chart.elements.forEach((item) => { @@ -442,12 +442,12 @@ export default { } } else { this.rightBox.loading = true - this.$get('visual/panel/chart/' + data.id).then(res => { + this.$get('visual/dashboard/chart/' + data.id).then(res => { this.rightBox.loading = false if (res.code === 200) { const chartData = res.data this.chart = JSON.parse(JSON.stringify(chartData)) - this.chart.panelId = this.showPanel.id + this.chart.dashboardId = this.showPanel.id this.chart.panelName = this.showPanel.name if (this.chart.param) { this.chart.param = JSON.parse(this.chart.param) @@ -495,7 +495,7 @@ export default { cancelButtonText: this.$t('tip.no'), type: 'warning' }).then(() => { - this.$delete('visual/panel/chart?ids=' + data.id).then(response => { + this.$delete('visual/dashboard/chart?ids=' + data.id).then(response => { if (response.code === 200) { this.$message({ duration: 2000, @@ -515,7 +515,7 @@ export default { addGroupItem (groupId) { this.chart = this.newChart() this.chart.groupId = groupId - this.chart.panelId = this.showPanel.id + this.chart.dashboardId = this.showPanel.id this.chart.panelName = this.showPanel.name this.chart.isGroup = true this.$nextTick(() => { @@ -528,7 +528,7 @@ export default { }, // 获取数据,用在子页面 getData (params) { - if (!this.hasButton('panel_view')) { + if (!this.hasButton('dashboard_view')) { return } this.chartListLoading = true @@ -541,7 +541,7 @@ export default { params.from = this.from } if (this.from !== 'chartTemp') { - this.$get('visual/panel/chart?panelId=' + params.panelId + '&groupId=0' + '&pageSize=-1').then(response => { + this.$get('visual/dashboard/chart?dashboardId=' + params.dashboardId + '&groupId=0' + '&pageSize=-1').then(response => { if (response.code === 200) { this.chartListLoading = false this.dataList = response.data.list.map(item => { @@ -569,7 +569,7 @@ export default { this.setSearchTime(nowTimeType.type, nowTimeType.value) this.filter.start_time = bus.timeFormate(this.searchTime[0]) this.filter.end_time = bus.timeFormate(this.searchTime[1]) - this.filter.panelId = this.showPanel.id + this.filter.dashboardId = this.showPanel.id this.getData(this.filter) this.$store.dispatch('dispatchPanelTime', { time: this.searchTime, @@ -612,10 +612,10 @@ export default { } else { if (this.from === this.fromRoute.chartTemp) { if (this.obj.type === 'group') { - this.$get('/visual/panel/chart', { ids: this.obj.id }).then(res => { + this.$get('/visual/dashboard/chart', { ids: this.obj.id }).then(res => { this.panelDataList = res.data.list if (this.panelDataList.length > 0) { - this.showPanel.id = this.filter.panelId = 0 + this.showPanel.id = this.filter.dashboardId = 0 this.getData(this.filter) } }) @@ -623,15 +623,15 @@ export default { } this.panelDataList = [this.obj] if (this.panelDataList.length > 0) { - this.showPanel.id = this.filter.panelId = 0 + this.showPanel.id = this.filter.dashboardId = 0 this.getData(this.filter) } } else if (this.from === this.fromRoute.dashboardTemp) { - this.$get('visual/panel', { type: 'template', ids: this.obj.id }).then(response => { + this.$get('visual/dashboard', { type: 'template', ids: this.obj.id }).then(response => { if (response.code === 200) { this.panelData = response.data.list if (this.panelData.length > 0) { - this.filter.panelId = this.panelData[0].id + this.filter.dashboardId = this.panelData[0].id this.showPanel = this.$loadsh.cloneDeep(this.panelData[0]) this.variables = this.$loadsh.get(this.panelData, '[0].param.variables') this.getData(this.filter) @@ -644,12 +644,12 @@ export default { } }) } else { - this.$get('visual/panel', { type: this.from, link: linkId || this.obj.id }).then(response => { + this.$get('visual/dashboard', { type: this.from, link: linkId || this.obj.id }).then(response => { if (response.code === 200) { this.panelData = response.data.list if (this.panelData.length > 0) { - // this.showPanel.id = this.filter.panelId = this.panelData[0].id - this.filter.panelId = this.panelData[0].id + // this.showPanel.id = this.filter.dashboardId = this.panelData[0].id + this.filter.dashboardId = this.panelData[0].id this.showPanel = this.$loadsh.cloneDeep(this.panelData[0]) this.variables = this.$loadsh.get(this.panelData, '[0].param.variables') this.getData(this.filter) @@ -773,7 +773,7 @@ export default { this.$store.dispatch('dispatchHomeLoading', true) const params = {} params.tmplId = this.showPanel.id - this.$post('visual/panel/syncTmpl', params).then(res => { + this.$post('visual/dashboard/syncTmpl', params).then(res => { this.$store.dispatch('dispatchHomeLoading', false) if (res.code === 200) { this.getTableData(this.obj.id) @@ -907,7 +907,7 @@ export default { } } }, - // 监听图表联动配置panelId + // 监听图表联动配置 'showPanel.param.chartShare': { handler (value) { // 每次切换联动模式 tooltip设置显示 diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/endpointQuery.vue b/nezha-fronted/src/components/common/bottomBox/tabs/endpointQuery.vue index fb8755c72..8cdec9f66 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/endpointQuery.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/endpointQuery.vue @@ -45,7 +45,7 @@ - +
{{$t("project.endpoint.dialogTitle")}}
@@ -216,7 +217,7 @@ export default { } }, createSuccess (type, response, param, panel) { - this.$confirm(this.$t('dashboard.metric.goPanelTip'), this.$t('tip.saveSuccess'), { + this.$confirm(this.$t('dashboard.metric.goDashboardTip'), this.$t('tip.saveSuccess'), { confirmButtonText: this.$t('tip.yes'), cancelButtonText: this.$t('tip.no'), type: 'success' @@ -225,7 +226,7 @@ export default { this.$store.state.showPanel.id = panel.id this.$store.state.showPanel.name = panel.name this.$router.push({ - path: '/panel', + path: '/dashboard', query: { t: +new Date() } diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/endpointTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/endpointTab.vue deleted file mode 100644 index 7fcfb885b..000000000 --- a/nezha-fronted/src/components/common/bottomBox/tabs/endpointTab.vue +++ /dev/null @@ -1,563 +0,0 @@ - - - diff --git a/nezha-fronted/src/components/common/detailView/nzDetailView.vue b/nezha-fronted/src/components/common/detailView/nzDetailView.vue index c03739a04..cdebc3a1e 100644 --- a/nezha-fronted/src/components/common/detailView/nzDetailView.vue +++ b/nezha-fronted/src/components/common/detailView/nzDetailView.vue @@ -52,7 +52,7 @@ v-if="detailViewRightObj" :from="from" :obj="detailViewRightObj" - :target-tab="'panelTab'" + :target-tab="'dashboardTab'" />
diff --git a/nezha-fronted/src/components/common/detailView/view/detailViewRight.vue b/nezha-fronted/src/components/common/detailView/view/detailViewRight.vue index 5c343126b..8e5bfe4ce 100644 --- a/nezha-fronted/src/components/common/detailView/view/detailViewRight.vue +++ b/nezha-fronted/src/components/common/detailView/view/detailViewRight.vue @@ -6,8 +6,6 @@ - - @@ -21,7 +19,7 @@ - + @@ -33,14 +31,14 @@ - + - + - + @@ -59,9 +57,8 @@ import assetSubTab from '@/components/common/bottomBox/tabs/assetSubTab' import commentsBottomTab from '@/components/common/bottomBox/tabs/commentsBottomTab' import vsysBottomTab from '@/components/common/bottomBox/tabs/vsysBottomTab' import endpointQuery from '@/components/common/bottomBox/tabs/endpointQuery' -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 dashboardTab from '@/components/common/bottomBox/tabs/dashboardTab' import terminalLogRecordTab from '@/components/common/bottomBox/tabs/terminalLogRecordTab' import terminalLogSftpTab from '@/components/common/bottomBox/tabs/terminalLogSftpTab' import terminalLogMonitorTab from '@/components/common/bottomBox/tabs/terminalLogMonitorTab' @@ -83,7 +80,6 @@ export default { LogBottomTab, cabinetTab, alertMessageTab, - endpointTab, terminalLogRecordTab, terminalLogSftpTab, terminalLogMonitorTab, @@ -93,7 +89,7 @@ export default { endpointTabNew, alertMessageTabNew, endpointQuery, - panelTabNew, + dashboardTab, assetTab, assetSubTab, 'detail-right-top': detailRightTop, @@ -159,7 +155,7 @@ export default { }, asset: { assetTabTitle: [ - { prop: 'panelTab', name: this.$t('overall.dashboard') }, + { prop: 'dashboardTab', name: this.$t('overall.dashboard') }, { prop: 'alertMessageTab', name: this.$t('overall.alert') }, { prop: 'endpointTab', name: this.$t('asset.endpoint') }, { prop: 'log', name: this.$t('dashboard.panel.chartForm.typeVal.log.label') } @@ -167,14 +163,13 @@ export default { }, module: { moduleTabTitle: [ - // { prop: 'panel', name: 'Detail' }, { prop: 'endpoint', name: this.$t('asset.endpoint') }, { prop: 'moduleAlertMessage', name: this.$t('overall.alert') } ] }, endpoint: { endpointTabTitle: [ - { prop: 'panelTab', name: this.$t('overall.detail') }, + { prop: 'dashboardTab', name: this.$t('overall.detail') }, { prop: 'endpointAlertMessage', name: this.$t('overall.alert') }, { prop: 'endpointQuery', name: this.$t('overall.metric') }, { prop: 'log', name: this.$t('dashboard.panel.chartForm.typeVal.log.label') } @@ -182,7 +177,7 @@ export default { }, chartTemp: { chartTempTabTitle: [ - { prop: 'panel', name: this.$t('overall.tempPrev') } + { prop: 'dashboardTab', name: this.$t('overall.tempPrev') } ] }, alertRule: { @@ -236,7 +231,7 @@ export default { const hasProcess = this.obj && this.obj.clientState == '1' const hasVays = this.obj && this.obj.model && this.obj.model.tsgAppliance == '1' const tabs = [ - { prop: 'panelTab', name: this.$t('overall.dashboard') }, + { prop: 'dashboardTab', name: this.$t('overall.dashboard') }, { prop: 'alertMessageTab', name: this.$t('overall.alert') }, { prop: 'endpointTab', name: this.$t('asset.endpoint') }, { prop: 'log', name: this.$t('dashboard.panel.chartForm.typeVal.log.label') } @@ -258,7 +253,7 @@ export default { const config = this.obj.configs.find(c => c.type === 'logs') const hasLog = config && config.enable === 1 const tabs = [ - { prop: 'panelTab', name: this.$t('overall.detail') }, + { prop: 'dashboardTab', name: this.$t('overall.detail') }, { prop: 'endpointAlertMessage', name: this.$t('overall.alert') }, { prop: 'endpointQuery', name: this.$t('overall.metrics') } ] @@ -310,9 +305,9 @@ export default { return } if (this.from === fromRoute.asset) { - this.targetTab = 'panelTab' + this.targetTab = 'dashboardTab' } else if (this.from === fromRoute.endpoint) { - this.targetTab = 'panelTab' + this.targetTab = 'dashboardTab' } else if (this.from === fromRoute.module) { this.targetTab = 'endpoint' } else if (this.from === fromRoute.alertRule) { diff --git a/nezha-fronted/src/components/common/elementSet.vue b/nezha-fronted/src/components/common/elementSet.vue index 5f491dee1..e367633db 100644 --- a/nezha-fronted/src/components/common/elementSet.vue +++ b/nezha-fronted/src/components/common/elementSet.vue @@ -1,7 +1,7 @@ -