aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/pages
diff options
context:
space:
mode:
authoreschcam <cameron.scholes@est.tech>2023-02-01 12:17:18 +0000
committerMichael Morris <michael.morris@est.tech>2023-02-22 12:25:11 +0000
commit59e446fb77ccf05aeae9b7046bd80e10124707c0 (patch)
tree26c21256e5734685646c7c0ce93112cd099429ea /catalog-ui/src/app/ng2/pages
parent3eb6f41297cedc038d18582d31d65dab05b351b8 (diff)
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 <cameron.scholes@est.tech> Change-Id: I524bad3046699baf66f407d1cf0c36394a66b623
Diffstat (limited to 'catalog-ui/src/app/ng2/pages')
-rw-r--r--catalog-ui/src/app/ng2/pages/workspace/attributes/attribute-modal.component.html5
-rw-r--r--catalog-ui/src/app/ng2/pages/workspace/attributes/attribute-modal.component.ts6
2 files changed, 10 insertions, 1 deletions
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 @@
<div class="attributeType">
<!-- ATTRIBUTE TYPE - MANDATORY -->
- <sdc-dropdown #attributeType [disabled]="false" label="Type" [required]="true"
+ <sdc-dropdown #attributeType
+ [disabled]="isEdit"
+ label="Type"
+ [required]="true"
[selectedOption]="toDropDownOption(this.attributeToEdit.type)" placeHolder="Choose Type"
testId="attributeType"
[options]="types" (changed)="onTypeSelected($event)">
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();
}