aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/view-models
diff options
context:
space:
mode:
authorIdan Amit <ia096e@intl.att.com>2017-09-13 17:21:33 +0300
committerIdan Amit <ia096e@intl.att.com>2017-09-13 17:21:33 +0300
commit6cc9a11a09a9b650442bf301eb8fd1aa6cad66bc (patch)
treed7a891f71608fd32b1a5a61054530ce0244fe149 /catalog-ui/src/app/view-models
parent45e38d57442499a535f2915aab95a057e106d79f (diff)
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 <ia096e@intl.att.com>
Diffstat (limited to 'catalog-ui/src/app/view-models')
-rw-r--r--catalog-ui/src/app/view-models/workspace/tabs/general/general-view-model.ts16
-rw-r--r--catalog-ui/src/app/view-models/workspace/tabs/general/general-view.html1
-rw-r--r--catalog-ui/src/app/view-models/workspace/tabs/general/general.less2
-rw-r--r--catalog-ui/src/app/view-models/workspace/workspace-view.html8
-rw-r--r--catalog-ui/src/app/view-models/workspace/workspace.less6
5 files changed, 22 insertions, 11 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 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 {
(<Resource>this.$scope.component).resourceType == ResourceType.VF &&
(<Resource>this.$scope.component).csarUUID) {
this.$scope.isShowOnboardingSelectionBrowse = true;
- let onboardCsarFilesMap:Dictionary<string> = this.cacheService.get('onboardCsarFilesMap');
+ let onboardCsarFilesMap:Dictionary<Dictionary<string>> = 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[(<Resource>this.$scope.component).csarUUID];
+ if (onboardCsarFilesMap[(<Resource>this.$scope.component).csarUUID]){
+ this.$scope.importedToscaBrowseFileText = onboardCsarFilesMap[(<Resource>this.$scope.component).csarUUID][(<Resource>this.$scope.component).csarVersion];
+ }
}
if(!onboardCsarFilesMap || !this.$scope.importedToscaBrowseFileText){
let onSuccess = (vsps:Array<ICsarComponent>): 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[(<Resource>this.$scope.component).csarUUID];
+ this.$scope.importedToscaBrowseFileText = onboardCsarFilesMap[(<Resource>this.$scope.component).csarUUID][(<Resource>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 @@
</div>
</div>
<!--------------------- Service Role -------------------->
+
<div class="meta-data" data-ng-if="component.creationDate">
<div>
<b>Created:</b>
diff --git a/catalog-ui/src/app/view-models/workspace/tabs/general/general.less b/catalog-ui/src/app/view-models/workspace/tabs/general/general.less
index 9633ec5bb6..b9b59deb1b 100644
--- a/catalog-ui/src/app/view-models/workspace/tabs/general/general.less
+++ b/catalog-ui/src/app/view-models/workspace/tabs/general/general.less
@@ -34,7 +34,7 @@
}
.description{
- height: 300px;
+ height: 360px;
}
.i-sdc-form-item.description-field{
diff --git a/catalog-ui/src/app/view-models/workspace/workspace-view.html b/catalog-ui/src/app/view-models/workspace/workspace-view.html
index 19ebefe7a5..a7c9da05c4 100644
--- a/catalog-ui/src/app/view-models/workspace/workspace-view.html
+++ b/catalog-ui/src/app/view-models/workspace/workspace-view.html
@@ -70,10 +70,12 @@
</div>
</div>
- <div class="tab-title" data-ng-if="!isComposition && !isDeployment">
- {{getTabTitle()}}
+ <div class="w-sdc-main-container-body-content-wrapper">
+ <div class="tab-title" data-ng-if="!isComposition && !isDeployment">
+ {{getTabTitle()}}
+ </div>
+ <div class="w-sdc-main-container-body-content" data-ng-class="{'third-party':thirdParty}" data-ui-view></div>
</div>
- <div class="w-sdc-main-container-body-content" data-ng-class="{'third-party':thirdParty}" data-ui-view></div>
</div>
</div>
<top-nav search-bind="search.filterTerm" hide-search="true" menu-model="breadcrumbsModel" version="{{version}}"></top-nav>
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}')
+ }
}
}