Merge branch 'develop/3.4' into refactoring_tests_alarm_customer
This commit is contained in:
		
						commit
						f36fc44afc
					
				@ -49,6 +49,7 @@ import org.thingsboard.server.common.data.device.profile.RepeatingAlarmCondition
 | 
				
			|||||||
import org.thingsboard.server.common.data.id.CustomerId;
 | 
					import org.thingsboard.server.common.data.id.CustomerId;
 | 
				
			||||||
import org.thingsboard.server.common.data.id.DeviceId;
 | 
					import org.thingsboard.server.common.data.id.DeviceId;
 | 
				
			||||||
import org.thingsboard.server.common.data.id.DeviceProfileId;
 | 
					import org.thingsboard.server.common.data.id.DeviceProfileId;
 | 
				
			||||||
 | 
					import org.thingsboard.server.common.data.id.QueueId;
 | 
				
			||||||
import org.thingsboard.server.common.data.id.TenantId;
 | 
					import org.thingsboard.server.common.data.id.TenantId;
 | 
				
			||||||
import org.thingsboard.server.common.data.kv.AttributeKvEntry;
 | 
					import org.thingsboard.server.common.data.kv.AttributeKvEntry;
 | 
				
			||||||
import org.thingsboard.server.common.data.query.BooleanFilterPredicate;
 | 
					import org.thingsboard.server.common.data.query.BooleanFilterPredicate;
 | 
				
			||||||
 | 
				
			|||||||
@ -28,7 +28,7 @@
 | 
				
			|||||||
  </mat-toolbar>
 | 
					  </mat-toolbar>
 | 
				
			||||||
  <mat-progress-bar color="warn" mode="indeterminate" *ngIf="isLoading$ | async">
 | 
					  <mat-progress-bar color="warn" mode="indeterminate" *ngIf="isLoading$ | async">
 | 
				
			||||||
  </mat-progress-bar>
 | 
					  </mat-progress-bar>
 | 
				
			||||||
  <div mat-dialog-content>
 | 
					  <div mat-dialog-content style="padding: 0;">
 | 
				
			||||||
    <fieldset [disabled]="isLoading$ | async" style="position: relative; height: 600px;">
 | 
					    <fieldset [disabled]="isLoading$ | async" style="position: relative; height: 600px;">
 | 
				
			||||||
      <tb-widget-config
 | 
					      <tb-widget-config
 | 
				
			||||||
        [aliasController]="aliasController"
 | 
					        [aliasController]="aliasController"
 | 
				
			||||||
 | 
				
			|||||||
@ -74,7 +74,7 @@
 | 
				
			|||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </section>
 | 
					    </section>
 | 
				
			||||||
    <section *ngIf="alarmScheduleForm.get('type').value === alarmScheduleType.CUSTOM">
 | 
					    <section *ngIf="alarmScheduleForm.get('type').value === alarmScheduleType.CUSTOM">
 | 
				
			||||||
      <tb-alarm-dynamic-value formControlName = 'dynamicValue' helpId = 'device-profile/alarm_сustom_schedule_format'></tb-alarm-dynamic-value>
 | 
					      <tb-alarm-dynamic-value formControlName = 'dynamicValue' helpId = 'device-profile/alarm_custom_schedule_format'></tb-alarm-dynamic-value>
 | 
				
			||||||
      <div class="tb-small" style="margin-bottom: 0.5em" translate>device-profile.schedule-days</div>
 | 
					      <div class="tb-small" style="margin-bottom: 0.5em" translate>device-profile.schedule-days</div>
 | 
				
			||||||
      <div *ngFor="let day of allDays" fxLayout="column" formArrayName="items" fxLayoutGap="1em">
 | 
					      <div *ngFor="let day of allDays" fxLayout="column" formArrayName="items" fxLayoutGap="1em">
 | 
				
			||||||
        <div fxLayout.xs="column" fxLayout="row" fxLayoutGap="8px" [formGroupName]="''+day" fxLayoutAlign="start center" fxLayoutAlign.xs="center start">
 | 
					        <div fxLayout.xs="column" fxLayout="row" fxLayoutGap="8px" [formGroupName]="''+day" fxLayoutAlign="start center" fxLayoutAlign.xs="center start">
 | 
				
			||||||
 | 
				
			|||||||
@ -290,9 +290,7 @@ export class AlarmsTableWidgetComponent extends PageComponent implements OnInit,
 | 
				
			|||||||
        debounceTime(150),
 | 
					        debounceTime(150),
 | 
				
			||||||
        distinctUntilChanged(),
 | 
					        distinctUntilChanged(),
 | 
				
			||||||
        tap(() => {
 | 
					        tap(() => {
 | 
				
			||||||
          if (this.displayPagination) {
 | 
					          this.resetPageIndex();
 | 
				
			||||||
            this.paginator.pageIndex = 0;
 | 
					 | 
				
			||||||
          }
 | 
					 | 
				
			||||||
          this.updateData();
 | 
					          this.updateData();
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
      )
 | 
					      )
 | 
				
			||||||
@ -556,6 +554,12 @@ export class AlarmsTableWidgetComponent extends PageComponent implements OnInit,
 | 
				
			|||||||
    this.ctx.detectChanges();
 | 
					    this.ctx.detectChanges();
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  private resetPageIndex(): void {
 | 
				
			||||||
 | 
					    if (this.displayPagination) {
 | 
				
			||||||
 | 
					      this.paginator.pageIndex = 0;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  private editAlarmFilter($event: Event) {
 | 
					  private editAlarmFilter($event: Event) {
 | 
				
			||||||
    if ($event) {
 | 
					    if ($event) {
 | 
				
			||||||
      $event.stopPropagation();
 | 
					      $event.stopPropagation();
 | 
				
			||||||
@ -600,6 +604,7 @@ export class AlarmsTableWidgetComponent extends PageComponent implements OnInit,
 | 
				
			|||||||
        this.pageLink.statusList = result.statusList;
 | 
					        this.pageLink.statusList = result.statusList;
 | 
				
			||||||
        this.pageLink.severityList = result.severityList;
 | 
					        this.pageLink.severityList = result.severityList;
 | 
				
			||||||
        this.pageLink.typeList = result.typeList;
 | 
					        this.pageLink.typeList = result.typeList;
 | 
				
			||||||
 | 
					        this.resetPageIndex();
 | 
				
			||||||
        this.updateData();
 | 
					        this.updateData();
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
@ -620,9 +625,7 @@ export class AlarmsTableWidgetComponent extends PageComponent implements OnInit,
 | 
				
			|||||||
  exitFilterMode() {
 | 
					  exitFilterMode() {
 | 
				
			||||||
    this.textSearchMode = false;
 | 
					    this.textSearchMode = false;
 | 
				
			||||||
    this.pageLink.textSearch = null;
 | 
					    this.pageLink.textSearch = null;
 | 
				
			||||||
    if (this.displayPagination) {
 | 
					    this.resetPageIndex();
 | 
				
			||||||
      this.paginator.pageIndex = 0;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    this.updateData();
 | 
					    this.updateData();
 | 
				
			||||||
    this.ctx.hideTitlePanel = false;
 | 
					    this.ctx.hideTitlePanel = false;
 | 
				
			||||||
    this.ctx.detectChanges(true);
 | 
					    this.ctx.detectChanges(true);
 | 
				
			||||||
@ -959,7 +962,7 @@ export class AlarmsTableWidgetComponent extends PageComponent implements OnInit,
 | 
				
			|||||||
        } else if (alarmField.value === alarmFields.severity.value) {
 | 
					        } else if (alarmField.value === alarmFields.severity.value) {
 | 
				
			||||||
          return this.translate.instant(alarmSeverityTranslations.get(value));
 | 
					          return this.translate.instant(alarmSeverityTranslations.get(value));
 | 
				
			||||||
        } else if (alarmField.value === alarmFields.status.value) {
 | 
					        } else if (alarmField.value === alarmFields.status.value) {
 | 
				
			||||||
          return this.translate.instant(alarmStatusTranslations.get(value));
 | 
					          return alarmStatusTranslations.get(value) ? this.translate.instant(alarmStatusTranslations.get(value)) : value;
 | 
				
			||||||
        } else if (alarmField.value === alarmFields.originatorType.value) {
 | 
					        } else if (alarmField.value === alarmFields.originatorType.value) {
 | 
				
			||||||
          return this.translate.instant(entityTypeTranslations.get(value).type);
 | 
					          return this.translate.instant(entityTypeTranslations.get(value).type);
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user