diff --git a/nezha-fronted/src/components/charts/chart.scss b/nezha-fronted/src/components/charts/chart.scss index 8615a73b1..1f6b555ab 100644 --- a/nezha-fronted/src/components/charts/chart.scss +++ b/nezha-fronted/src/components/charts/chart.scss @@ -208,7 +208,6 @@ .resize-box { .pagination { padding-top: 0; - overflow: hidden; } .success { background-color: #50d050; @@ -224,6 +223,7 @@ } .chart-table, .chart-alert-info { width: 100%; + overflow-x: hidden; .table-container { padding: 0 6px; box-sizing: border-box; diff --git a/nezha-fronted/src/components/common/elementSet.vue b/nezha-fronted/src/components/common/elementSet.vue index 0f1d31900..ec02d5365 100644 --- a/nezha-fronted/src/components/common/elementSet.vue +++ b/nezha-fronted/src/components/common/elementSet.vue @@ -91,7 +91,7 @@ export default { //单选 handler(val, index) { if (!this.allowedAll&&!val.allowed && (index == 0 || index == 1 || val.NotSet)) { - this.custom[index].show = true; + // this.custom[index].show = true; } else { this.custom[index].show = !this.custom[index].show; } diff --git a/nezha-fronted/src/components/common/leftMenu.vue b/nezha-fronted/src/components/common/leftMenu.vue index efdb7e305..3bce9cf6f 100644 --- a/nezha-fronted/src/components/common/leftMenu.vue +++ b/nezha-fronted/src/components/common/leftMenu.vue @@ -88,7 +88,7 @@ - + + +
+
+ + {{$t("dashboard.overview.alert.assetTopN")}} + {{$t("dashboard.overview.alert.moduleTopN")}} + + +
+
+ + +
+
+
{{$t("dashboard.overview.alert.alertRuleTopN")}} @@ -141,47 +164,9 @@ -->
- - - -
-
- -
-
- - {{$t("dashboard.overview.alert.assetTopN")}} - {{$t("dashboard.overview.alert.moduleTopN")}} - - - -
    - - -
-
-
-
- -
-
- - - - - - + + +
@@ -779,16 +764,20 @@ name: 'alertStatByRule', data: seriesData, type: 'bar', - barMaxWidth: 30, + barMaxWidth: 20, + itemStyle: { + color: function(params) { + let colorList = ["#ECCD82", "#99CEB9"];; + if(params.dataIndex % 2 == 0){ + return colorList[0] + }else{ + return colorList[1] + } + }, + }, category: categoryData, //自定义,用来判断N/A是否显示 }; this.$refs.ruleMessage.modifyOption('yAxis', 'data', categoryData); - this.$refs.ruleMessage.modifyOption("tooltip", "backgroundColor", "rgba(221,228,237,1)"); - this.$refs.ruleMessage.modifyOption("tooltip", "textStyle", {color: "#000"}); - this.$refs.ruleMessage.modifyOption("grid", "top", 30); - this.$refs.ruleMessage.modifyOption("grid", "left", 200); - this.$refs.ruleMessage.modifyOption("grid", "right", 30); - this.$refs.ruleMessage.modifyOption("grid", "bottom", 8); this.$refs.ruleMessage.setSeries(this.messageByRuleSeries); this.$refs.ruleMessage.endLoading(); } @@ -809,15 +798,19 @@ data: seriesData, type: 'bar', barMaxWidth: 30, - category: categoryData + category: categoryData, + itemStyle: { + color: function(params) { + let colorList = ["#ECCD82", "#99CEB9"];; + if(params.dataIndex % 2 == 0){ + return colorList[0] + }else{ + return colorList[1] + } + }, + }, }; - this.$refs.assetMessage.modifyOption('yAxis', 'data', categoryData); - this.$refs.assetMessage.modifyOption("tooltip", "backgroundColor", "rgba(221,228,237,1)"); - this.$refs.assetMessage.modifyOption("tooltip", "textStyle", {color: "#000"}); - this.$refs.assetMessage.modifyOption("grid", "top", 30); - this.$refs.assetMessage.modifyOption("grid", "left", 200); - this.$refs.assetMessage.modifyOption("grid", "right", 30); - this.$refs.assetMessage.modifyOption("grid", "bottom", 8); + this.$refs.assetMessage.modifyOption('xAxis', 'data', categoryData); this.$refs.assetMessage.setSeries(this.messageByAssetSeries); this.$refs.assetMessage.endLoading(); } @@ -840,13 +833,7 @@ barMaxWidth: 30, category: categoryData }; - this.$refs.moduleMessage.modifyOption('yAxis', 'data', categoryData); - this.$refs.moduleMessage.modifyOption("tooltip", "backgroundColor", "rgba(221,228,237,1)"); - this.$refs.moduleMessage.modifyOption("tooltip", "textStyle", {color: "#000"}); - this.$refs.moduleMessage.modifyOption("grid", "top", 30); - this.$refs.moduleMessage.modifyOption("grid", "left", 200); - this.$refs.moduleMessage.modifyOption("grid", "right", 30); - this.$refs.moduleMessage.modifyOption("grid", "bottom", 8); + this.$refs.moduleMessage.modifyOption('xAxis', 'data', categoryData); this.$refs.moduleMessage.setSeries(this.messageByModuleSeries); this.$refs.moduleMessage.endLoading(); }