-
-
{{projectKey[key]}}
-
{{projectKey[key]}}
+
+
+
+
{{projectKey[key]}}
+
{{projectKey[key]}}
+
+
+
+
+ {{value[0]}}
+
+ {{value[1]}}
+
+ {{value[2]}}
+
+
+ {{value ? value : " "}}
+ {{value}}
+
+
-
-
-
- {{value[0]}}
-
- {{value[1]}}
-
- {{value[2]}}
-
-
- {{value ? value : " "}}
- {{value}}
-
+
+
+
+
{{moduleKey[key]}}
+
{{moduleKey[key]}}
+
+
+
+
+ {{value[0]}}
+
+ {{value[1]}}
+
+ {{value[2]}}
+
+
+
+ {{value[0]}}
+
+ {{value[1]}}
+
+
+ {{value ? value : " "}}
+ {{value}}
+
+
-
-
-
-
-
{{moduleKey[key]}}
-
{{moduleKey[key]}}
-
-
-
-
- {{value[0]}}
-
- {{value[1]}}
-
- {{value[2]}}
-
-
-
- {{value[0]}}
-
- {{value[1]}}
-
-
- {{value ? value : " "}}
- {{value}}
-
-
-
-
-
-
-
{{endpointKey[key]}}
-
{{endpointKey[key]}}
+
+
+
+
{{endpointKey[key]}}
+
{{endpointKey[key]}}
+
+
+
+
+ {{value ? value : " "}}
+ {{value}}
+
+
-
-
-
+
+
+
+
{{value ? value : " "}}
{{value}}
-
+
-
-
-
-
-
-
{{value ? value : " "}}
-
{{value}}
-
-
-
-
-
-
{{key}}
-
{{key}}
+
+
+
+
+
{{value ? value : " "}}
+
{{value}}
+
-
-
{{value ? value : " "}}
-
{{value}}
-
-
-
-
+
+
+
diff --git a/nezha-fronted/src/components/charts/chart-list.vue b/nezha-fronted/src/components/charts/chart-list.vue
index 0263a5cdf..909e544d0 100644
--- a/nezha-fronted/src/components/charts/chart-list.vue
+++ b/nezha-fronted/src/components/charts/chart-list.vue
@@ -1204,21 +1204,22 @@
let step = bus.getStep(startTime, endTime);
this.$nextTick(() => {
let query = chartInfo.elements[0].expression;
- this.$get('/prom/api/v1/query_range?query='+query+"&start="+this.$stringTimeParseToUnix(startTime)+"&end="+this.$stringTimeParseToUnix(endTime)+'&step='+step).then(response => {
+ this.$get('/prom/api/v1/query_range?query='+query+"&start="+this.$stringTimeParseToUnix(startTime)+"&end="+this.$stringTimeParseToUnix(endTime)+'&step=5m').then(response => {
if (response.status === 'success') {
if (response.data.result) {
let series = {
name: '',
symbol: 'emptyCircle', //去掉点
- symbolSize: [2, 2],
+ symbolSize: 6,
smooth: 0.2, //曲线变平滑
- showSymbol: false,
+ showSymbol: true,
data: [],
type: "line",
lineStyle: {
width: 1,
opacity: 0.9
},
+ label: {show: true},
itemStyle: {
color: function(params) {
if (params.data[1] == "1") {
diff --git a/nezha-fronted/src/components/charts/chart.scss b/nezha-fronted/src/components/charts/chart.scss
index 30cca2458..e26039d16 100644
--- a/nezha-fronted/src/components/charts/chart.scss
+++ b/nezha-fronted/src/components/charts/chart.scss
@@ -316,6 +316,13 @@
.active-icon {
margin: 0;
}
+ .chart-sub {
+ padding: 0 15px;
+ margin-bottom: 5px;
+ :last-of-type {
+ margin-bottom: 0;
+ }
+ }
.chart-sub-title {
background-color: #efefef;
font-size: 13px;
@@ -326,11 +333,7 @@
user-select: none;
}
.chart-sub-content {
- opacity: 0;
- max-height: 0;
- visibility: hidden;
width: 100%;
- margin-bottom: 5px;
box-sizing: border-box;
.content-item>div {
display: inline-block;
@@ -443,59 +446,6 @@
}
}
}
- .init-no-animation {
- opacity: 1;
- max-height: 200px;
- visibility: visible;
- }
- .fold-500 {
- animation-name: fold-500; //该动画定义在main.scss里
- animation-duration: 0.2s;
- animation-iteration-count:1;
- opacity: 0;
- max-height: 0;
- visibility: hidden;
- }
- .fold-600 {
- animation-name: fold-600; //该动画定义在main.scss里
- animation-duration: 0.2s;
- animation-iteration-count:1;
- opacity: 0;
- max-height: 0;
- visibility: hidden;
- }
- .fold-200 {
- animation-name: fold-200; //该动画定义在main.scss里
- animation-duration: 0.2s;
- animation-iteration-count:1;
- opacity: 0;
- max-height: 0;
- visibility: hidden;
- }
- .unfold-500 {
- animation-name: unfold-500;
- animation-duration: 0.2s;
- animation-iteration-count:1;
- opacity: 1;
- max-height: 500px;
- visibility: visible;
- }
- .unfold-600 {
- animation-name: unfold-600;
- animation-duration: 0.2s;
- animation-iteration-count:1;
- opacity: 1;
- max-height: 600px;
- visibility: visible;
- }
- .unfold-200 {
- animation-name: unfold-200;
- animation-duration: 0.2s;
- animation-iteration-count:1;
- opacity: 1;
- max-height: 200px;
- visibility: visible;
- }
}
.chart-url {
.url-container {