Commit ca702a64 authored by Phil Hughes's avatar Phil Hughes

Merge branch '346589-report-widgets-core-add-method-to-load-collapsed-data' into 'master'

Add method to load collapsed data on extensions

See merge request gitlab-org/gitlab!75349
parents 442a82a1 61fdbb2a
...@@ -104,16 +104,7 @@ export default { ...@@ -104,16 +104,7 @@ export default {
}, },
}, },
mounted() { mounted() {
this.fetchCollapsedData(this.$props) this.loadCollapsedData();
.then((data) => {
this.collapsedData = data;
this.loadingState = null;
})
.catch((e) => {
this.loadingState = LOADING_STATES.collapsedError;
Sentry.captureException(e);
});
}, },
methods: { methods: {
triggerRedisTracking: once(function triggerRedisTracking() { triggerRedisTracking: once(function triggerRedisTracking() {
...@@ -126,6 +117,20 @@ export default { ...@@ -126,6 +117,20 @@ export default {
this.triggerRedisTracking(); this.triggerRedisTracking();
}, },
loadCollapsedData() {
this.loadingState = LOADING_STATES.collapsedLoading;
this.fetchCollapsedData(this.$props)
.then((data) => {
this.collapsedData = data;
this.loadingState = null;
})
.catch((e) => {
this.loadingState = LOADING_STATES.collapsedError;
Sentry.captureException(e);
});
},
loadAllData() { loadAllData() {
if (this.hasFullData) return; if (this.hasFullData) return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment