Browse Source

Fixed the typed name not being filled in when creating a converter from the converter field (#16658)

* Fixed the typed name not being filled in when creating a converter from the converter field

* Updated the license curation hash of converter-dialog.component.html

---------

Co-authored-by: Vladyslav Prykhodko <vprykhodko@thingsboard.io>
pull/16664/head
Serhii Titenko 3 weeks ago
committed by GitHub
parent
commit
325bfa8575
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      tools/src/main/python/license-headers/curations.json
  2. 3
      ui-ngx/src/app/modules/home/components/converter/converter-dialog.component.html
  3. 2
      ui-ngx/src/app/modules/home/components/converter/converter-dialog.component.ts
  4. 2
      ui-ngx/src/app/modules/home/components/converter/converter.component.ts

2
tools/src/main/python/license-headers/curations.json

@ -1247,7 +1247,7 @@
"path": "ui-ngx/src/app/modules/home/components/converter/converter-dialog.component.html",
"header": "busl",
"reason": "PE view template converter-dialog.component.html. Reviewed form fields, bindings and entity/component selection implement the PE feature; the candidate shares standard Material dialog/form/tab scaffolding rather than a CE feature implementation. Reviewed CE candidate ui-ngx/src/app/modules/home/components/entity/add-entity-dialog.component.html at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 955f8f58be2d9d462570164005f4a2ee693b0dd7).",
"contentHash": "sha256:845e3846f9f41be29dc209df6c28c8870c3886886018155735affb0c49c5a9f9"
"contentHash": "sha256:d66640c8359f2341173ab63f009062a7b6382c58c4677ff754024a5fa2534c95"
},
{
"path": "ui-ngx/src/app/modules/home/components/converter/converter-test-dialog.component.scss",

3
ui-ngx/src/app/modules/home/components/converter/converter-dialog.component.html

@ -25,7 +25,8 @@
<tb-converter
#converterComponent
[entity]="converter"
[isEdit]="true">
[isEdit]="true"
[converterName]="converterName">
</tb-converter>
</div>
<div mat-dialog-actions class="flex items-center justify-end">

2
ui-ngx/src/app/modules/home/components/converter/converter-dialog.component.ts

@ -39,6 +39,7 @@ export class ConverterDialogComponent extends DialogComponent<ConverterDialogCom
isEdit: boolean;
dialogTitle:string;
converter: Converter;
converterName: string;
@ViewChild('converterComponent', {static: true}) converterComponent: ConverterComponent;
@ -55,6 +56,7 @@ export class ConverterDialogComponent extends DialogComponent<ConverterDialogCom
ngOnInit() {
const {disabledIntegrationType, ...converterInfo} = this.data.convertor
this.converter = converterInfo as Converter;
this.converterName = this.isEdit ? null : this.converter.name;
}
ngAfterViewInit() {

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

@ -268,7 +268,7 @@ export class ConverterComponent extends EntityComponent<Converter> implements On
}
this.updateForm(converter, false);
} else {
this.entityForm.get('name').patchValue('', {emitEvent: false});
this.entityForm.get('name').patchValue(this.predefinedConverterName ?? '', {emitEvent: false});
}
}

Loading…
Cancel
Save