Actual sub mapping node not used during import 21/134721/4
authorshikha0203 <shivani.khare@est.tech>
Tue, 30 May 2023 16:05:12 +0000 (17:05 +0100)
committerMichael Morris <michael.morris@est.tech>
Fri, 2 Jun 2023 18:10:12 +0000 (18:10 +0000)
Issue-ID: SDC-4518
Signed-off-by: shikha0203 <shivani.khare@est.tech>
Change-Id: I56f7334fac3e2cdd54c68850909370fe7b52ea38

catalog-ui/src/app/view-models/workspace/tabs/general/general-view-model.ts

index f550ccf..685f564 100644 (file)
@@ -929,6 +929,13 @@ export class GeneralViewModel {
                     }
                 });
             }
+            if((<Service>this.$scope.component).derivedFromGenericType) {
+                baseTypeResponseList.baseTypes.forEach(baseTypeObj => {
+                    if(baseTypeObj.toscaResourceName == (<Service>this.$scope.component).derivedFromGenericType) {
+                        baseType = baseTypeObj;
+                    }
+                });
+            }
             baseType.versions.reverse().forEach(version => this.$scope.baseTypeVersions.push(version));
             this.$scope.component.derivedFromGenericType = baseType.toscaResourceName;
             this.$scope.component.derivedFromGenericVersion = this.$scope.baseTypeVersions[0];