Browse Source

UI: Refactoring

pull/7780/head
Artem Dzhereleiko 4 years ago
parent
commit
f2088ad53b
  1. 8
      ui-ngx/src/app/modules/home/components/filter/filter-predicate-list.component.ts
  2. 2
      ui-ngx/src/app/modules/home/components/filter/key-filter-list.component.ts
  3. 2
      ui-ngx/src/app/modules/home/components/profile/alarm/create-alarm-rules.component.ts
  4. 5
      ui-ngx/src/app/modules/home/components/profile/alarm/device-profile-alarms.component.ts
  5. 2
      ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-bootstrap-config-servers.component.ts
  6. 2
      ui-ngx/src/app/modules/home/components/profile/queue/tenant-profile-queues.component.ts
  7. 2
      ui-ngx/src/app/modules/home/components/relation/relation-filters.component.ts
  8. 2
      ui-ngx/src/app/shared/components/kv-map.component.ts

8
ui-ngx/src/app/modules/home/components/filter/filter-predicate-list.component.ts

@ -27,7 +27,7 @@ import {
Validator,
Validators
} from '@angular/forms';
import { Observable, of, Subject, Subscription } from 'rxjs';
import { Observable, of, Subject } from 'rxjs';
import {
ComplexFilterPredicateInfo,
ComplexOperation,
@ -81,11 +81,9 @@ export class FilterPredicateListComponent implements ControlValueAccessor, Valid
complexOperationTranslations = complexOperationTranslationMap;
private destroy$ = new Subject();
private destroy$ = new Subject<void>();
private propagateChange = null;
private valueChangeSubscription: Subscription = null;
constructor(private fb: UntypedFormBuilder,
@Inject(COMPLEX_FILTER_PREDICATE_DIALOG_COMPONENT_TOKEN) private complexFilterPredicateDialogComponent: ComponentType<any>,
private dialog: MatDialog) {
@ -151,7 +149,7 @@ export class FilterPredicateListComponent implements ControlValueAccessor, Valid
}
public removePredicate(index: number) {
(this.filterListFormGroup.get('predicates') as UntypedFormArray).removeAt(index);
this.predicatesFormArray.removeAt(index);
}
public addPredicate(complex: boolean) {

2
ui-ngx/src/app/modules/home/components/filter/key-filter-list.component.ts

@ -76,7 +76,7 @@ export class KeyFilterListComponent implements ControlValueAccessor, Validator,
keyFiltersControl: UntypedFormControl;
private destroy$ = new Subject();
private destroy$ = new Subject<void>();
private propagateChange = null;
constructor(private fb: UntypedFormBuilder,

2
ui-ngx/src/app/modules/home/components/profile/alarm/create-alarm-rules.component.ts

@ -68,7 +68,7 @@ export class CreateAlarmRulesComponent implements ControlValueAccessor, OnInit,
private usedSeverities: AlarmSeverity[] = [];
private destroy$ = new Subject();
private destroy$ = new Subject<void>();
private propagateChange = (v: any) => { };
constructor(private dialog: MatDialog,

5
ui-ngx/src/app/modules/home/components/profile/alarm/device-profile-alarms.component.ts

@ -72,12 +72,11 @@ export class DeviceProfileAlarmsComponent implements ControlValueAccessor, OnIni
@Input()
deviceProfileId: EntityId;
private destroy$ = new Subject();
private destroy$ = new Subject<void>();
private propagateChange = (v: any) => { };
constructor(private store: Store<AppState>,
private fb: UntypedFormBuilder,
private dialog: MatDialog) {
private fb: UntypedFormBuilder) {
}
registerOnChange(fn: any): void {

2
ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-bootstrap-config-servers.component.ts

@ -72,7 +72,7 @@ export class Lwm2mBootstrapConfigServersComponent implements OnInit, ControlValu
}
}
private destroy$ = new Subject();
private destroy$ = new Subject<void>();
private propagateChange = (v: any) => { };
constructor(public translate: TranslateService,

2
ui-ngx/src/app/modules/home/components/profile/queue/tenant-profile-queues.component.ts

@ -71,7 +71,7 @@ export class TenantProfileQueuesComponent implements ControlValueAccessor, Valid
@Input()
disabled: boolean;
private destroy$ = new Subject();
private destroy$ = new Subject<void>();
private propagateChange = (v: any) => { };
constructor(private store: Store<AppState>,

2
ui-ngx/src/app/modules/home/components/relation/relation-filters.component.ts

@ -51,7 +51,7 @@ export class RelationFiltersComponent extends PageComponent implements ControlVa
relationFiltersFormGroup: UntypedFormGroup;
private destroy$ = new Subject();
private destroy$ = new Subject<void>();
private propagateChange = null;
constructor(protected store: Store<AppState>,

2
ui-ngx/src/app/shared/components/kv-map.component.ts

@ -64,7 +64,7 @@ export class KeyValMapComponent extends PageComponent implements ControlValueAcc
kvListFormGroup: UntypedFormGroup;
private destroy$ = new Subject();
private destroy$ = new Subject<void>();
private propagateChange = null;
constructor(protected store: Store<AppState>,

Loading…
Cancel
Save