UI: Add after test telemetry in device connectivity refresh data

This commit is contained in:
Vladyslav_Prykhodko 2023-08-25 17:15:35 +03:00
parent e83aebead8
commit 36099b4400
3 changed files with 8 additions and 6 deletions

View File

@ -342,7 +342,7 @@
<span fxFlex></span>
<button mat-button
[disabled]="(isLoading$ | async)"
(click)="close()">{{ closeButtonLabel | translate }}</button>
(click)="close()">{{ 'action.close' | translate }}</button>
</div>
<ng-template #loadingCommand>
<div class="tb-loader">

View File

@ -74,7 +74,6 @@ export class DeviceCheckConnectivityDialogComponent extends
showDontShowAgain: boolean;
dialogTitle: string;
closeButtonLabel: string;
notShowAgain = false;
@ -99,11 +98,9 @@ export class DeviceCheckConnectivityDialogComponent extends
if (this.data.afterAdd) {
this.dialogTitle = 'device.connectivity.device-created-check-connectivity';
this.closeButtonLabel = 'action.skip';
this.showDontShowAgain = true;
} else {
this.dialogTitle = 'device.connectivity.check-connectivity';
this.closeButtonLabel = 'action.close';
this.showDontShowAgain = false;
}
}

View File

@ -467,12 +467,13 @@ export class DevicesTableConfigResolver implements Resolve<EntityTableConfig<Dev
}).afterClosed().subscribe(
(res) => {
if (res) {
this.config.updateData();
this.store.pipe(select(selectUserSettingsProperty( 'notDisplayConnectivityAfterAddDevice'))).pipe(
take(1)
).subscribe((settings: boolean) => {
if(!settings) {
this.checkConnectivity(null, res.id, true);
} else {
this.config.updateData();
}
});
}
@ -734,6 +735,10 @@ export class DevicesTableConfigResolver implements Resolve<EntityTableConfig<Dev
}
})
.afterClosed()
.subscribe(() => {});
.subscribe(() => {
if (afterAdd ) {
this.config.updateData();
}
});
}
}