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 62d6569ce..a3db4e393 100644
--- a/nezha-fronted/src/components/chart/panelChart.vue
+++ b/nezha-fronted/src/components/chart/panelChart.vue
@@ -359,8 +359,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
}
@@ -718,7 +718,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/common/ChartDiagram/diagram.vue b/nezha-fronted/src/components/common/ChartDiagram/diagram.vue
index bb87d6433..7f3f62bbd 100644
--- a/nezha-fronted/src/components/common/ChartDiagram/diagram.vue
+++ b/nezha-fronted/src/components/common/ChartDiagram/diagram.vue
@@ -673,9 +673,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: [] })
diff --git a/nezha-fronted/src/components/common/bottomBox/bottomBox.vue b/nezha-fronted/src/components/common/bottomBox/bottomBox.vue
index 5db71b662..9a7e70843 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 @@
-
+
-
+
-
+
-
+
@@ -94,9 +92,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'
@@ -127,7 +124,6 @@ export default {
networkBottomTab,
cabinetTab,
alertMessageTab,
- endpointTab,
terminalLogRecordTab,
terminalLogSftpTab,
terminalLogMonitorTab,
@@ -137,7 +133,7 @@ export default {
endpointTabNew,
alertMessageTabNew,
endpointQuery,
- panelTabNew,
+ dashboardTab,
assetTab,
assetSubTab,
alertRuleEvalLog,
@@ -194,7 +190,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') }
@@ -202,14 +198,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') }
@@ -217,12 +212,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: {
@@ -311,7 +306,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') }
@@ -332,7 +327,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 @@
{{obj.host}}
{{obj.alertName}}
{{$t("project.endpoint.endpointId")}}: {{obj ? obj.id : ''}}
-