UI: Change queueId to queueName
This commit is contained in:
parent
113bfa9d05
commit
ff9e6505b3
@ -35,6 +35,10 @@ export class QueueService {
|
|||||||
return this.http.get<QueueInfo>(`/api/queues/${queueId}`, defaultHttpOptionsFromConfig(config));
|
return this.http.get<QueueInfo>(`/api/queues/${queueId}`, defaultHttpOptionsFromConfig(config));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public getQueueByName(queueName: string, config?: RequestConfig): Observable<QueueInfo> {
|
||||||
|
return this.http.get<QueueInfo>(`/api/queues/name/${queueName}`, defaultHttpOptionsFromConfig(config));
|
||||||
|
}
|
||||||
|
|
||||||
public getTenantQueuesByServiceType(pageLink: PageLink,
|
public getTenantQueuesByServiceType(pageLink: PageLink,
|
||||||
serviceType: ServiceType,
|
serviceType: ServiceType,
|
||||||
config?: RequestConfig): Observable<PageData<QueueInfo>> {
|
config?: RequestConfig): Observable<PageData<QueueInfo>> {
|
||||||
|
|||||||
@ -56,7 +56,7 @@
|
|||||||
</tb-dashboard-autocomplete>
|
</tb-dashboard-autocomplete>
|
||||||
<tb-queue-autocomplete
|
<tb-queue-autocomplete
|
||||||
[queueType]="serviceType"
|
[queueType]="serviceType"
|
||||||
formControlName="defaultQueueId">
|
formControlName="defaultQueueName">
|
||||||
</tb-queue-autocomplete>
|
</tb-queue-autocomplete>
|
||||||
<mat-form-field fxHide class="mat-block">
|
<mat-form-field fxHide class="mat-block">
|
||||||
<mat-label translate>device-profile.type</mat-label>
|
<mat-label translate>device-profile.type</mat-label>
|
||||||
|
|||||||
@ -50,7 +50,6 @@ import { StepperSelectionEvent } from '@angular/cdk/stepper';
|
|||||||
import { deepTrim } from '@core/utils';
|
import { deepTrim } from '@core/utils';
|
||||||
import { ServiceType } from '@shared/models/queue.models';
|
import { ServiceType } from '@shared/models/queue.models';
|
||||||
import { DashboardId } from '@shared/models/id/dashboard-id';
|
import { DashboardId } from '@shared/models/id/dashboard-id';
|
||||||
import { QueueId } from '@shared/models/id/queue-id';
|
|
||||||
|
|
||||||
export interface AddDeviceProfileDialogData {
|
export interface AddDeviceProfileDialogData {
|
||||||
deviceProfileName: string;
|
deviceProfileName: string;
|
||||||
@ -111,7 +110,7 @@ export class AddDeviceProfileDialogComponent extends
|
|||||||
image: [null, []],
|
image: [null, []],
|
||||||
defaultRuleChainId: [null, []],
|
defaultRuleChainId: [null, []],
|
||||||
defaultDashboardId: [null, []],
|
defaultDashboardId: [null, []],
|
||||||
defaultQueueId: [null, []],
|
defaultQueueName: [null, []],
|
||||||
description: ['', []]
|
description: ['', []]
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -188,6 +187,7 @@ export class AddDeviceProfileDialogComponent extends
|
|||||||
name: this.deviceProfileDetailsFormGroup.get('name').value,
|
name: this.deviceProfileDetailsFormGroup.get('name').value,
|
||||||
type: this.deviceProfileDetailsFormGroup.get('type').value,
|
type: this.deviceProfileDetailsFormGroup.get('type').value,
|
||||||
image: this.deviceProfileDetailsFormGroup.get('image').value,
|
image: this.deviceProfileDetailsFormGroup.get('image').value,
|
||||||
|
defaultQueueName: this.deviceProfileDetailsFormGroup.get('defaultQueueName').value,
|
||||||
transportType: this.transportConfigFormGroup.get('transportType').value,
|
transportType: this.transportConfigFormGroup.get('transportType').value,
|
||||||
provisionType: deviceProvisionConfiguration.type,
|
provisionType: deviceProvisionConfiguration.type,
|
||||||
provisionDeviceKey,
|
provisionDeviceKey,
|
||||||
@ -205,9 +205,6 @@ export class AddDeviceProfileDialogComponent extends
|
|||||||
if (this.deviceProfileDetailsFormGroup.get('defaultDashboardId').value) {
|
if (this.deviceProfileDetailsFormGroup.get('defaultDashboardId').value) {
|
||||||
deviceProfile.defaultDashboardId = new DashboardId(this.deviceProfileDetailsFormGroup.get('defaultDashboardId').value);
|
deviceProfile.defaultDashboardId = new DashboardId(this.deviceProfileDetailsFormGroup.get('defaultDashboardId').value);
|
||||||
}
|
}
|
||||||
if (this.deviceProfileDetailsFormGroup.get('defaultQueueId').value) {
|
|
||||||
deviceProfile.defaultQueueId = new QueueId(this.deviceProfileDetailsFormGroup.get('defaultQueueId').value);
|
|
||||||
}
|
|
||||||
this.deviceProfileService.saveDeviceProfile(deepTrim(deviceProfile)).subscribe(
|
this.deviceProfileService.saveDeviceProfile(deepTrim(deviceProfile)).subscribe(
|
||||||
(savedDeviceProfile) => {
|
(savedDeviceProfile) => {
|
||||||
this.dialogRef.close(savedDeviceProfile);
|
this.dialogRef.close(savedDeviceProfile);
|
||||||
|
|||||||
@ -75,7 +75,7 @@
|
|||||||
</tb-dashboard-autocomplete>
|
</tb-dashboard-autocomplete>
|
||||||
<tb-queue-autocomplete
|
<tb-queue-autocomplete
|
||||||
[queueType]="serviceType"
|
[queueType]="serviceType"
|
||||||
formControlName="defaultQueueId">
|
formControlName="defaultQueueName">
|
||||||
</tb-queue-autocomplete>
|
</tb-queue-autocomplete>
|
||||||
<tb-ota-package-autocomplete
|
<tb-ota-package-autocomplete
|
||||||
[useFullEntityId]="true"
|
[useFullEntityId]="true"
|
||||||
|
|||||||
@ -42,7 +42,6 @@ import { ServiceType } from '@shared/models/queue.models';
|
|||||||
import { EntityId } from '@shared/models/id/entity-id';
|
import { EntityId } from '@shared/models/id/entity-id';
|
||||||
import { OtaUpdateType } from '@shared/models/ota-package.models';
|
import { OtaUpdateType } from '@shared/models/ota-package.models';
|
||||||
import { DashboardId } from '@shared/models/id/dashboard-id';
|
import { DashboardId } from '@shared/models/id/dashboard-id';
|
||||||
import { QueueId } from '@shared/models/id/queue-id';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'tb-device-profile',
|
selector: 'tb-device-profile',
|
||||||
@ -118,7 +117,7 @@ export class DeviceProfileComponent extends EntityComponent<DeviceProfile> {
|
|||||||
}),
|
}),
|
||||||
defaultRuleChainId: [entity && entity.defaultRuleChainId ? entity.defaultRuleChainId.id : null, []],
|
defaultRuleChainId: [entity && entity.defaultRuleChainId ? entity.defaultRuleChainId.id : null, []],
|
||||||
defaultDashboardId: [entity && entity.defaultDashboardId ? entity.defaultDashboardId.id : null, []],
|
defaultDashboardId: [entity && entity.defaultDashboardId ? entity.defaultDashboardId.id : null, []],
|
||||||
defaultQueueId: [entity && entity.defaultQueueId ? entity.defaultQueueId.id : null, []],
|
defaultQueueName: [entity ? entity.defaultQueueName : null, []],
|
||||||
firmwareId: [entity ? entity.firmwareId : null],
|
firmwareId: [entity ? entity.firmwareId : null],
|
||||||
softwareId: [entity ? entity.softwareId : null],
|
softwareId: [entity ? entity.softwareId : null],
|
||||||
description: [entity ? entity.description : '', []],
|
description: [entity ? entity.description : '', []],
|
||||||
@ -198,7 +197,7 @@ export class DeviceProfileComponent extends EntityComponent<DeviceProfile> {
|
|||||||
}}, {emitEvent: false});
|
}}, {emitEvent: false});
|
||||||
this.entityForm.patchValue({defaultRuleChainId: entity.defaultRuleChainId ? entity.defaultRuleChainId.id : null}, {emitEvent: false});
|
this.entityForm.patchValue({defaultRuleChainId: entity.defaultRuleChainId ? entity.defaultRuleChainId.id : null}, {emitEvent: false});
|
||||||
this.entityForm.patchValue({defaultDashboardId: entity.defaultDashboardId ? entity.defaultDashboardId.id : null}, {emitEvent: false});
|
this.entityForm.patchValue({defaultDashboardId: entity.defaultDashboardId ? entity.defaultDashboardId.id : null}, {emitEvent: false});
|
||||||
this.entityForm.patchValue({defaultQueueId: entity.defaultQueueId ? entity.defaultQueueId.id : null}, {emitEvent: false});
|
this.entityForm.patchValue({defaultQueueName: entity.defaultQueueName}, {emitEvent: false});
|
||||||
this.entityForm.patchValue({firmwareId: entity.firmwareId}, {emitEvent: false});
|
this.entityForm.patchValue({firmwareId: entity.firmwareId}, {emitEvent: false});
|
||||||
this.entityForm.patchValue({softwareId: entity.softwareId}, {emitEvent: false});
|
this.entityForm.patchValue({softwareId: entity.softwareId}, {emitEvent: false});
|
||||||
this.entityForm.patchValue({description: entity.description}, {emitEvent: false});
|
this.entityForm.patchValue({description: entity.description}, {emitEvent: false});
|
||||||
@ -211,9 +210,6 @@ export class DeviceProfileComponent extends EntityComponent<DeviceProfile> {
|
|||||||
if (formValue.defaultDashboardId) {
|
if (formValue.defaultDashboardId) {
|
||||||
formValue.defaultDashboardId = new DashboardId(formValue.defaultDashboardId);
|
formValue.defaultDashboardId = new DashboardId(formValue.defaultDashboardId);
|
||||||
}
|
}
|
||||||
if (formValue.defaultQueueId) {
|
|
||||||
formValue.defaultQueueId = new QueueId(formValue.defaultQueueId);
|
|
||||||
}
|
|
||||||
const deviceProvisionConfiguration: DeviceProvisionConfiguration = formValue.profileData.provisionConfiguration;
|
const deviceProvisionConfiguration: DeviceProvisionConfiguration = formValue.profileData.provisionConfiguration;
|
||||||
formValue.provisionType = deviceProvisionConfiguration.type;
|
formValue.provisionType = deviceProvisionConfiguration.type;
|
||||||
formValue.provisionDeviceKey = deviceProvisionConfiguration.provisionDeviceKey;
|
formValue.provisionDeviceKey = deviceProvisionConfiguration.provisionDeviceKey;
|
||||||
|
|||||||
@ -95,7 +95,7 @@
|
|||||||
<tb-queue-autocomplete
|
<tb-queue-autocomplete
|
||||||
[ngClass]="{invisible: deviceWizardFormGroup.get('addProfileType').value !== 1}"
|
[ngClass]="{invisible: deviceWizardFormGroup.get('addProfileType').value !== 1}"
|
||||||
[queueType]="serviceType"
|
[queueType]="serviceType"
|
||||||
formControlName="defaultQueueId">
|
formControlName="defaultQueueName">
|
||||||
</tb-queue-autocomplete>
|
</tb-queue-autocomplete>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -49,7 +49,6 @@ import { MediaBreakpoints } from '@shared/models/constants';
|
|||||||
import { RuleChainId } from '@shared/models/id/rule-chain-id';
|
import { RuleChainId } from '@shared/models/id/rule-chain-id';
|
||||||
import { ServiceType } from '@shared/models/queue.models';
|
import { ServiceType } from '@shared/models/queue.models';
|
||||||
import { deepTrim } from '@core/utils';
|
import { deepTrim } from '@core/utils';
|
||||||
import { QueueId } from '@shared/models/id/queue-id';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'tb-device-wizard',
|
selector: 'tb-device-wizard',
|
||||||
@ -114,7 +113,7 @@ export class DeviceWizardDialogComponent extends
|
|||||||
deviceProfileId: [null, Validators.required],
|
deviceProfileId: [null, Validators.required],
|
||||||
newDeviceProfileTitle: [{value: null, disabled: true}],
|
newDeviceProfileTitle: [{value: null, disabled: true}],
|
||||||
defaultRuleChainId: [{value: null, disabled: true}],
|
defaultRuleChainId: [{value: null, disabled: true}],
|
||||||
defaultQueueId: [{value: null, disabled: true}],
|
defaultQueueName: [{value: null, disabled: true}],
|
||||||
description: ['']
|
description: ['']
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -127,7 +126,7 @@ export class DeviceWizardDialogComponent extends
|
|||||||
this.deviceWizardFormGroup.get('newDeviceProfileTitle').setValidators(null);
|
this.deviceWizardFormGroup.get('newDeviceProfileTitle').setValidators(null);
|
||||||
this.deviceWizardFormGroup.get('newDeviceProfileTitle').disable();
|
this.deviceWizardFormGroup.get('newDeviceProfileTitle').disable();
|
||||||
this.deviceWizardFormGroup.get('defaultRuleChainId').disable();
|
this.deviceWizardFormGroup.get('defaultRuleChainId').disable();
|
||||||
this.deviceWizardFormGroup.get('defaultQueueId').disable();
|
this.deviceWizardFormGroup.get('defaultQueueName').disable();
|
||||||
this.deviceWizardFormGroup.updateValueAndValidity();
|
this.deviceWizardFormGroup.updateValueAndValidity();
|
||||||
this.createProfile = false;
|
this.createProfile = false;
|
||||||
} else {
|
} else {
|
||||||
@ -136,7 +135,7 @@ export class DeviceWizardDialogComponent extends
|
|||||||
this.deviceWizardFormGroup.get('newDeviceProfileTitle').setValidators([Validators.required]);
|
this.deviceWizardFormGroup.get('newDeviceProfileTitle').setValidators([Validators.required]);
|
||||||
this.deviceWizardFormGroup.get('newDeviceProfileTitle').enable();
|
this.deviceWizardFormGroup.get('newDeviceProfileTitle').enable();
|
||||||
this.deviceWizardFormGroup.get('defaultRuleChainId').enable();
|
this.deviceWizardFormGroup.get('defaultRuleChainId').enable();
|
||||||
this.deviceWizardFormGroup.get('defaultQueueId').enable();
|
this.deviceWizardFormGroup.get('defaultQueueName').enable();
|
||||||
|
|
||||||
this.deviceWizardFormGroup.updateValueAndValidity();
|
this.deviceWizardFormGroup.updateValueAndValidity();
|
||||||
this.createProfile = true;
|
this.createProfile = true;
|
||||||
@ -298,6 +297,7 @@ export class DeviceWizardDialogComponent extends
|
|||||||
const deviceProfile: DeviceProfile = {
|
const deviceProfile: DeviceProfile = {
|
||||||
name: this.deviceWizardFormGroup.get('newDeviceProfileTitle').value,
|
name: this.deviceWizardFormGroup.get('newDeviceProfileTitle').value,
|
||||||
type: DeviceProfileType.DEFAULT,
|
type: DeviceProfileType.DEFAULT,
|
||||||
|
defaultQueueName: this.deviceWizardFormGroup.get('defaultQueueName').value,
|
||||||
transportType: this.transportConfigFormGroup.get('transportType').value,
|
transportType: this.transportConfigFormGroup.get('transportType').value,
|
||||||
provisionType: deviceProvisionConfiguration.type,
|
provisionType: deviceProvisionConfiguration.type,
|
||||||
provisionDeviceKey,
|
provisionDeviceKey,
|
||||||
@ -311,9 +311,6 @@ export class DeviceWizardDialogComponent extends
|
|||||||
if (this.deviceWizardFormGroup.get('defaultRuleChainId').value) {
|
if (this.deviceWizardFormGroup.get('defaultRuleChainId').value) {
|
||||||
deviceProfile.defaultRuleChainId = new RuleChainId(this.deviceWizardFormGroup.get('defaultRuleChainId').value);
|
deviceProfile.defaultRuleChainId = new RuleChainId(this.deviceWizardFormGroup.get('defaultRuleChainId').value);
|
||||||
}
|
}
|
||||||
if (this.deviceWizardFormGroup.get('defaultQueueId').value) {
|
|
||||||
deviceProfile.defaultQueueId = new QueueId(this.deviceWizardFormGroup.get('defaultQueueId').value);
|
|
||||||
}
|
|
||||||
return this.deviceProfileService.saveDeviceProfile(deepTrim(deviceProfile)).pipe(
|
return this.deviceProfileService.saveDeviceProfile(deepTrim(deviceProfile)).pipe(
|
||||||
tap((profile) => {
|
tap((profile) => {
|
||||||
this.currentDeviceProfileTransportType = profile.transportType;
|
this.currentDeviceProfileTransportType = profile.transportType;
|
||||||
|
|||||||
@ -18,11 +18,11 @@
|
|||||||
<mat-form-field [formGroup]="selectQueueFormGroup" class="mat-block autocomplete-queue">
|
<mat-form-field [formGroup]="selectQueueFormGroup" class="mat-block autocomplete-queue">
|
||||||
<input matInput type="text" placeholder="{{ 'queue.queue-name' | translate }}"
|
<input matInput type="text" placeholder="{{ 'queue.queue-name' | translate }}"
|
||||||
#queueInput
|
#queueInput
|
||||||
formControlName="queueId"
|
formControlName="queueName"
|
||||||
(focusin)="onFocus()"
|
(focusin)="onFocus()"
|
||||||
[required]="required"
|
[required]="required"
|
||||||
[matAutocomplete]="queueAutocomplete">
|
[matAutocomplete]="queueAutocomplete">
|
||||||
<button *ngIf="selectQueueFormGroup.get('queueId').value && !disabled"
|
<button *ngIf="selectQueueFormGroup.get('queueName').value && !disabled"
|
||||||
type="button"
|
type="button"
|
||||||
matSuffix mat-button mat-icon-button aria-label="Clear"
|
matSuffix mat-button mat-icon-button aria-label="Clear"
|
||||||
(click)="clear()">
|
(click)="clear()">
|
||||||
@ -50,7 +50,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-autocomplete>
|
</mat-autocomplete>
|
||||||
<mat-error *ngIf="selectQueueFormGroup.get('queueId').hasError('required')">
|
<mat-error *ngIf="selectQueueFormGroup.get('queueName').hasError('required')">
|
||||||
{{ 'queue.queue-required' | translate }}
|
{{ 'queue.queue-required' | translate }}
|
||||||
</mat-error>
|
</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|||||||
@ -23,7 +23,6 @@ import { AppState } from '@core/core.state';
|
|||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
||||||
import { EntityId } from '@shared/models/id/entity-id';
|
import { EntityId } from '@shared/models/id/entity-id';
|
||||||
import { EntityType } from '@shared/models/entity-type.models';
|
|
||||||
import { BaseData } from '@shared/models/base-data';
|
import { BaseData } from '@shared/models/base-data';
|
||||||
import { EntityService } from '@core/http/entity.service';
|
import { EntityService } from '@core/http/entity.service';
|
||||||
import { TruncatePipe } from '@shared/pipe/truncate.pipe';
|
import { TruncatePipe } from '@shared/pipe/truncate.pipe';
|
||||||
@ -87,7 +86,7 @@ export class QueueAutocompleteComponent implements ControlValueAccessor, OnInit
|
|||||||
private queueService: QueueService,
|
private queueService: QueueService,
|
||||||
private fb: FormBuilder) {
|
private fb: FormBuilder) {
|
||||||
this.selectQueueFormGroup = this.fb.group({
|
this.selectQueueFormGroup = this.fb.group({
|
||||||
queueId: [null]
|
queueName: [null]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,7 +98,7 @@ export class QueueAutocompleteComponent implements ControlValueAccessor, OnInit
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.filteredQueues = this.selectQueueFormGroup.get('queueId').valueChanges
|
this.filteredQueues = this.selectQueueFormGroup.get('queueName').valueChanges
|
||||||
.pipe(
|
.pipe(
|
||||||
debounceTime(150),
|
debounceTime(150),
|
||||||
tap(value => {
|
tap(value => {
|
||||||
@ -123,15 +122,6 @@ export class QueueAutocompleteComponent implements ControlValueAccessor, OnInit
|
|||||||
|
|
||||||
ngAfterViewInit(): void {}
|
ngAfterViewInit(): void {}
|
||||||
|
|
||||||
getCurrentEntity(): BaseData<EntityId> | null {
|
|
||||||
const currentRuleChain = this.selectQueueFormGroup.get('queueId').value;
|
|
||||||
if (currentRuleChain && typeof currentRuleChain !== 'string') {
|
|
||||||
return currentRuleChain as BaseData<EntityId>;
|
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
setDisabledState(isDisabled: boolean): void {
|
setDisabledState(isDisabled: boolean): void {
|
||||||
this.disabled = isDisabled;
|
this.disabled = isDisabled;
|
||||||
if (this.disabled) {
|
if (this.disabled) {
|
||||||
@ -148,15 +138,14 @@ export class QueueAutocompleteComponent implements ControlValueAccessor, OnInit
|
|||||||
writeValue(value: string | null): void {
|
writeValue(value: string | null): void {
|
||||||
this.searchText = '';
|
this.searchText = '';
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
const targetEntityType = EntityType.QUEUE;
|
this.queueService.getQueueByName(value, {ignoreLoading: true, ignoreErrors: true}).subscribe(
|
||||||
this.entityService.getEntity(targetEntityType, value, {ignoreLoading: true, ignoreErrors: true}).subscribe(
|
|
||||||
(entity) => {
|
(entity) => {
|
||||||
this.modelValue = entity.id.id;
|
this.modelValue = entity.name;
|
||||||
this.selectQueueFormGroup.get('queueId').patchValue(entity, {emitEvent: false});
|
this.selectQueueFormGroup.get('queueName').patchValue(entity, {emitEvent: false});
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
this.modelValue = null;
|
this.modelValue = null;
|
||||||
this.selectQueueFormGroup.get('queueId').patchValue('', {emitEvent: false});
|
this.selectQueueFormGroup.get('queueName').patchValue('', {emitEvent: false});
|
||||||
if (value !== null) {
|
if (value !== null) {
|
||||||
this.propagateChange(this.modelValue);
|
this.propagateChange(this.modelValue);
|
||||||
}
|
}
|
||||||
@ -164,20 +153,20 @@ export class QueueAutocompleteComponent implements ControlValueAccessor, OnInit
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
this.modelValue = null;
|
this.modelValue = null;
|
||||||
this.selectQueueFormGroup.get('queueId').patchValue('', {emitEvent: false});
|
this.selectQueueFormGroup.get('queueName').patchValue('', {emitEvent: false});
|
||||||
}
|
}
|
||||||
this.dirty = true;
|
this.dirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
onFocus() {
|
onFocus() {
|
||||||
if (this.dirty) {
|
if (this.dirty) {
|
||||||
this.selectQueueFormGroup.get('queueId').updateValueAndValidity({onlySelf: true, emitEvent: true});
|
this.selectQueueFormGroup.get('queueName').updateValueAndValidity({onlySelf: true, emitEvent: true});
|
||||||
this.dirty = false;
|
this.dirty = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
reset() {
|
reset() {
|
||||||
this.selectQueueFormGroup.get('queueId').patchValue('', {emitEvent: false});
|
this.selectQueueFormGroup.get('queueName').patchValue('', {emitEvent: false});
|
||||||
}
|
}
|
||||||
|
|
||||||
updateView(value: string | null) {
|
updateView(value: string | null) {
|
||||||
@ -214,7 +203,7 @@ export class QueueAutocompleteComponent implements ControlValueAccessor, OnInit
|
|||||||
}
|
}
|
||||||
|
|
||||||
clear() {
|
clear() {
|
||||||
this.selectQueueFormGroup.get('queueId').patchValue('', {emitEvent: true});
|
this.selectQueueFormGroup.get('queueName').patchValue('', {emitEvent: true});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.queueInput.nativeElement.blur();
|
this.queueInput.nativeElement.blur();
|
||||||
this.queueInput.nativeElement.focus();
|
this.queueInput.nativeElement.focus();
|
||||||
|
|||||||
@ -29,7 +29,6 @@ import * as _moment from 'moment';
|
|||||||
import { AbstractControl, ValidationErrors } from '@angular/forms';
|
import { AbstractControl, ValidationErrors } from '@angular/forms';
|
||||||
import { OtaPackageId } from '@shared/models/id/ota-package-id';
|
import { OtaPackageId } from '@shared/models/id/ota-package-id';
|
||||||
import { DashboardId } from '@shared/models/id/dashboard-id';
|
import { DashboardId } from '@shared/models/id/dashboard-id';
|
||||||
import { QueueId } from '@shared/models/id/queue-id';
|
|
||||||
import { DataType } from '@shared/models/constants';
|
import { DataType } from '@shared/models/constants';
|
||||||
import {
|
import {
|
||||||
getDefaultProfileClientLwM2mSettingsConfig,
|
getDefaultProfileClientLwM2mSettingsConfig,
|
||||||
@ -576,7 +575,7 @@ export interface DeviceProfile extends BaseData<DeviceProfileId>, ExportableEnti
|
|||||||
provisionDeviceKey?: string;
|
provisionDeviceKey?: string;
|
||||||
defaultRuleChainId?: RuleChainId;
|
defaultRuleChainId?: RuleChainId;
|
||||||
defaultDashboardId?: DashboardId;
|
defaultDashboardId?: DashboardId;
|
||||||
defaultQueueId?: QueueId;
|
defaultQueueName?: string;
|
||||||
firmwareId?: OtaPackageId;
|
firmwareId?: OtaPackageId;
|
||||||
softwareId?: OtaPackageId;
|
softwareId?: OtaPackageId;
|
||||||
profileData: DeviceProfileData;
|
profileData: DeviceProfileData;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user