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>
 | 
					  <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();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user