Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Auto-Referesh Dashboard Widgets Functionality #9719


User avatar
0
AuroraBMS created
  • What is your product version? 9.2.0 & 9.0.0
  • What is your product type (Angular or MVC)? Angular
  • What is product framework type (.net framework or .net core)? Core

Good day ANZ Team,

We are busy implementing Dashboards for warehouse stock picking & delivery schedules. One of the things that we are trying to implement with it is auto refresh functionality.

Is there a way to handle auto-refresh of the widgets without reloading the page everytime?

Regards, AuroraBMS


4 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @AuroraBMS

    Yes, that's possible. But, current dynamic dashboard system doesn't provide anything to implement that. You can trigger an event using abp events, for example;

    abp.event.trigger('app.dashboard.refresh');

    and then, you can handle this event in every widget like below;

    abp.event.on('app.dashboard.refresh', function(){
        // refresh the widhget here in widget component
    });
    
  • User Avatar
    0
    AuroraBMS created

    Thank you, will give the above a try.

  • User Avatar
    0
    AuroraBMS created

    Hi @ismcagdas,

    How do we go about setting a refresh tim on the abp.event.on('app.dashboard.refresh', function()?

    For instance having it trigger every 5min.

    Thank you, Regards, AuroraBMS

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @AuroraBMS

    It doesn't work like that. You have to trigger it manually using abp.event.trigger. If you want this to be triggered in a period of time, you can use JavaScript' setInteval.