diff --git a/src/views/dashboard/configuration/widget/MetricOptions.vue b/src/views/dashboard/configuration/widget/MetricOptions.vue index 29a423eb..52261b42 100644 --- a/src/views/dashboard/configuration/widget/MetricOptions.vue +++ b/src/views/dashboard/configuration/widget/MetricOptions.vue @@ -261,7 +261,6 @@ function changeMetrics( }); return; } - console.log(arr); states.metrics[index] = arr[0].value; const typeOfMetrics = arr[0].type; diff --git a/src/views/dashboard/controls/Widget.vue b/src/views/dashboard/controls/Widget.vue index 121989bf..46cf7af4 100644 --- a/src/views/dashboard/controls/Widget.vue +++ b/src/views/dashboard/controls/Widget.vue @@ -101,7 +101,11 @@ export default defineComponent({ const dashboardStore = useDashboardStore(); const selectorStore = useSelectorStore(); - if (dashboardStore.entity === EntityType[1].value || props.needQuery) { + if ( + dashboardStore.entity === EntityType[1].value || + props.needQuery || + !dashboardStore.currentDashboard.id + ) { queryMetrics(); } @@ -154,7 +158,11 @@ export default defineComponent({ } ); watch( - () => [selectorStore.currentService, selectorStore.currentDestService], + () => [ + selectorStore.currentService, + selectorStore.currentDestService, + appStore.durationTime, + ], () => { if ( dashboardStore.entity === EntityType[0].value ||