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 015663356..21b13621a 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 @@ -104,7 +104,7 @@ .element-item { padding: 0; border-bottom: none; - margin-bottom: 10px; + margin-bottom: 20px !important; } .vue-tags-input{ display: inline-block; @@ -122,7 +122,14 @@ .system-chart-config-left{ width: 40%; height: 100%; - overflow-y: auto; + border: 1px solid $--border-color-light; + border-radius: 2px; + padding: 10px; + box-sizing: border-box; + ul{ + height: 100%; + overflow-y: auto; + } .system-chart-item { font-size: 14px; padding: 3px 5px; @@ -140,5 +147,10 @@ margin-left: 10px; height: 100%; } + //.el-select__tags > span { + // display: flex; + // width: 100%; + // overflow-x: auto; + //} } } diff --git a/nezha-fronted/src/components/common/rightBox/chart/chartConfig.vue b/nezha-fronted/src/components/common/rightBox/chart/chartConfig.vue index 9d120da90..33351df95 100644 --- a/nezha-fronted/src/components/common/rightBox/chart/chartConfig.vue +++ b/nezha-fronted/src/components/common/rightBox/chart/chartConfig.vue @@ -74,7 +74,7 @@ -
+
{{$t('dashboard.panel.chartForm.displayConfig')}}
diff --git a/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue b/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue index 1d206fa5c..a78ceb846 100644 --- a/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue +++ b/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue @@ -95,13 +95,7 @@ import { fromRoute } from '@/components/common/js/constants' import editRigthBox from '@/components/common/mixin/editRigthBox' import { resetZIndex } from '@/components/common/js/common' -import chartPreview from '@/components/charts/chartPreview' -import alertChartParam from '@/components/page/dashboard/alertChartParam' -import promqlInput from '@/components/page/dashboard/explore/promqlInput' -import richTextEditor from '@/components/charts/richTextEditor' import selectPanel from '@/components/common/popBox/selectPanel' -import nezhaColor from '@/components/common/nezhaColor' -import diagram from '@/components/common/ChartDiagram/diagram' import chartConfig from '@/components/common/rightBox/chart/chartConfig' import otherChartConfig from '@/components/common/rightBox/chart/otherChartConfig' import systemChartConfig from '@/components/common/rightBox/chart/systemChartConfig' @@ -127,14 +121,7 @@ export default { }, mixins: [rz, editRigthBox], components: { - System, - 'chart-preview': chartPreview, - 'alert-chart-param': alertChartParam, - 'promql-input': promqlInput, - 'rich-text-editor': richTextEditor, selectPanel, - nezhaColor, - diagram, chartConfig, systemChartConfig, otherChartConfig @@ -267,14 +254,20 @@ export default { span: 4, height: 4, unit: 2, - type: 'stat', + type: 'singleStat', param: { refer: 1, system: '', systemGroup: '', systemSelect: '', sort: 'desc', - limit: 100 + limit: undefined, + nullType: 'null', + statistics: 'last', + valueMapping: { + show: true, + mapping: [] + } } } delete this.editChart.elements diff --git a/nezha-fronted/src/components/common/rightBox/chart/chartTypeShow.js b/nezha-fronted/src/components/common/rightBox/chart/chartTypeShow.js index 138c18788..c019541b8 100644 --- a/nezha-fronted/src/components/common/rightBox/chart/chartTypeShow.js +++ b/nezha-fronted/src/components/common/rightBox/chart/chartTypeShow.js @@ -10,6 +10,7 @@ export default { case 'singleStat': case 'bar': case 'treemap': + case 'guage': case 'pie': return false default: return false @@ -25,6 +26,7 @@ export default { case 'singleStat': case 'bar': case 'treemap': + case 'guage': case 'pie': return true default: return false @@ -39,6 +41,7 @@ export default { case 'table': case 'singleStat': case 'bar': + case 'guage': case 'treemap': case 'pie': return false @@ -54,6 +57,7 @@ export default { return false case 'singleStat': case 'bar': + case 'guage': case 'treemap': case 'pie': return true @@ -69,6 +73,7 @@ export default { case 'point': case 'singleStat': case 'bar': + case 'guage': case 'treemap': case 'pie': return false diff --git a/nezha-fronted/src/components/common/rightBox/chart/systemChartConfig.vue b/nezha-fronted/src/components/common/rightBox/chart/systemChartConfig.vue index 2dc6243dd..3973f3fa0 100644 --- a/nezha-fronted/src/components/common/rightBox/chart/systemChartConfig.vue +++ b/nezha-fronted/src/components/common/rightBox/chart/systemChartConfig.vue @@ -25,19 +25,20 @@ :label="$t('dashboard.panel.chartForm.group')" class="form-item--half-width" prop="param.systemGroup" - :rules="{ required: true, message: $t('validate.required'), trigger: 'change'}" > - - + + - + + +
@@ -62,10 +63,9 @@ @@ -177,6 +177,206 @@
+ + +
+
+ {{$t('dashboard.panel.chartForm.valueMapping')}} + +
+ + +
+
+ + + + + {{item.value}} + + + {{item.from}} -> {{item.to}} + + + {{item.regx}} + +
+ + {{item.display || "T"}} + +
+
+
+ + + + + + + + + + + +
+ + +
+ + + +
+ + + + + + + + + + + + +
+ +
+
Display
+
+ + + + +
+
+
+
+ Add valueMapping +
+
+
+
+ + +
+
+ {{$t('dashboard.panel.chartForm.valueMapping')}} +
+
+
+ + + + + {{item.value}} + + + + + + + + + + + + + + +
+ + +
+
Title
+
+ + + +
+
Unit
+
+ + +
+ +
+
Display
+
+ + + +
+
+
+
+ Add Colums +
+
@@ -184,14 +384,20 @@