AP
01-13-2025Data Storage
Breaking changes in 'dashboardLoader' API after upgrade from 2022.8 to 2024.3
Hi, we use Sisense dashboard in embedded Iframe (JS plugin). After upgrading from 2022.8 to 2024.3 our add-on stopped working. From what I see, the API has changed so there are no 'EVENTS' and '$rootScope' objects in the 'dashboard-base.services.dashboardLoader'. I cannot find those changes mentioned in any release notes.
The code is following:
prism.run([
() => {
let dashboardLoader = prism.$injector.get('dashboard-base.services.dashboardLoader');
let origGetDashboardMetadata = dashboardLoader.getDashboardMetadata;
// Need to overwrite dashboardLoader.getDashboardMetadata() method in order
// to include custom function to run before dashboard load
dashboardLoader.getDashboardMetadata = function (...args) {
let dashboardLoaderSelf = this;
let orig = origGetDashboardMetadata.apply(dashboardLoaderSelf, args);
let getWidgetFilterMetadata = new Promise((resolve) => {
// Problem here, no 'EVENTS', no '$rootScope'
dashboardLoaderSelf.$rootScope.$on(dashboardLoader.EVENTS.FILTERS_LOADED, (e, dashboardOid) => {
resolve($$get(dashboardOid));
});
});
...
Can somebody guide me how to achive the same using new API?
Hi AP,
Thank you for reaching out. I reached out internally and they asked to have you submit a support ticket for this. They will be able to help you better there.
Thank you, and please keep us posted.