Browse Source
Merge pull request #8013 from ChantsovaEkaterina/bug/error-on-loading-custom-widgets-module-within-state-component
Fixed error on loading custom widgets module withing dashboard state component
pull/8031/head
Igor Kulikov
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
5 additions and
16 deletions
-
ui-ngx/src/app/modules/dashboard/dashboard-pages.routing.module.ts
-
ui-ngx/src/app/modules/home/components/home-components.module.ts
-
ui-ngx/src/app/modules/home/pages/home-pages.module.ts
|
|
|
@ -25,8 +25,6 @@ import { DashboardUtilsService } from '@core/services/dashboard-utils.service'; |
|
|
|
import { DashboardResolver } from '@app/modules/home/pages/dashboard/dashboard-routing.module'; |
|
|
|
import { UtilsService } from '@core/services/utils.service'; |
|
|
|
import { Widget } from '@app/shared/models/widget.models'; |
|
|
|
import { MODULES_MAP } from '../../shared/models/constants'; |
|
|
|
import { modulesMap } from '../common/modules-map'; |
|
|
|
|
|
|
|
@Injectable() |
|
|
|
export class WidgetEditorDashboardResolver implements Resolve<Dashboard> { |
|
|
|
@ -97,11 +95,7 @@ const routes: Routes = [ |
|
|
|
exports: [RouterModule], |
|
|
|
providers: [ |
|
|
|
WidgetEditorDashboardResolver, |
|
|
|
DashboardResolver, |
|
|
|
{ |
|
|
|
provide: MODULES_MAP, |
|
|
|
useValue: modulesMap |
|
|
|
} |
|
|
|
DashboardResolver |
|
|
|
] |
|
|
|
}) |
|
|
|
export class DashboardPagesRoutingModule { } |
|
|
|
|
|
|
|
@ -173,6 +173,8 @@ import { RateLimitsDetailsDialogComponent } from '@home/components/profile/tenan |
|
|
|
import { AssetProfileComponent } from '@home/components/profile/asset-profile.component'; |
|
|
|
import { AssetProfileDialogComponent } from '@home/components/profile/asset-profile-dialog.component'; |
|
|
|
import { AssetProfileAutocompleteComponent } from '@home/components/profile/asset-profile-autocomplete.component'; |
|
|
|
import { MODULES_MAP } from '@shared/models/constants'; |
|
|
|
import { modulesMap } from '@modules/common/modules-map'; |
|
|
|
|
|
|
|
@NgModule({ |
|
|
|
declarations: |
|
|
|
@ -462,7 +464,8 @@ import { AssetProfileAutocompleteComponent } from '@home/components/profile/asse |
|
|
|
{provide: EMBED_DASHBOARD_DIALOG_TOKEN, useValue: EmbedDashboardDialogComponent}, |
|
|
|
{provide: COMPLEX_FILTER_PREDICATE_DIALOG_COMPONENT_TOKEN, useValue: ComplexFilterPredicateDialogComponent}, |
|
|
|
{provide: DASHBOARD_PAGE_COMPONENT_TOKEN, useValue: DashboardPageComponent}, |
|
|
|
{provide: HOME_COMPONENTS_MODULE_TOKEN, useValue: HomeComponentsModule } |
|
|
|
{provide: HOME_COMPONENTS_MODULE_TOKEN, useValue: HomeComponentsModule }, |
|
|
|
{provide: MODULES_MAP, useValue: modulesMap} |
|
|
|
] |
|
|
|
}) |
|
|
|
export class HomeComponentsModule { } |
|
|
|
|
|
|
|
@ -31,8 +31,6 @@ import { RuleChainModule } from '@modules/home/pages/rulechain/rulechain.module' |
|
|
|
import { WidgetLibraryModule } from '@modules/home/pages/widget/widget-library.module'; |
|
|
|
import { DashboardModule } from '@modules/home/pages/dashboard/dashboard.module'; |
|
|
|
import { TenantProfileModule } from './tenant-profile/tenant-profile.module'; |
|
|
|
import { MODULES_MAP } from '@shared/public-api'; |
|
|
|
import { modulesMap } from '../../common/modules-map'; |
|
|
|
import { DeviceProfileModule } from './device-profile/device-profile.module'; |
|
|
|
import { ApiUsageModule } from '@home/pages/api-usage/api-usage.module'; |
|
|
|
import { EdgeModule } from '@home/pages/edge/edge.module'; |
|
|
|
@ -65,12 +63,6 @@ import { ProfilesModule } from '@home/pages/profiles/profiles.module'; |
|
|
|
OtaUpdateModule, |
|
|
|
UserModule, |
|
|
|
VcModule |
|
|
|
], |
|
|
|
providers: [ |
|
|
|
{ |
|
|
|
provide: MODULES_MAP, |
|
|
|
useValue: modulesMap |
|
|
|
} |
|
|
|
] |
|
|
|
}) |
|
|
|
export class HomePagesModule { } |
|
|
|
|