diff options
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 | 4 | ||||
-rw-r--r-- | catalog-ui/src/app/view-models/workspace/tabs/general/general-view.html | 2 |
2 files changed, 5 insertions, 1 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 a707e563af..043f4dd859 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 @@ -767,6 +767,10 @@ export class GeneralViewModel { } }; + this.$scope.getCategoryDisplayNameOrName = (mainCategory: any): string => { + return mainCategory.displayName ? mainCategory.displayName : mainCategory.name ; + } + this.$scope.onBaseTypeChange = (): void => { if (!this.$scope.component.derivedFromGenericType) { this.$scope.component.derivedFromGenericVersion = undefined; 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 bb0cceb173..1fb8d5f10f 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 @@ -119,7 +119,7 @@ <option ng-if="component.isService()" data-ng-repeat="mainCategory in categories | orderBy:['name']" data-ng-selected="component.selectedCategory===mainCategory.name" value="{{mainCategory.name}}" - data-tests-id="{{mainCategory.name}}">{{mainCategory.name}}</option> + data-tests-id="{{mainCategory.name}}">{{getCategoryDisplayNameOrName(mainCategory)}}</option> </select> <div class="input-error" data-ng-show="validateField(editForm.category)"> |