diff options
author | aribeiro <anderson.ribeiro@est.tech> | 2020-11-17 10:52:41 +0000 |
---|---|---|
committer | S�bastien Determe <sebastien.determe@intl.att.com> | 2020-11-17 16:01:54 +0000 |
commit | 5eb632de67f90a92e3032f97da1dcc25d53e8110 (patch) | |
tree | d1b504d09cb517dd614c344f83a21a68f771c882 /catalog-ui/src/app/ng2/pages/workspace/attributes/attribute-modal.component.ts | |
parent | 8adf8aa4772b282133e053a21fc8de65973d37e5 (diff) |
Fix import VFC with attributes1.7.3
Fix import VFC with default attribute value
Fix Update, create and delete attribute action
Make attribute definition tosca compliant
Issue-ID: SDC-3381
Signed-off-by: aribeiro <anderson.ribeiro@est.tech>
Change-Id: Ibbd36b105b8c86d1e750f3b6d55752d63fe6530e
(cherry picked from commit 2f74a4ac81f228bdb0bf0f509e9c0ef296d28d82)
Diffstat (limited to 'catalog-ui/src/app/ng2/pages/workspace/attributes/attribute-modal.component.ts')
-rw-r--r-- | catalog-ui/src/app/ng2/pages/workspace/attributes/attribute-modal.component.ts | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/catalog-ui/src/app/ng2/pages/workspace/attributes/attribute-modal.component.ts b/catalog-ui/src/app/ng2/pages/workspace/attributes/attribute-modal.component.ts index c703869ad2..b0a7651809 100644 --- a/catalog-ui/src/app/ng2/pages/workspace/attributes/attribute-modal.component.ts +++ b/catalog-ui/src/app/ng2/pages/workspace/attributes/attribute-modal.component.ts @@ -15,7 +15,7 @@ import { AttributeOptions } from './attributes-options'; }) export class AttributeModalComponent implements OnInit { - @ViewChild('defaultValue') validatedInput: InputComponent; + @ViewChild('_default') validatedInput: InputComponent; public readonly types = AttributeOptions.types; // integer, string, boolean etc. @@ -44,13 +44,9 @@ export class AttributeModalComponent implements OnInit { this.revalidateDefaultValue(); } - onHiddenCheckboxClicked(event: boolean) { - this.attributeToEdit.hidden = event; - } - onTypeSelected(selectedElement: IDropDownOption) { if (this.attributeToEdit.type !== selectedElement.value && selectedElement.value === 'boolean') { - this.attributeToEdit.defaultValue = ''; // Clean old value in case we choose change type to boolean + this.attributeToEdit._default = ''; // Clean old value in case we choose change type to boolean } this.attributeToEdit.type = selectedElement.value; this.revalidateDefaultValue(); @@ -58,7 +54,7 @@ export class AttributeModalComponent implements OnInit { onBooleanDefaultValueSelected(selectedElement: IDropDownOption) { if (this.attributeToEdit.type === 'boolean') { - this.attributeToEdit.defaultValue = selectedElement.value; + this.attributeToEdit._default = selectedElement.value; } } @@ -92,8 +88,8 @@ export class AttributeModalComponent implements OnInit { } public isMapUnique = () => { - if (this.attributeToEdit && this.attributeToEdit.type === 'map' && this.attributeToEdit.defaultValue) { - return ValidationUtils.validateUniqueKeys(this.attributeToEdit.defaultValue); + if (this.attributeToEdit && this.attributeToEdit.type === 'map' && this.attributeToEdit._default) { + return ValidationUtils.validateUniqueKeys(this.attributeToEdit._default); } return true; } @@ -102,7 +98,7 @@ export class AttributeModalComponent implements OnInit { this.setDefaultValuePattern(this.attributeToEdit.type); setTimeout(() => { if (this.validatedInput) { - this.validatedInput.onKeyPress(this.attributeToEdit.defaultValue); + this.validatedInput.onKeyPress(this.attributeToEdit._default); } }, 250); } |