Browse Source
Merge pull request #9133 from vvlladd28/improvement/device-connectivity/updated-data
Improve device connectivity dialog
pull/9151/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
8 additions and
6 deletions
-
ui-ngx/src/app/modules/home/pages/device/device-check-connectivity-dialog.component.html
-
ui-ngx/src/app/modules/home/pages/device/device-check-connectivity-dialog.component.ts
-
ui-ngx/src/app/modules/home/pages/device/devices-table-config.resolver.ts
|
|
@ -342,7 +342,7 @@ |
|
|
<span fxFlex></span> |
|
|
<span fxFlex></span> |
|
|
<button mat-button |
|
|
<button mat-button |
|
|
[disabled]="(isLoading$ | async)" |
|
|
[disabled]="(isLoading$ | async)" |
|
|
(click)="close()">{{ closeButtonLabel | translate }}</button> |
|
|
(click)="close()">{{ 'action.close' | translate }}</button> |
|
|
</div> |
|
|
</div> |
|
|
<ng-template #loadingCommand> |
|
|
<ng-template #loadingCommand> |
|
|
<div class="tb-loader"> |
|
|
<div class="tb-loader"> |
|
|
|
|
|
@ -74,7 +74,6 @@ export class DeviceCheckConnectivityDialogComponent extends |
|
|
|
|
|
|
|
|
showDontShowAgain: boolean; |
|
|
showDontShowAgain: boolean; |
|
|
dialogTitle: string; |
|
|
dialogTitle: string; |
|
|
closeButtonLabel: string; |
|
|
|
|
|
|
|
|
|
|
|
notShowAgain = false; |
|
|
notShowAgain = false; |
|
|
|
|
|
|
|
|
@ -99,11 +98,9 @@ export class DeviceCheckConnectivityDialogComponent extends |
|
|
|
|
|
|
|
|
if (this.data.afterAdd) { |
|
|
if (this.data.afterAdd) { |
|
|
this.dialogTitle = 'device.connectivity.device-created-check-connectivity'; |
|
|
this.dialogTitle = 'device.connectivity.device-created-check-connectivity'; |
|
|
this.closeButtonLabel = 'action.skip'; |
|
|
|
|
|
this.showDontShowAgain = true; |
|
|
this.showDontShowAgain = true; |
|
|
} else { |
|
|
} else { |
|
|
this.dialogTitle = 'device.connectivity.check-connectivity'; |
|
|
this.dialogTitle = 'device.connectivity.check-connectivity'; |
|
|
this.closeButtonLabel = 'action.close'; |
|
|
|
|
|
this.showDontShowAgain = false; |
|
|
this.showDontShowAgain = false; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
@ -467,12 +467,13 @@ export class DevicesTableConfigResolver implements Resolve<EntityTableConfig<Dev |
|
|
}).afterClosed().subscribe( |
|
|
}).afterClosed().subscribe( |
|
|
(res) => { |
|
|
(res) => { |
|
|
if (res) { |
|
|
if (res) { |
|
|
this.config.updateData(); |
|
|
|
|
|
this.store.pipe(select(selectUserSettingsProperty( 'notDisplayConnectivityAfterAddDevice'))).pipe( |
|
|
this.store.pipe(select(selectUserSettingsProperty( 'notDisplayConnectivityAfterAddDevice'))).pipe( |
|
|
take(1) |
|
|
take(1) |
|
|
).subscribe((settings: boolean) => { |
|
|
).subscribe((settings: boolean) => { |
|
|
if(!settings) { |
|
|
if(!settings) { |
|
|
this.checkConnectivity(null, res.id, true); |
|
|
this.checkConnectivity(null, res.id, true); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.config.updateData(); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
@ -734,6 +735,10 @@ export class DevicesTableConfigResolver implements Resolve<EntityTableConfig<Dev |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
.afterClosed() |
|
|
.afterClosed() |
|
|
.subscribe(() => {}); |
|
|
.subscribe(() => { |
|
|
|
|
|
if (afterAdd ) { |
|
|
|
|
|
this.config.updateData(); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|