diff --git a/ui-ngx/src/app/core/api/widget-api.models.ts b/ui-ngx/src/app/core/api/widget-api.models.ts index b26abdb320..1579ae8d1e 100644 --- a/ui-ngx/src/app/core/api/widget-api.models.ts +++ b/ui-ngx/src/app/core/api/widget-api.models.ts @@ -53,6 +53,7 @@ import { EntityDataService } from '@core/api/entity-data.service'; import { PageData } from '@shared/models/page/page-data'; import { TranslateService } from '@ngx-translate/core'; import { AlarmDataService } from '@core/api/alarm-data.service'; +import { IDashboardController } from '@home/components/dashboard-page/dashboard-page.models'; export interface TimewindowFunctions { onUpdateTimewindow: (startTimeMs: number, endTimeMs: number, interval?: number) => void; @@ -137,6 +138,7 @@ export interface StateParams { export type StateControllerHolder = () => IStateController; export interface IStateController { + dashboardCtrl: IDashboardController; getStateParams(): StateParams; getStateParamsByStateId(stateId: string): StateParams; openState(id: string, params?: StateParams, openRightLayout?: boolean): void; diff --git a/ui-ngx/src/app/modules/dashboard/dashboard-pages.module.ts b/ui-ngx/src/app/modules/dashboard/dashboard-pages.module.ts index f09c80fea4..b7e11982f9 100644 --- a/ui-ngx/src/app/modules/dashboard/dashboard-pages.module.ts +++ b/ui-ngx/src/app/modules/dashboard/dashboard-pages.module.ts @@ -19,7 +19,6 @@ import { CommonModule } from '@angular/common'; import { SharedModule } from '@shared/shared.module'; import { HomeComponentsModule } from '@modules/home/components/home-components.module'; import { HomeDialogsModule } from '@app/modules/home/dialogs/home-dialogs.module'; -import { DashboardModule } from '@home/pages/dashboard/dashboard.module'; import { DashboardPagesRoutingModule } from './dashboard-pages.routing.module'; @NgModule({ @@ -28,7 +27,6 @@ import { DashboardPagesRoutingModule } from './dashboard-pages.routing.module'; SharedModule, HomeComponentsModule, HomeDialogsModule, - DashboardModule, DashboardPagesRoutingModule ] }) diff --git a/ui-ngx/src/app/modules/dashboard/dashboard-pages.routing.module.ts b/ui-ngx/src/app/modules/dashboard/dashboard-pages.routing.module.ts index 1354f9ef2b..2d500f1da4 100644 --- a/ui-ngx/src/app/modules/dashboard/dashboard-pages.routing.module.ts +++ b/ui-ngx/src/app/modules/dashboard/dashboard-pages.routing.module.ts @@ -18,7 +18,7 @@ import { Injectable, NgModule } from '@angular/core'; import { ActivatedRouteSnapshot, Resolve, RouterModule, Routes } from '@angular/router'; import { Authority } from '@shared/models/authority.enum'; -import { DashboardPageComponent } from '@home/pages/dashboard/dashboard-page.component'; +import { DashboardPageComponent } from '@home/components/dashboard-page/dashboard-page.component'; import { Dashboard } from '@app/shared/models/dashboard.models'; import { DashboardService } from '@core/http/dashboard.service'; import { DashboardUtilsService } from '@core/services/dashboard-utils.service'; diff --git a/ui-ngx/src/app/modules/home/pages/dashboard/add-widget-dialog.component.html b/ui-ngx/src/app/modules/home/components/dashboard-page/add-widget-dialog.component.html similarity index 100% rename from ui-ngx/src/app/modules/home/pages/dashboard/add-widget-dialog.component.html rename to ui-ngx/src/app/modules/home/components/dashboard-page/add-widget-dialog.component.html diff --git a/ui-ngx/src/app/modules/home/pages/dashboard/add-widget-dialog.component.ts b/ui-ngx/src/app/modules/home/components/dashboard-page/add-widget-dialog.component.ts similarity index 100% rename from ui-ngx/src/app/modules/home/pages/dashboard/add-widget-dialog.component.ts rename to ui-ngx/src/app/modules/home/components/dashboard-page/add-widget-dialog.component.ts diff --git a/ui-ngx/src/app/modules/home/pages/dashboard/dashboard-page.component.html b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.html similarity index 97% rename from ui-ngx/src/app/modules/home/pages/dashboard/dashboard-page.component.html rename to ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.html index 5aae43bec6..97f5071955 100644 --- a/ui-ngx/src/app/modules/home/pages/dashboard/dashboard-page.component.html +++ b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.html @@ -21,7 +21,7 @@
-
@@ -52,6 +52,7 @@ [dashboardId]="dashboard.id ? dashboard.id.id : ''" [isMobile]="isMobile" [state]="dashboardCtx.state" + [currentState]="currentState" [states]="dashboardConfiguration.states">
@@ -183,11 +184,12 @@