diff --git a/app/assets/javascripts/monitoring/components/dashboard_panel_builder.vue b/app/assets/javascripts/monitoring/components/dashboard_panel_builder.vue
index 44796d7926d..88d5a35146f 100644
--- a/app/assets/javascripts/monitoring/components/dashboard_panel_builder.vue
+++ b/app/assets/javascripts/monitoring/components/dashboard_panel_builder.vue
@@ -8,6 +8,7 @@ import {
GlButton,
GlSprintf,
GlAlert,
+ GlTooltipDirective,
} from '@gitlab/ui';
import DateTimePicker from '~/vue_shared/components/date_time_picker/date_time_picker.vue';
import { timeRanges } from '~/vue_shared/constants';
@@ -34,6 +35,9 @@ export default {
DashboardPanel,
DateTimePicker,
},
+ directives: {
+ GlTooltip: GlTooltipDirective,
+ },
data() {
return {
yml: initialYml,
@@ -67,6 +71,13 @@ export default {
this.fetchPanelPreviewMetrics();
}
},
+ onRefresh() {
+ // refetch data only if preview has been clicked
+ // and there are no errors
+ if (this.panelPreviewIsShown && !this.panelPreviewError) {
+ this.fetchPanelPreviewMetrics();
+ }
+ },
},
timeRanges,
};
@@ -171,11 +182,18 @@ export default {
+
diff --git a/app/assets/javascripts/notes/components/discussion_filter_note.vue b/app/assets/javascripts/notes/components/discussion_filter_note.vue
index 25ff49fbd0f..8dc4b43d69a 100644
--- a/app/assets/javascripts/notes/components/discussion_filter_note.vue
+++ b/app/assets/javascripts/notes/components/discussion_filter_note.vue
@@ -1,5 +1,5 @@