As per existing implementation, dynamic dashboards are getting created whenever a new device is added in the tenant. This is achieved by extending the ContextDashboardService class and override create(dashboardCfg: ContextDashboard,context?: ContextData, contextName?: string,) function. Post 1023 migration, only constructor is getting initialized and create function is not getting invoked. Dashboard mo is getting created only if user clicks save button in dashboard settings and refresh the page.
Imported DummyDashboardsModule.forRoot() in app.module and ContextDashboardModule in DummyDashboardsModule.
Existing code:
export class DummyDashboardsModule {
static forRoot(): ModuleWithProviders<DummyDashboardsModule > {
return {
ngModule: DummyDashboardsModule ,
providers: \[
{
provide: ContextDashboardService,
useClass: CustomContextDashboardService,
},
\],
};
}
}