diff --git a/nezha-fronted/src/assets/css/common/rightBoxCommon.scss b/nezha-fronted/src/assets/css/common/rightBoxCommon.scss index 892477f51..f1d3774f6 100644 --- a/nezha-fronted/src/assets/css/common/rightBoxCommon.scss +++ b/nezha-fronted/src/assets/css/common/rightBoxCommon.scss @@ -136,6 +136,7 @@ .form__sub-title { display: flex; justify-content: space-between; + align-items: center; padding: 0 10px; margin-bottom: 20px; line-height: 32px; diff --git a/nezha-fronted/src/assets/css/components/common/project/L5/CanvasProps.scss b/nezha-fronted/src/assets/css/components/common/project/L5/CanvasProps.scss index 529cc73db..cb86e03d2 100644 --- a/nezha-fronted/src/assets/css/components/common/project/L5/CanvasProps.scss +++ b/nezha-fronted/src/assets/css/components/common/project/L5/CanvasProps.scss @@ -483,11 +483,11 @@ .color-tab { position: absolute; - top: 43px; + top: -28px; + width: 100%; left: 0; height: 28px; border-radius: 5px 5px 0 0; - width: 312px; border: 1px solid #EBEEF5; border-bottom: none; background-color: $--background-color-empty; diff --git a/nezha-fronted/src/assets/css/components/common/rightBox/chartRightBox/chartRightBox.scss b/nezha-fronted/src/assets/css/components/common/rightBox/chartRightBox/chartRightBox.scss index 4b926ec13..1d134e51f 100644 --- a/nezha-fronted/src/assets/css/components/common/rightBox/chartRightBox/chartRightBox.scss +++ b/nezha-fronted/src/assets/css/components/common/rightBox/chartRightBox/chartRightBox.scss @@ -1,5 +1,10 @@ +.chart-right-box{ + overflow-y: auto; +} .right-box__container{ .chart-config{ + color: $--color-text-regular; + font-size: 14px; .el-form { padding-top: 0px; } @@ -7,9 +12,10 @@ border: 1px solid $--border-color-light; border-radius: 2px; display: flex; - padding: 8px 10px; + padding: 3px 10px 3px 5px; justify-content: space-between; margin-bottom: 10px; + box-sizing: border-box; .nz-icon-copy { padding: 0 4px; color: $--color-primary; @@ -27,5 +33,39 @@ -90deg ); } + .thresholds-item { + border-radius: 2px; + display: flex; + margin-bottom: 10px; + align-items: center; + justify-items: center; + .el-input-number--small{ + display: inline-block; + flex: 1; + align-items: center; + width: auto; + } + .del-thresholds-icon{ + display: inline-block; + margin-left: 5px; + } + .mapping-display{ + width: 124px; + font-size: 14px; + border: 1px solid $--border-color-light; + border-radius: 2px 0 0 2px; + height: 32px; + line-height: 32px; + padding-left: 10px; + box-sizing: border-box; + } + } + .thresholds-add{ + border: 1px solid $--border-color-light; + border-radius: 2px; + text-align: center; + margin-bottom: 10px; + padding: 3px 10px; + } } } diff --git a/nezha-fronted/src/assets/css/components/page/dashboard/chartBox.scss b/nezha-fronted/src/assets/css/components/page/dashboard/chartBox.scss index 0b52b79e5..097d766b3 100644 --- a/nezha-fronted/src/assets/css/components/page/dashboard/chartBox.scss +++ b/nezha-fronted/src/assets/css/components/page/dashboard/chartBox.scss @@ -105,38 +105,6 @@ top: -280px; left: 280px; } -.color-tab{ - position: absolute; - top: -268px; - left: 144px; - height: 28px; - border-radius: 5px 5px 0 0; - width: 312px; - border: 1px solid $--border-color-light; - border-bottom: none; - background-color: $--background-color-empty; - display: flex; - justify-content: space-between; - box-shadow: 0 2px 12px 0 rgba(0,0,0,.1); -} -.color-tab div{ - text-align: center; - flex: 1; - color: $--color-text-secondary; - transition: all .3s cubic-bezier(.645,.045,.355,1); - background: #E4E7ED; - cursor: pointer; -} -.color-tab div:first-child{ - border-right-color: $--border-color-base; -} -.color-tab div:hover{ - color: #409EFF; -} -.color-tab .color-active{ - color: #409EFF; - background-color: $--background-color-empty; -} .color{ position: relative; } diff --git a/nezha-fronted/src/components/common/nezhaColor.vue b/nezha-fronted/src/components/common/nezhaColor.vue index 72d68c252..fdd0e5a0c 100644 --- a/nezha-fronted/src/components/common/nezhaColor.vue +++ b/nezha-fronted/src/components/common/nezhaColor.vue @@ -2,8 +2,8 @@
- {{colors}} - + {{colors}} + @@ -71,6 +71,10 @@ export default { disableAlpha: { type: Boolean, default: false + }, + showText: { + type: Boolean, + default: true } }, watch: {}, diff --git a/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue b/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue index 64336d970..602abc75b 100644 --- a/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue +++ b/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue @@ -13,7 +13,7 @@
-
+
@@ -59,7 +59,7 @@
- + @@ -237,6 +237,10 @@ export default { }, datasourceChange (val, e) { console.log(val, e, this.editChart.datasource) + }, + editChartChange (newEditChart) { + console.log(newEditChart) + this.editChart = JSON.parse(JSON.stringify(newEditChart)) } }, created () { diff --git a/nezha-fronted/src/components/common/rightBox/chart/metricsChartConfig.vue b/nezha-fronted/src/components/common/rightBox/chart/metricsChartConfig.vue index 2b6feb56d..c0fd14e89 100644 --- a/nezha-fronted/src/components/common/rightBox/chart/metricsChartConfig.vue +++ b/nezha-fronted/src/components/common/rightBox/chart/metricsChartConfig.vue @@ -8,6 +8,10 @@
+ + {{expressionName[index-1]}} + + @@ -56,7 +60,7 @@
- +
{{$t('dashboard.panel.chartForm.displayConfig')}}
@@ -92,7 +96,7 @@ - + span-{{item}} @@ -102,12 +106,130 @@ - + span-{{item}} + + + + + + + + + + + + + + + + {{$t(item.label)}} + + + + + + + + + + +
+ +
+ +
+ {{$t('dashboard.panel.chartForm.legendConfig')}} + +
+ +
+ + + + + + + + + + + +
+
+ + +
+ {{$t('dashboard.panel.chartForm.threshold')}} + +
+ + +
+ + + + + +
+
+ Add thresholds +
+
+
+
+
+
+ {{$t('dashboard.panel.chartForm.valueMapping')}} + +
+ + +
+
+ + + 123 + + + + + + + + + + + + +
+ + + + + + + + + + + +
Display
+ + +
+
+
+
+ Add valueMapping +
+
+
@@ -115,25 +237,19 @@