Merge pull request #6868 from devaskim/auth_service
[3.4] UI: Add authService to service map and widget context.
This commit is contained in:
commit
584d59a149
@ -36,6 +36,7 @@ import { UserService } from '@core/http/user.service';
|
|||||||
import { AttributeService } from '@core/http/attribute.service';
|
import { AttributeService } from '@core/http/attribute.service';
|
||||||
import { EntityRelationService } from '@core/http/entity-relation.service';
|
import { EntityRelationService } from '@core/http/entity-relation.service';
|
||||||
import { EntityService } from '@core/http/entity.service';
|
import { EntityService } from '@core/http/entity.service';
|
||||||
|
import { AuthService } from '@core/auth/auth.service';
|
||||||
import { DialogService } from '@core/services/dialog.service';
|
import { DialogService } from '@core/services/dialog.service';
|
||||||
import { CustomDialogService } from '@home/components/widget/dialog/custom-dialog.service';
|
import { CustomDialogService } from '@home/components/widget/dialog/custom-dialog.service';
|
||||||
import { ResourceService } from '@core/http/resource.service';
|
import { ResourceService } from '@core/http/resource.service';
|
||||||
@ -75,6 +76,7 @@ export class DynamicWidgetComponent extends PageComponent implements IDynamicWid
|
|||||||
this.ctx.attributeService = $injector.get(AttributeService);
|
this.ctx.attributeService = $injector.get(AttributeService);
|
||||||
this.ctx.entityRelationService = $injector.get(EntityRelationService);
|
this.ctx.entityRelationService = $injector.get(EntityRelationService);
|
||||||
this.ctx.entityService = $injector.get(EntityService);
|
this.ctx.entityService = $injector.get(EntityService);
|
||||||
|
this.ctx.authService = $injector.get(AuthService);
|
||||||
this.ctx.dialogs = $injector.get(DialogService);
|
this.ctx.dialogs = $injector.get(DialogService);
|
||||||
this.ctx.customDialog = $injector.get(CustomDialogService);
|
this.ctx.customDialog = $injector.get(CustomDialogService);
|
||||||
this.ctx.resourceService = $injector.get(ResourceService);
|
this.ctx.resourceService = $injector.get(ResourceService);
|
||||||
|
|||||||
@ -36,6 +36,7 @@ import { BroadcastService } from '@core/services/broadcast.service';
|
|||||||
import { ImportExportService } from '@home/components/import-export/import-export.service';
|
import { ImportExportService } from '@home/components/import-export/import-export.service';
|
||||||
import { DeviceProfileService } from '@core/http/device-profile.service';
|
import { DeviceProfileService } from '@core/http/device-profile.service';
|
||||||
import { OtaPackageService } from '@core/http/ota-package.service';
|
import { OtaPackageService } from '@core/http/ota-package.service';
|
||||||
|
import { AuthService } from '@core/auth/auth.service';
|
||||||
import { ResourceService } from '@core/http/resource.service';
|
import { ResourceService } from '@core/http/resource.service';
|
||||||
import { TwoFactorAuthenticationService } from '@core/http/two-factor-authentication.service';
|
import { TwoFactorAuthenticationService } from '@core/http/two-factor-authentication.service';
|
||||||
|
|
||||||
@ -62,6 +63,7 @@ export const ServicesMap = new Map<string, Type<any>>(
|
|||||||
['importExport', ImportExportService],
|
['importExport', ImportExportService],
|
||||||
['deviceProfileService', DeviceProfileService],
|
['deviceProfileService', DeviceProfileService],
|
||||||
['otaPackageService', OtaPackageService],
|
['otaPackageService', OtaPackageService],
|
||||||
|
['authService', AuthService],
|
||||||
['resourceService', ResourceService],
|
['resourceService', ResourceService],
|
||||||
['twoFactorAuthenticationService', TwoFactorAuthenticationService]
|
['twoFactorAuthenticationService', TwoFactorAuthenticationService]
|
||||||
]
|
]
|
||||||
|
|||||||
@ -71,6 +71,7 @@ import { EntityRelationService } from '@core/http/entity-relation.service';
|
|||||||
import { EntityService } from '@core/http/entity.service';
|
import { EntityService } from '@core/http/entity.service';
|
||||||
import { DialogService } from '@core/services/dialog.service';
|
import { DialogService } from '@core/services/dialog.service';
|
||||||
import { CustomDialogService } from '@home/components/widget/dialog/custom-dialog.service';
|
import { CustomDialogService } from '@home/components/widget/dialog/custom-dialog.service';
|
||||||
|
import { AuthService } from '@core/auth/auth.service';
|
||||||
import { ResourceService } from '@core/http/resource.service';
|
import { ResourceService } from '@core/http/resource.service';
|
||||||
import { DatePipe } from '@angular/common';
|
import { DatePipe } from '@angular/common';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
@ -158,6 +159,7 @@ export class WidgetContext {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
authService: AuthService;
|
||||||
deviceService: DeviceService;
|
deviceService: DeviceService;
|
||||||
assetService: AssetService;
|
assetService: AssetService;
|
||||||
entityViewService: EntityViewService;
|
entityViewService: EntityViewService;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user