From 59e446fb77ccf05aeae9b7046bd80e10124707c0 Mon Sep 17 00:00:00 2001 From: eschcam Date: Wed, 1 Feb 2023 12:17:18 +0000 Subject: Disable editing the name of existing attributes Also added a patch to fix an exception been thrown when editing existing attributes Issue-ID: SDC-3384 Signed-off-by: eschcam Change-Id: I524bad3046699baf66f407d1cf0c36394a66b623 --- .../ng2/pages/workspace/attributes/attribute-modal.component.html | 5 ++++- .../app/ng2/pages/workspace/attributes/attribute-modal.component.ts | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'catalog-ui/src/app/ng2/pages') diff --git a/catalog-ui/src/app/ng2/pages/workspace/attributes/attribute-modal.component.html b/catalog-ui/src/app/ng2/pages/workspace/attributes/attribute-modal.component.html index 590217d0a5..d94fb546dc 100644 --- a/catalog-ui/src/app/ng2/pages/workspace/attributes/attribute-modal.component.html +++ b/catalog-ui/src/app/ng2/pages/workspace/attributes/attribute-modal.component.html @@ -36,7 +36,10 @@
- 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 426ed4063e..e851bafc1d 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 @@ -32,6 +32,7 @@ export class AttributeModalComponent implements OnInit { // The current effective default value pattern public defaultValuePattern: string; public defaultValueErrorMessage: string; + public isEdit: boolean; // Attribute being Edited public attributeToEdit: AttributeModel; @@ -41,6 +42,11 @@ export class AttributeModalComponent implements OnInit { } ngOnInit() { + // Disable editing the name of existing attributes + if (this.attributeToEdit && this.attributeToEdit.name) { + this.isEdit = true; + } + this.revalidateDefaultValue(); } -- cgit 1.2.3-korg