diff --git a/src/views/dashboard/graphs/ServiceList.vue b/src/views/dashboard/graphs/ServiceList.vue index 6e9ee014..a271017f 100644 --- a/src/views/dashboard/graphs/ServiceList.vue +++ b/src/views/dashboard/graphs/ServiceList.vue @@ -276,21 +276,16 @@ function searchList() { } watch( - () => [...(props.config.metricTypes || []), ...(props.config.metrics || [])], + () => [ + ...(props.config.metricTypes || []), + ...(props.config.metrics || []), + ...(props.config.metricConfig || []), + ], (data, old) => { if (JSON.stringify(data) === JSON.stringify(old)) { return; } - queryServiceMetrics(services.value); - } -); -watch( - () => [...(props.config.metricConfig || [])], - (data, old) => { - if (JSON.stringify(data) === JSON.stringify(old)) { - return; - } - metricConfig.value = data; + metricConfig.value = props.config.metricConfig; queryServiceMetrics(services.value); } ); diff --git a/src/views/dashboard/graphs/components/ColumnGraph.vue b/src/views/dashboard/graphs/components/ColumnGraph.vue index 5034265b..efa42803 100644 --- a/src/views/dashboard/graphs/components/ColumnGraph.vue +++ b/src/views/dashboard/graphs/components/ColumnGraph.vue @@ -167,5 +167,6 @@ function getLabel(metric: string, index: string) { display: inline-block; flex-grow: 2; height: 100%; + width: calc(100% - 30px); }