Browse Source

Merge pull request #6868 from devaskim/auth_service

[3.4] UI: Add authService to service map and widget context.
pull/6894/head
Igor Kulikov 4 years ago
committed by GitHub
parent
commit
584d59a149
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      ui-ngx/src/app/modules/home/components/widget/dynamic-widget.component.ts
  2. 2
      ui-ngx/src/app/modules/home/models/services.map.ts
  3. 2
      ui-ngx/src/app/modules/home/models/widget-component.models.ts

2
ui-ngx/src/app/modules/home/components/widget/dynamic-widget.component.ts

@ -36,6 +36,7 @@ import { UserService } from '@core/http/user.service';
import { AttributeService } from '@core/http/attribute.service';
import { EntityRelationService } from '@core/http/entity-relation.service';
import { EntityService } from '@core/http/entity.service';
import { AuthService } from '@core/auth/auth.service';
import { DialogService } from '@core/services/dialog.service';
import { CustomDialogService } from '@home/components/widget/dialog/custom-dialog.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.entityRelationService = $injector.get(EntityRelationService);
this.ctx.entityService = $injector.get(EntityService);
this.ctx.authService = $injector.get(AuthService);
this.ctx.dialogs = $injector.get(DialogService);
this.ctx.customDialog = $injector.get(CustomDialogService);
this.ctx.resourceService = $injector.get(ResourceService);

2
ui-ngx/src/app/modules/home/models/services.map.ts

@ -36,6 +36,7 @@ import { BroadcastService } from '@core/services/broadcast.service';
import { ImportExportService } from '@home/components/import-export/import-export.service';
import { DeviceProfileService } from '@core/http/device-profile.service';
import { OtaPackageService } from '@core/http/ota-package.service';
import { AuthService } from '@core/auth/auth.service';
import { ResourceService } from '@core/http/resource.service';
import { TwoFactorAuthenticationService } from '@core/http/two-factor-authentication.service';
@ -62,6 +63,7 @@ export const ServicesMap = new Map<string, Type<any>>(
['importExport', ImportExportService],
['deviceProfileService', DeviceProfileService],
['otaPackageService', OtaPackageService],
['authService', AuthService],
['resourceService', ResourceService],
['twoFactorAuthenticationService', TwoFactorAuthenticationService]
]

2
ui-ngx/src/app/modules/home/models/widget-component.models.ts

@ -71,6 +71,7 @@ import { EntityRelationService } from '@core/http/entity-relation.service';
import { EntityService } from '@core/http/entity.service';
import { DialogService } from '@core/services/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 { DatePipe } from '@angular/common';
import { TranslateService } from '@ngx-translate/core';
@ -158,6 +159,7 @@ export class WidgetContext {
}
}
authService: AuthService;
deviceService: DeviceService;
assetService: AssetService;
entityViewService: EntityViewService;

Loading…
Cancel
Save