diff options
author | aribeiro <anderson.ribeiro@est.tech> | 2021-07-05 09:49:28 +0100 |
---|---|---|
committer | Michael Morris <michael.morris@est.tech> | 2021-07-21 13:58:35 +0000 |
commit | 5cb26d5eb1ab5d04319624f1ffb49f7f26d55315 (patch) | |
tree | 0f239546c37e6e1e7fd09370640828102debc7de /catalog-ui/src/app/view-models | |
parent | 6d9f291848609ea128a633d7d0eddec30d3efe82 (diff) |
Display model name
Issue-ID: SDC-3632
Signed-off-by: aribeiro <anderson.ribeiro@est.tech>
Change-Id: I7c6ec805298dee7b8327769b48c157f2bf0c30f9
Diffstat (limited to 'catalog-ui/src/app/view-models')
-rw-r--r-- | catalog-ui/src/app/view-models/workspace/tabs/general/general-view-model.ts | 14 | ||||
-rw-r--r-- | catalog-ui/src/app/view-models/workspace/tabs/general/general-view.html | 2 |
2 files changed, 8 insertions, 8 deletions
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" |