Forum Discussion

AP's avatar
AP
Data Storage
01-13-2025
Solved

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.

3 Replies

  • 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.

    • AP's avatar
      AP
      Data Storage

      Thanks DRay!

      I was a bit lost in a new portal and though that this is the right place to answer. I created a ticket in support portal.

      • DRay's avatar
        DRay
        Admin

        No problem, I'm glad I could help! Sorry for the confusion. If you have any feedback please let us know, we don't want the website to be confusing if we can help it. ğŸ˜€