Browse Source

Merge pull request #4778 from deaflynx/edge/fix-manage-device-credentials

Hide Manage credentials for 'edge_customer_user' device scope
pull/4851/head
Igor Kulikov 5 years ago
committed by GitHub
parent
commit
386ccd5dbb
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      ui-ngx/src/app/modules/home/pages/device/device.component.html
  2. 2
      ui-ngx/src/app/modules/home/pages/device/device.component.ts
  3. 2
      ui-ngx/src/app/modules/home/pages/device/devices-table-config.resolver.ts

2
ui-ngx/src/app/modules/home/pages/device/device.component.html

@ -38,7 +38,7 @@
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'manageCredentials')" (click)="onEntityAction($event, 'manageCredentials')"
[fxShow]="!isEdit"> [fxShow]="!isEdit">
{{ (deviceScope === 'customer_user' ? 'device.view-credentials' : 'device.manage-credentials') | translate }} {{ ((deviceScope === 'customer_user' || deviceScope === 'edge_customer_user') ? 'device.view-credentials' : 'device.manage-credentials') | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"

2
ui-ngx/src/app/modules/home/pages/device/device.component.ts

@ -48,7 +48,7 @@ export class DeviceComponent extends EntityComponent<DeviceInfo> {
deviceCredentials$: Subject<DeviceCredentials>; deviceCredentials$: Subject<DeviceCredentials>;
deviceScope: 'tenant' | 'customer' | 'customer_user' | 'edge'; deviceScope: 'tenant' | 'customer' | 'customer_user' | 'edge' | 'edge_customer_user';
otaUpdateType = OtaUpdateType; otaUpdateType = OtaUpdateType;

2
ui-ngx/src/app/modules/home/pages/device/devices-table-config.resolver.ts

@ -528,7 +528,7 @@ export class DevicesTableConfigResolver implements Resolve<EntityTableConfig<Dev
panelClass: ['tb-dialog', 'tb-fullscreen-dialog'], panelClass: ['tb-dialog', 'tb-fullscreen-dialog'],
data: { data: {
deviceId: device.id.id, deviceId: device.id.id,
isReadOnly: this.config.componentsData.deviceScope === 'customer_user' isReadOnly: this.config.componentsData.deviceScope === 'customer_user' || this.config.componentsData.deviceScope === 'edge_customer_user'
} }
}).afterClosed().subscribe(deviceCredentials => { }).afterClosed().subscribe(deviceCredentials => {
if (isDefinedAndNotNull(deviceCredentials)) { if (isDefinedAndNotNull(deviceCredentials)) {

Loading…
Cancel
Save