aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2
diff options
context:
space:
mode:
authorvasraz <vasyl.razinkov@est.tech>2023-08-24 11:29:34 +0100
committerMichael Morris <michael.morris@est.tech>2023-09-01 15:21:09 +0000
commit34f2113acd7f8f75de1e3184d0a5e0449ceba301 (patch)
treee77b04eb6034e643edc1ee81c02780838e9b1fb5 /catalog-ui/src/app/ng2
parentd76a269e81ed271dd0307b74f257d87ad97bf17e (diff)
Fix 'Unable to add metadata on inputs'-bug
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Change-Id: I7414366c20b5c7d61acaaebc8bfa83768d4452e0 Issue-ID: SDC-4603
Diffstat (limited to 'catalog-ui/src/app/ng2')
-rw-r--r--catalog-ui/src/app/ng2/components/logic/inputs-table/inputs-table.component.ts18
1 files changed, 17 insertions, 1 deletions
diff --git a/catalog-ui/src/app/ng2/components/logic/inputs-table/inputs-table.component.ts b/catalog-ui/src/app/ng2/components/logic/inputs-table/inputs-table.component.ts
index c2a872fe9b..d5a49f8732 100644
--- a/catalog-ui/src/app/ng2/components/logic/inputs-table/inputs-table.component.ts
+++ b/catalog-ui/src/app/ng2/components/logic/inputs-table/inputs-table.component.ts
@@ -185,7 +185,23 @@ export class InputsTableComponent {
modelProperty.constraints = tempProperty.constraints;
});
}
- this.modalsHandler.newOpenEditPropertyModal(modelProperty, [],true, 'component', modelProperty.resourceInstanceUniqueId, this.parentComponent, inputProperty);
+ this.modalsHandler.newOpenEditPropertyModal(modelProperty, [],true, 'component', modelProperty.resourceInstanceUniqueId, this.parentComponent, inputProperty).then(result => {
+ let newInputs : Array<InputFEModel> = [];
+ this.inputs.forEach(input => {
+ if (input.uniqueId != inputProperty.uniqueId) {
+ newInputs.push(input);
+ } else {
+ let newMetadataEntries : Array<MetadataEntry> = [];
+ for (let key of Object.keys(inputProperty.metadata)){
+ newMetadataEntries.push(new MetadataEntry(key, inputProperty.metadata[key]));
+ }
+ inputProperty.metadataEntries = [];
+ inputProperty.metadataEntries = newMetadataEntries;
+ newInputs.push(inputProperty);
+ }
+ });
+ this.inputs = newInputs;
+ });
}
private createPropertyModel(inputproperty: InputFEModel){