summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-ui/src/app')
-rw-r--r--catalog-ui/src/app/models/category.ts1
-rw-r--r--catalog-ui/src/app/view-models/workspace/tabs/general/general-view-model.ts8
-rw-r--r--catalog-ui/src/app/view-models/workspace/tabs/general/general-view.html8
3 files changed, 13 insertions, 4 deletions
diff --git a/catalog-ui/src/app/models/category.ts b/catalog-ui/src/app/models/category.ts
index 7819aae2f1..502020a57b 100644
--- a/catalog-ui/src/app/models/category.ts
+++ b/catalog-ui/src/app/models/category.ts
@@ -51,6 +51,7 @@ export interface IGroup extends ICategoryBase {
export interface IMetadataKey {
name:string;
+ displayName:string;
mandatory:boolean;
validValues: string[];
defaultValue: string;
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 e766e36899..c423028467 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
@@ -801,6 +801,14 @@ export class GeneralViewModel {
return [];
}
+ this.$scope.getMetadataDisplayName = (key: string): string => {
+ let metadataKey = this.getMetadataKey(this.$scope.component.categories, key);
+ if (metadataKey) {
+ return metadataKey.displayName ? metadataKey.displayName : metadataKey.name;
+ }
+ return "";
+ }
+
this.$scope.isMetadataKeyForComponentCategory = (key: string): boolean => {
return this.getMetadataKey(this.$scope.component.categories, key) != null;
}
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 a0199164cc..e7ce00b176 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
@@ -138,7 +138,7 @@
<div ng-if="isMetadataKeyForComponentCategory(key) && !isCategoryServiceMetadataKey(key) && getMetadataKeyValidValues(key) && isMetadataKeyMandatory(key)"
class="i-sdc-form-item"
data-ng-class="{'error': validateField(editForm['{{key}}'])}">
- <label class="i-sdc-form-label required" translate="{{key}}"></label>
+ <label class="i-sdc-form-label required" translate="{{getMetadataDisplayName(key)}}"></label>
<select class="i-sdc-form-select"
name="{{key}}"
data-ng-class="{'view-mode': isViewMode()}"
@@ -153,7 +153,7 @@
</div>
<div ng-if="isMetadataKeyForComponentCategory(key) && !isCategoryServiceMetadataKey(key) && getMetadataKeyValidValues(key) && !isMetadataKeyMandatory(key)"
class="i-sdc-form-item">
- <label class="i-sdc-form-label" translate="{{key}}"></label>
+ <label class="i-sdc-form-label" translate="{{getMetadataDisplayName(key)}}"></label>
<select class="i-sdc-form-select"
name="{{key}}"
data-ng-class="{'view-mode': isViewMode()}"
@@ -165,7 +165,7 @@
<div ng-if="isMetadataKeyForComponentCategory(key) && !isCategoryServiceMetadataKey(key) && !getMetadataKeyValidValues(key) && isMetadataKeyMandatory(key)"
class="i-sdc-form-item"
data-ng-class="{'error': validateField(editForm['{{key}}'])}">
- <label class="i-sdc-form-label required" translate="{{key}}"></label>
+ <label class="i-sdc-form-label required" translate="{{getMetadataDisplayName(key)}}"></label>
<input class="i-sdc-form-input" type="text"
data-required
data-ng-class="{'view-mode': isViewMode()}"
@@ -179,7 +179,7 @@
</div>
<div ng-if="isMetadataKeyForComponentCategory(key) && !isCategoryServiceMetadataKey(key) && !getMetadataKeyValidValues(key) && !isMetadataKeyMandatory(key)"
class="i-sdc-form-item">
- <label class="i-sdc-form-label" translate="{{key}}"></label>
+ <label class="i-sdc-form-label" translate="{{getMetadataDisplayName(key)}}"></label>
<input class="i-sdc-form-input" type="text"
data-ng-class="{'view-mode': isViewMode()}"
data-ng-model="component.categorySpecificMetadata[key]"