diff --git a/nezha-fronted/src/components/chart/chart/chartGroup.vue b/nezha-fronted/src/components/chart/chart/chartGroup.vue index 922ffa0dd..f803437bc 100644 --- a/nezha-fronted/src/components/chart/chart/chartGroup.vue +++ b/nezha-fronted/src/components/chart/chart/chartGroup.vue @@ -6,7 +6,7 @@ :class="{'show-top':showTopBtn}" :data-list="dataList" :nowTimeType="nowTimeType" - :from="fromRoute.panel" + :from="from" :panel-lock="panelLock" :isGroup="true" :time-range="searchTime" @@ -25,6 +25,7 @@ export default { name: 'chart-group', props: { panelLock: Boolean, + from: String }, mixins: [chartMixin, chartFormat], computed: { @@ -54,6 +55,7 @@ export default { handler (n) { console.log(n) this.$nextTick(() => { + console.log(this.from) this.dataList = JSON.parse(JSON.stringify(n)) }) } diff --git a/nezha-fronted/src/components/chart/chartList.vue b/nezha-fronted/src/components/chart/chartList.vue index 617d934fd..f851dbb37 100644 --- a/nezha-fronted/src/components/chart/chartList.vue +++ b/nezha-fronted/src/components/chart/chartList.vue @@ -14,7 +14,7 @@ :vertical-compact="true" :useCssTransforms="false" :style="{ - 'margin-top':isGroup ? '0' : (-1 * (stepWidth + 12) + 'px') + 'margin-top':isGroup ? '0' : (-1 * (stepWidth +( from !== fromRoute.panel ? 36 : 14 )) + 'px') }" > { this.chartData = res.data }) + break } if (this.chartInfo.type === 'endpointInfo') { this.$get('monitor/endpoint/' + this.chartDetailInfo.id).then(res => { this.chartData = res.data }) + break } - break - } - case 'logs': { let urlPre = '' if (this.chartInfo.datasource === 'metrics') { urlPre += '/prom' @@ -293,6 +296,7 @@ export default { }, mounted () { this.getChartData() + console.log(this.from,this.chartInfo.type) } } diff --git a/nezha-fronted/src/components/chart/tempGroup.js b/nezha-fronted/src/components/chart/tempGroup.js index d5954dd13..f608c0071 100644 --- a/nezha-fronted/src/components/chart/tempGroup.js +++ b/nezha-fronted/src/components/chart/tempGroup.js @@ -7,7 +7,7 @@ const group = { height: 1, updateBy: 1, updateAt: '2021-12-13 08:20:04', - type: 'groupTemp', + type: 'group', unit: 2, weight: 4, param: { diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/panelTabNew.vue b/nezha-fronted/src/components/common/bottomBox/tabs/panelTabNew.vue index 0148ac39c..7802ec6a1 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/panelTabNew.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/panelTabNew.vue @@ -105,7 +105,7 @@ :class="{'show-top':showTopBtn}" :data-list="dataList" :nowTimeType="nowTimeType" - :from="fromRoute.panel" + :from="from" :panel-lock="panelLock" :time-range="searchTime" @edit-chart="editChart" @@ -120,7 +120,22 @@ - + + @@ -129,7 +144,8 @@