cancel
Showing results for 
Search instead for 
Did you mean: 

Breaking changes in 'dashboardLoader' API after upgrade from 2022.8 to 2024.3

AP
7 - Data Storage
7 - Data Storage

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?

0 REPLIES 0