summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/datamodel/utils/UiComponentDataConverter.java1
-rw-r--r--catalog-ui/src/app/ng2/pages/composition/palette/services/palette.service.ts8
-rw-r--r--catalog-ui/src/app/view-models/workspace/tabs/general/general-view-model.ts14
-rw-r--r--catalog-ui/src/app/view-models/workspace/tabs/general/general-view.html2
4 files changed, 11 insertions, 14 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/datamodel/utils/UiComponentDataConverter.java b/catalog-be/src/main/java/org/openecomp/sdc/be/datamodel/utils/UiComponentDataConverter.java
index 32a63dcc46..15a276fe1f 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/datamodel/utils/UiComponentDataConverter.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/datamodel/utils/UiComponentDataConverter.java
@@ -384,6 +384,7 @@ public class UiComponentDataConverter {
UiResourceMetadata metadata = new UiResourceMetadata(resource.getCategories(), resource.getDerivedFrom(),
(ResourceMetadataDataDefinition) resource.getComponentMetadataDefinition().getMetadataDataDefinition());
dataTransfer.setMetadata(metadata);
+ dataTransfer.setModel(resource.getModel());
break;
case SUBSTITUTION_FILTER:
if (resource.getSubstitutionFilter() == null) {
diff --git a/catalog-ui/src/app/ng2/pages/composition/palette/services/palette.service.ts b/catalog-ui/src/app/ng2/pages/composition/palette/services/palette.service.ts
index 5e0fb1e170..ed61dce192 100644
--- a/catalog-ui/src/app/ng2/pages/composition/palette/services/palette.service.ts
+++ b/catalog-ui/src/app/ng2/pages/composition/palette/services/palette.service.ts
@@ -27,20 +27,16 @@ export class CompositionPaletteService {
}
public subscribeToLeftPaletteElements(next, error) {
-
let params = new HttpParams();
params = params.append('internalComponentType', this.workspaceService.getMetadataType());
- let model = this.workspaceService.metadata.model
+ let model = this.workspaceService.metadata.model
if (model) {
params = params.append('componentModel', model);
}
const loadInstances = this.http.get(this.facadeUrl, {params});
const loadGroups = this.http.get(this.baseUrl + 'groupTypes', {params});
const loadPolicies = this.http.get(this.baseUrl + 'policyTypes', {params});
-
- Observable.forkJoin(
- loadInstances, loadGroups, loadPolicies
- ).subscribe( ([resInstances, resGrouops, resPolicies]) => {
+ Observable.forkJoin(loadInstances, loadGroups, loadPolicies).subscribe( ([resInstances, resGrouops, resPolicies]) => {
const combinedDictionary = this.combineResoponses(resInstances, resGrouops, resPolicies);
this.leftPaletteComponents = combinedDictionary;
next(this.leftPaletteComponents);
diff --git a/catalog-ui/src/app/view-models/workspace/tabs/general/general-view-model.ts b/catalog-ui/src/app/view-models/workspace/tabs/general/general-view-model.ts
index 9b7a92b297..391b6ee2b7 100644
--- a/catalog-ui/src/app/view-models/workspace/tabs/general/general-view-model.ts
+++ b/catalog-ui/src/app/view-models/workspace/tabs/general/general-view-model.ts
@@ -254,6 +254,9 @@ export class GeneralViewModel {
// Init Environment Context
this.$scope.initEnvironmentContext();
+ // Init Models
+ this.$scope.initModel();
+
// Init the decision if to show file browse.
this.$scope.isShowFileBrowse = false;
if (this.$scope.component.isResource()) {
@@ -278,7 +281,6 @@ export class GeneralViewModel {
// Init Instantiation types
this.$scope.initInstantiationTypes();
this.$scope.initBaseTypes();
- this.$scope.initModel();
}
if (this.cacheService.get(PREVIOUS_CSAR_COMPONENT)) { //keep the old component in the cache until checkout, so we dont need to pass it around
@@ -461,12 +463,10 @@ export class GeneralViewModel {
};
this.$scope.initModel = ():void => {
- if (this.$scope.componentType === ComponentType.SERVICE) {
- this.$scope.models = new Array();
- this.modelService.getModels().subscribe((modelsFound: Model[]) => {
- modelsFound.forEach(model => {this.$scope.models.push(model.name)});})
- this.$scope.models.filter(model => model.name === (<Service>this.$scope.component).model);
- }
+ this.$scope.models = new Array();
+ this.modelService.getModels().subscribe((modelsFound: Model[]) => {
+ modelsFound.forEach(model => {this.$scope.models.push(model.name)});})
+ this.$scope.models.filter(model => model.name === this.$scope.component).model;
};
this.$scope.initEnvironmentContext = ():void => {
diff --git a/catalog-ui/src/app/view-models/workspace/tabs/general/general-view.html b/catalog-ui/src/app/view-models/workspace/tabs/general/general-view.html
index d2529f9bb6..d84f4c87e0 100644
--- a/catalog-ui/src/app/view-models/workspace/tabs/general/general-view.html
+++ b/catalog-ui/src/app/view-models/workspace/tabs/general/general-view.html
@@ -610,7 +610,7 @@
<!--------------------- Base Type -------------------->
<!--------------------- Model -------------------->
- <div class="i-sdc-form-item" data-ng-if="component.isService()">
+ <div class="i-sdc-form-item">
<label class="i-sdc-form-label">Model</label>
<select class="i-sdc-form-select"
name="modelName"
t; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.onap.policy.drools-pdp</groupId> <artifactId>drools-pdp</artifactId> <version>1.2.3-SNAPSHOT</version> </parent> <artifactId>api-active-standby-management</artifactId> <name>api-active-standby-management</name> <description>API for Active Standby Management feature</description> <properties> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> </properties> <dependencies> <dependency> <groupId>org.onap.policy.drools-pdp</groupId> <artifactId>policy-management</artifactId> <version>${project.version}</version> <scope>provided</scope> </dependency> </dependencies> </project>