UI: Add after test telemetry in device connectivity refresh data
This commit is contained in:
		
							parent
							
								
									e83aebead8
								
							
						
					
					
						commit
						36099b4400
					
				@ -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">
 | 
			
		||||
 | 
			
		||||
@ -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;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@ -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();
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user