From 6cc9a11a09a9b650442bf301eb8fd1aa6cad66bc Mon Sep 17 00:00:00 2001 From: Idan Amit Date: Wed, 13 Sep 2017 17:21:33 +0300 Subject: ComponentBaseTest.java enhancement and new onboarding class that test onboarding only And merge release/1710 branch into master Change-Id: I300d897b151010aa26f8732518fa2e3b7ed4291b Issue-Id: SDC-331 Signed-off-by: Idan Amit --- .../workspace/tabs/general/general-view-model.ts | 16 ++++++++++------ .../view-models/workspace/tabs/general/general-view.html | 1 + .../app/view-models/workspace/tabs/general/general.less | 2 +- .../src/app/view-models/workspace/workspace-view.html | 8 +++++--- catalog-ui/src/app/view-models/workspace/workspace.less | 6 +++++- 5 files changed, 22 insertions(+), 11 deletions(-) (limited to 'catalog-ui/src/app/view-models/workspace') 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 48fc9dbb42..c60a490b4b 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 @@ -20,7 +20,7 @@ 'use strict'; import {ModalsHandler, ValidationUtils, EVENTS, CHANGE_COMPONENT_CSAR_VERSION_FLAG, ComponentType, DEFAULT_ICON, - ResourceType} from "app/utils"; + ResourceType, ComponentState} from "app/utils"; import {CacheService, EventListenerService, ProgressService, OnboardingService} from "app/services"; import {IAppConfigurtaion, IValidate, IMainCategory, Resource, ISubCategory,Service, ICsarComponent} from "app/models"; import {IWorkspaceViewModelScope} from "app/view-models/workspace/workspace-view-model"; @@ -41,6 +41,7 @@ export class componentCategories {//categories field bind to this obj in order t selectedCategory:string; } + export interface IGeneralScope extends IWorkspaceViewModelScope { validation:Validation; editForm:ng.IFormController; @@ -56,7 +57,7 @@ export interface IGeneralScope extends IWorkspaceViewModelScope { browseFileLabel:string; componentCategories:componentCategories; - onToscaFileChange():void + onToscaFileChange():void; validateField(field:any):boolean; validateName(isInit:boolean):void; calculateUnique(mainCategory:string, subCategory:string):string; // Build unique string from main and sub category @@ -146,21 +147,24 @@ export class GeneralViewModel { (this.$scope.component).resourceType == ResourceType.VF && (this.$scope.component).csarUUID) { this.$scope.isShowOnboardingSelectionBrowse = true; - let onboardCsarFilesMap:Dictionary = this.cacheService.get('onboardCsarFilesMap'); + let onboardCsarFilesMap:Dictionary> = this.cacheService.get('onboardCsarFilesMap'); // The onboardCsarFilesMap in cache contains map of [packageId]:[vsp display name for brows] // if the map is empty - Do request to BE if(onboardCsarFilesMap) { - this.$scope.importedToscaBrowseFileText = onboardCsarFilesMap[(this.$scope.component).csarUUID]; + if (onboardCsarFilesMap[(this.$scope.component).csarUUID]){ + this.$scope.importedToscaBrowseFileText = onboardCsarFilesMap[(this.$scope.component).csarUUID][(this.$scope.component).csarVersion]; + } } if(!onboardCsarFilesMap || !this.$scope.importedToscaBrowseFileText){ let onSuccess = (vsps:Array): void =>{ onboardCsarFilesMap = {}; _.each(vsps, (vsp:ICsarComponent)=>{ - onboardCsarFilesMap[vsp.packageId] = vsp.vspName + " (" + vsp.version + ")"; + onboardCsarFilesMap[vsp.packageId] = onboardCsarFilesMap[vsp.packageId] || {}; + onboardCsarFilesMap[vsp.packageId][vsp.version] = vsp.vspName + " (" + vsp.version + ")"; }); this.cacheService.set('onboardCsarFilesMap', onboardCsarFilesMap); - this.$scope.importedToscaBrowseFileText = onboardCsarFilesMap[(this.$scope.component).csarUUID]; + this.$scope.importedToscaBrowseFileText = onboardCsarFilesMap[(this.$scope.component).csarUUID][(this.$scope.component).csarVersion]; }; let onError = (): 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 d3626803e9..3a3b2d316d 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 @@ -375,6 +375,7 @@ + -
- {{getTabTitle()}} +
+
+ {{getTabTitle()}} +
+
-
diff --git a/catalog-ui/src/app/view-models/workspace/workspace.less b/catalog-ui/src/app/view-models/workspace/workspace.less index d0799f4bac..8b8b6d624a 100644 --- a/catalog-ui/src/app/view-models/workspace/workspace.less +++ b/catalog-ui/src/app/view-models/workspace/workspace.less @@ -174,7 +174,7 @@ height: calc(~'100% - @{action_nav_height}'); //composition is the only tab without a tab title. need to exclude from calculation. } .w-sdc-main-container-body-content { - height:calc(~'100% - @{action_nav_height} - @{tab_title}'); + // height:calc(~'100% - @{action_nav_height} - @{tab_title}'); align-items: center; padding: 0 100px 20px 100px; &.third-party { @@ -187,6 +187,10 @@ bottom: 0; } } + .w-sdc-main-container-body-content-wrapper { + overflow: auto; + height: calc(~'100% - @{action_nav_height}') + } } } -- cgit 1.2.3-korg