diff options
author | aribeiro <anderson.ribeiro@est.tech> | 2020-04-02 10:04:31 +0100 |
---|---|---|
committer | Ofir Sonsino <ofir.sonsino@intl.att.com> | 2020-04-06 13:50:55 +0000 |
commit | 8c5c8c57766412f57a8c7168b268b59e8ae72667 (patch) | |
tree | 58d5b391e22bff9cf09a3ae9769d265a68635ce2 | |
parent | 36ed0482eca91d1fa3efa4a5c7a7445516c6bd58 (diff) |
Fix when adding a VF
Remove duplicated field when adding VF, fix label names and fix field that appears mandatory even though its not
Issue-ID: SDC-2865
Signed-off-by: aribeiro <anderson.ribeiro@est.tech>
Change-Id: Iac0866ebcd1b90570949fe9c851fec1f861818af
3 files changed, 12 insertions, 10 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 e2709281b7..87937dd761 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 @@ -219,7 +219,7 @@ export class GeneralViewModel { this.$scope.importCsarProgressKey = "importCsarProgressKey"; - this.$scope.browseFileLabel = this.$scope.component.isResource() && (<Resource>this.$scope.component).resourceType === ResourceType.VF ? 'VSP' : 'Upload VFC'; + this.$scope.browseFileLabel = this.$scope.component.isResource() && (<Resource>this.$scope.component).resourceType === ResourceType.VF ? 'Upload File:' : 'Upload VFC:'; this.$scope.progressService = this.progressService; this.$scope.componentCategories = new componentCategories(); this.$scope.componentCategories.selectedCategory = this.$scope.component.selectedCategory; 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 86f1feba0c..42a8aa3e68 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 @@ -49,7 +49,7 @@ <div class="name-and-category-fields"> <!--------------------- NAME --------------------> <div class="i-sdc-form-item" data-ng-class="{'error': validateField(editForm.componentName)}"> - <label class="i-sdc-form-label required">Name</label> + <label class="i-sdc-form-label required" translate="GENERAL_LABEL_NAME"></label> <input class="i-sdc-form-input" data-ng-class="{'view-mode': isViewMode()}" name="componentName" @@ -82,7 +82,7 @@ <div class="i-sdc-form-item" data-ng-class="{'error': validateField(editForm.category)}"> <loader data-display="!categories && !initCategoreis()" relative="true"></loader> - <label class="i-sdc-form-label required">Category</label> + <label class="i-sdc-form-label required" translate="GENERAL_LABEL_CATEGORY"></label> <select class="i-sdc-form-select" data-required name="category" @@ -116,7 +116,7 @@ </div> <!--------------------- RESOURCE TAGS --------------------> <div class="i-sdc-form-item" data-ng-class="{'error': validateField(editForm.tags)}"> - <label class="i-sdc-form-label">Tags</label> + <label class="i-sdc-form-label" translate="GENERAL_LABEL_TAGS"></label> <sdc-tags form-element="editForm" element-name="tags" max-tags="20" class="i-sdc-form-item-tags" sdc-disabled="isViewMode()" @@ -134,7 +134,7 @@ <!--------------------- DESCRIPTION --------------------> <div class="i-sdc-form-item description-field" data-ng-class="{'error': validateField(editForm.description)}"> - <label class="i-sdc-form-label required">Description</label> + <label class="i-sdc-form-label required" translate="GENERAL_LABEL_DESCRIPTION"></label> <textarea class="description" name="description" data-ng-class="{'view-mode': isViewMode()}" @@ -162,10 +162,11 @@ <!-- // element-disabled="{{!isCreateMode()&&!(isEditMode()&&component.resourceType=='VF')&&component.vspArchived}} || {{isViewMode()}}" --> - <label class="i-sdc-form-label" data-ng-class="{'required':isCreateMode()}">{{browseFileLabel}}</label> + <label class="i-sdc-form-label" data-ng-class="{'required':isCreateMode() && component.resourceType !=='VF'}">{{browseFileLabel}}</label> <file-upload id="fileUploadElement" class="i-sdc-form-input" element-name="fileElement" + data-ng-required="false" element-disabled="{{(!isCreateMode()&&!(isEditMode()&&component.resourceType=='VF'))|| isViewMode() || component.vspArchived}}" form-element="editForm" file-model="component.importedFile" @@ -176,7 +177,7 @@ </div> <!--------------------- IMPORT TOSCA FILE USING ONBOARDING --------------------> - <div class="i-sdc-form-item" ng-if="isShowOnboardingSelectionBrowse"> + <div class="i-sdc-form-item" ng-if="isShowOnboardingSelectionBrowse && !isShowFileBrowse"> <label class="i-sdc-form-label required">VSP</label> <div class="i-sdc-form-file-upload i-sdc-form-input"> <span class="i-sdc-form-file-name" data-ng-disabled="component.vspArchived" data-tests-id="filename">{{(fileModel && fileModel.filename) || importedToscaBrowseFileText }}</span> @@ -219,7 +220,7 @@ <!--------------------- VENDOR NAME --------------------> <div ng-if="component.isResource()" class="i-sdc-form-item" data-ng-class="{'error': validateField(editForm.vendorName)}"> - <label class="i-sdc-form-label required">Vendor</label> + <label class="i-sdc-form-label required" translate="GENERAL_LABEL_VENDOR_NAME"></label> <input class="i-sdc-form-input" type="text" data-ng-class="{'view-mode': isViewMode()}" data-ng-model="component.vendorName" @@ -248,7 +249,7 @@ <div ng-if="component.isResource()" class="i-sdc-form-item" data-ng-class="{'error': validateField(editForm.vendorRelease)}"> - <label class="i-sdc-form-label required">Vendor Release</label> + <label class="i-sdc-form-label required" translate="GENERAL_LABEL_VENDOR_RELEASE"></label> <input class="i-sdc-form-input" type="text" data-ng-class="{'view-mode': isViewMode()}" data-ng-model="component.vendorRelease" @@ -273,7 +274,7 @@ <div ng-if="component.isResource()" class="i-sdc-form-item" data-ng-class="{'error': validateField(editForm.resourceVendorModelNumber)}"> - <label class="i-sdc-form-label" translate="GENERAL_TAB_LABEL_RESOURCE_MODEL_NUMBER"></label> + <label class="i-sdc-form-label" translate="GENERAL_LABEL_RESOURCE_MODEL_NUMBER"></label> <input class="i-sdc-form-input" type="text" data-ng-class="{'view-mode': isViewMode()}" data-ng-model="component.resourceVendorModelNumber" diff --git a/catalog-ui/src/assets/languages/en_US.json b/catalog-ui/src/assets/languages/en_US.json index aa6a088796..6a17080246 100644 --- a/catalog-ui/src/assets/languages/en_US.json +++ b/catalog-ui/src/assets/languages/en_US.json @@ -18,6 +18,7 @@ "=========== GENERAL ===========": "", "GENERAL_LABEL_TYPE": "Type:", + "GENERAL_LABEL_NAME": "Name:", "GENERAL_LABEL_VERSION": "Version:", "GENERAL_LABEL_CATEGORY": "Category:", "GENERAL_LABEL_SUB_CATEGORY": "Sub Category:", |