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 21b13621a..8d4a8728c 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
@@ -18,6 +18,23 @@
width: 100%;
}
}
+ .metrics-input-box{
+ .input-box .el-textarea .el-textarea__inner {
+ width: 508px;
+ }
+ .metric-selector-input-box{
+ line-height: 32px;
+ .el-input__count{
+ right: -38px !important;
+ }
+ }
+ .el-col-24{
+ line-height: 32px;
+ }
+ .el-input--small{
+ line-height: 32px;
+ }
+ }
.chart-title-config {
border: 1px solid $--border-color-light;
border-radius: 2px;
@@ -29,6 +46,9 @@
margin-bottom: 10px;
box-sizing: border-box;
height: 32px;
+ .nz-icon{
+ cursor: pointer;
+ }
.title-content-left{
display: inline-flex;
align-items: center;
@@ -58,6 +78,7 @@
justify-items: center;
.el-form-item__content{
display: flex;
+ line-height: 32px;
align-items: center;
justify-items: center;
width: 100%;
diff --git a/nezha-fronted/src/components/common/rightBox/chart/chartConfig.vue b/nezha-fronted/src/components/common/rightBox/chart/chartConfig.vue
index 33351df95..61e4c7241 100644
--- a/nezha-fronted/src/components/common/rightBox/chart/chartConfig.vue
+++ b/nezha-fronted/src/components/common/rightBox/chart/chartConfig.vue
@@ -9,6 +9,7 @@
>
-
+
-
-
+
+
-
-
+
+
@@ -56,7 +57,7 @@
@change="expressionChange"
@removeExpression="removeExpression"
>
-
+
{{$t('dashboard.panel.chartForm.legend')}}
@@ -64,7 +65,7 @@
-
+
@@ -150,7 +151,7 @@
prop="param.limit">
@@ -319,7 +320,7 @@
v-model="chartConfig.param.legend.values"
multiple
collapse-tags
- placeholder=""
+ :placeholder="$t('el.select.placeholder')"
popper-class="right-box-select-top prevent-clickoutside"
size="small"
@change="change, $forceUpdate()"
@@ -363,7 +364,7 @@
-
-
+
+
-
-
+
+
-
-
+
+
@@ -507,7 +508,7 @@
Display
-
+
{colorChange(val, key, index)}"/>
@@ -618,9 +619,6 @@ export default {
data () {
return {
rules: {
- 'param.limit': [
- { required: true, message: this.$t('validate.required'), trigger: 'change' }
- ]
},
promqlType: 'log',
chartTypeList: [
diff --git a/nezha-fronted/src/components/common/rightBox/chart/otherChartConfig.vue b/nezha-fronted/src/components/common/rightBox/chart/otherChartConfig.vue
index 4ff8594c7..410cc486d 100644
--- a/nezha-fronted/src/components/common/rightBox/chart/otherChartConfig.vue
+++ b/nezha-fronted/src/components/common/rightBox/chart/otherChartConfig.vue
@@ -22,7 +22,7 @@
id="chart-box-type"
v-model="chartConfig.type"
:disabled="chartConfig.type==='group'&&chartConfig.children&&chartConfig.children.length"
- placeholder=""
+ :placeholder="$t('el.select.placeholder')"
popper-class="right-box-select-top prevent-clickoutside"
size="small"
value-key="chartType"
diff --git a/nezha-fronted/src/components/common/rightBox/chart/publicConfig.js b/nezha-fronted/src/components/common/rightBox/chart/publicConfig.js
index f652d1792..3de620231 100644
--- a/nezha-fronted/src/components/common/rightBox/chart/publicConfig.js
+++ b/nezha-fronted/src/components/common/rightBox/chart/publicConfig.js
@@ -251,7 +251,7 @@ export default {
this.chartConfig.param.valueMapping.mapping.push({
type: 'value',
show: true,
- value: '',
+ value: undefined,
display: '',
color: {
bac: '#FFFFFFFF',
@@ -276,21 +276,25 @@ export default {
if (mapping.type === 'value') {
this.chartConfig.param.valueMapping.mapping[index] = {
...mapping,
- value: ''
+ value: undefined
}
}
+ this.$refs.chartForm.clearValidate('param.valueMapping.mapping.' + index + 'value')
if (mapping.type === 'range') {
this.chartConfig.param.valueMapping.mapping[index] = {
...mapping,
- from: '',
- to: ''
+ from: undefined,
+ to: undefined
}
+ this.$refs.chartForm.clearValidate('param.valueMapping.mapping.' + index + 'from')
+ this.$refs.chartForm.clearValidate('param.valueMapping.mapping.' + index + 'to')
}
if (mapping.type === 'regx') {
this.chartConfig.param.valueMapping.mapping[index] = {
...mapping,
regx: ''
}
+ this.$refs.chartForm.clearValidate('param.valueMapping.mapping.' + index + 'regx')
}
this.$set(this.chartConfig.param.valueMapping.mapping, index, this.chartConfig.param.valueMapping.mapping[index])
this.change()
diff --git a/nezha-fronted/src/components/common/rightBox/chart/systemChartConfig.vue b/nezha-fronted/src/components/common/rightBox/chart/systemChartConfig.vue
index 3973f3fa0..91cdc3296 100644
--- a/nezha-fronted/src/components/common/rightBox/chart/systemChartConfig.vue
+++ b/nezha-fronted/src/components/common/rightBox/chart/systemChartConfig.vue
@@ -26,7 +26,7 @@
class="form-item--half-width"
prop="param.systemGroup"
>
-
+
@@ -36,7 +36,7 @@
class="form-item--half-width"
prop="param.systemSelect"
>
-
+
@@ -67,7 +67,7 @@
class="form-item--half-width"
prop="param.limit"
>
-
+