diff --git a/nezha-fronted/src/assets/stylus/main.scss b/nezha-fronted/src/assets/stylus/main.scss index 27ecd2ede..da620227e 100644 --- a/nezha-fronted/src/assets/stylus/main.scss +++ b/nezha-fronted/src/assets/stylus/main.scss @@ -2031,5 +2031,7 @@ li{ top:50%; width:100%; text-align:center; - color:#52545c; + color: #909399; + font-family: NotoSans !important; + font-size: 12px !important; } diff --git a/nezha-fronted/src/components/charts/chart-list.vue b/nezha-fronted/src/components/charts/chart-list.vue index a82818b28..c43752c6e 100644 --- a/nezha-fronted/src/components/charts/chart-list.vue +++ b/nezha-fronted/src/components/charts/chart-list.vue @@ -542,64 +542,8 @@ const param = { panelId: params.panelId, query: params.query, - from: params.from }; if (!param.query) delete param.query; - //alert-rule单独处理 - if (param.from == "alertRule") { - this.dataList = []; - this.dataList.push({ - id: -10, - panelId: 0, - title: this.$t("alert.config.chart.alertRuleInfo"), - span: 4, - height: 350, - type: "alertRuleInfo", - prev: 0, - next: -9, - buildIn: 1 - }); - this.dataList.push({ - id: -9, - panelId: 0, - title: this.$t("alert.config.chart.alertNumTrend"), - span: 4, - height: 350, - type: "line", - prev: -10, - next: -8, - buildIn: 1, - elements: [{ - id: '', - expression: `nz_alert_nums{id="${this.alertRuleDetail[0].value}"}`, - type: '' - }] - }); - this.dataList.push({ - id: -8, - panelId: 0, - title: this.$t("dashboard.panel.chartForm.statistics"), - span: 4, - height: 350, - type: "bar", - prev: -9, - next: -1, - buildIn: 1, - elements: [{ - id: '', - expression: "", - type: '' - }] - }); - this.$nextTick(() => { - this.dataList.forEach((item,index) => { - this.setChartSize(item, index);//设置该图表宽度 - let chartBox = document.getElementById('chart-' + item.id); - this.handleElementInViewport(chartBox, 0, item, index); - }); - }); - return; - } //根据panelId获得panel下的所有图表 this.$get('panel/'+ params.panelId+'/charts').then(response => { if (response.code === 200) { @@ -736,10 +680,6 @@ this.getAlertListChartData(chartItem,filterType); return; } - if(chartItem.type === 'alertRuleInfo'){ - this.getAlertRuleChartData(chartItem); - return; - } if (this.isModel) { this.modelStaticData(chartInfo, filterType); } else { @@ -1035,7 +975,7 @@ document.querySelector('body').appendChild(html); width = document.querySelector('.getTextWidth').offsetWidth; document.querySelector('.getTextWidth').remove(); - return Number('-'+width); + return Number('-'+(width+5)); }, modelStaticData(chartInfo, filterType) { let series = []; @@ -1311,15 +1251,12 @@ getAlertListChartData:function(chartInfo,filterType){ this.$refs['editChart'+chartInfo.id][0].getAlertList(filterType); }, - getAlertRuleChartData(chartInfo) { - this.$refs['editChart'+chartInfo.id][0].setData(chartInfo); - }, // 设置图表的尺寸 setChartSize(item, index) { this.$nextTick(() => { let chartBox = document.getElementById("chart-" + item.id); chartBox.style.width = `${(item.span / 12) * 100}%`; - chartBox.style.height = `${Math.round(item.height/this.$chartResizeTool.stepHeight)*this.$chartResizeTool.stepHeight}px`; + chartBox.style.height = `${item.height}px`; }); }, getNewTime(time, num) { diff --git a/nezha-fronted/src/components/charts/chart-single-stat.vue b/nezha-fronted/src/components/charts/chart-single-stat.vue index a72ddb9b2..7e858dd60 100644 --- a/nezha-fronted/src/components/charts/chart-single-stat.vue +++ b/nezha-fronted/src/components/charts/chart-single-stat.vue @@ -43,7 +43,7 @@
{{serieSingleStat}} -
No data
+
No Data
@@ -59,7 +59,7 @@
{{serieSingleStat}} -
No data
+
No Data
diff --git a/nezha-fronted/src/components/charts/chartPreview.vue b/nezha-fronted/src/components/charts/chartPreview.vue index d644cf7fd..e73e677c5 100644 --- a/nezha-fronted/src/components/charts/chartPreview.vue +++ b/nezha-fronted/src/components/charts/chartPreview.vue @@ -78,7 +78,7 @@ diff --git a/nezha-fronted/src/components/charts/line-chart-block.vue b/nezha-fronted/src/components/charts/line-chart-block.vue index a6ca9fb2f..b92b8b67b 100644 --- a/nezha-fronted/src/components/charts/line-chart-block.vue +++ b/nezha-fronted/src/components/charts/line-chart-block.vue @@ -42,7 +42,7 @@
-
No data
+
No Data
{{item.alias?item.alias:item.name}} @@ -78,7 +78,7 @@
-
No data
+
No Data
{{item.alias?item.alias:item.name}} @@ -1247,7 +1247,7 @@ document.querySelector('body').appendChild(html); width = document.querySelector('.getTextWidth').offsetWidth; document.querySelector('.getTextWidth').remove(); - return Number('-'+width); + return Number('-'+(width+5)); }, showLoad(chartItem) { //设置高度 diff --git a/nezha-fronted/src/components/common/rightBox/assetBox.vue b/nezha-fronted/src/components/common/rightBox/assetBox.vue index 55ab0252f..e04b57bfa 100644 --- a/nezha-fronted/src/components/common/rightBox/assetBox.vue +++ b/nezha-fronted/src/components/common/rightBox/assetBox.vue @@ -127,7 +127,7 @@ {{assetData.purchaseDate}} -
+
{{$t('asset.createAssetTab.location')}}
diff --git a/nezha-fronted/src/components/page/asset/accountConfig.vue b/nezha-fronted/src/components/page/asset/accountConfig.vue index 50ea37f63..55101957d 100644 --- a/nezha-fronted/src/components/page/asset/accountConfig.vue +++ b/nezha-fronted/src/components/page/asset/accountConfig.vue @@ -49,7 +49,7 @@ -
+
diff --git a/nezha-fronted/src/components/page/dashboard/overview/chart.vue b/nezha-fronted/src/components/page/dashboard/overview/chart.vue index fc42ff8bd..d6299c727 100644 --- a/nezha-fronted/src/components/page/dashboard/overview/chart.vue +++ b/nezha-fronted/src/components/page/dashboard/overview/chart.vue @@ -5,7 +5,7 @@
{{chartTitle}}
-
No data
+
No Data