summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/view-models/workspace
diff options
context:
space:
mode:
authorMichael Lando <ml636r@att.com>2017-06-11 14:22:02 +0300
committerMichael Lando <ml636r@att.com>2017-06-11 17:48:32 +0300
commitb3d4898d9e8452ea0b8d848c048e712d43b8d9a3 (patch)
tree0609319203be13f6c29ccbe24cb39c9d64f90095 /catalog-ui/src/app/view-models/workspace
parentaf9929df75604ce407d0ca542b200630164e0ae6 (diff)
[SDC-29] rebase continue work to align source
Change-Id: I218f1c5ee23fb2c8314f1c70921d3ad8682c10f4 Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'catalog-ui/src/app/view-models/workspace')
-rw-r--r--catalog-ui/src/app/view-models/workspace/conformance-level-modal/conformance-level-modal-view-model.ts29
-rw-r--r--catalog-ui/src/app/view-models/workspace/conformance-level-modal/conformance-level-modal-view.html22
-rw-r--r--catalog-ui/src/app/view-models/workspace/conformance-level-modal/conformance-level-modal.less3
-rw-r--r--catalog-ui/src/app/view-models/workspace/tabs/composition/composition-view-model.ts4
-rw-r--r--catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/artifacts/artifacts-view-model.ts2
-rw-r--r--catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/artifacts/artifacts-view.html2
-rw-r--r--catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/details/details-view-model.ts5
-rw-r--r--catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/properties-and-attributes/properties-view-model.ts4
-rw-r--r--catalog-ui/src/app/view-models/workspace/tabs/deployment-artifacts/deployment-artifacts-view.html2
-rw-r--r--catalog-ui/src/app/view-models/workspace/workspace-view-model.ts17
10 files changed, 24 insertions, 66 deletions
diff --git a/catalog-ui/src/app/view-models/workspace/conformance-level-modal/conformance-level-modal-view-model.ts b/catalog-ui/src/app/view-models/workspace/conformance-level-modal/conformance-level-modal-view-model.ts
deleted file mode 100644
index 61a83c88f7..0000000000
--- a/catalog-ui/src/app/view-models/workspace/conformance-level-modal/conformance-level-modal-view-model.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-'use strict';
-
-export interface IConformanceLevelModalModelScope {
- footerButtons:Array<any>;
- modalInstance:ng.ui.bootstrap.IModalServiceInstance;
-}
-
-export class ConformanceLevelModalViewModel {
-
- static '$inject' = ['$scope', '$uibModalInstance'];
-
- constructor(private $scope:IConformanceLevelModalModelScope,
- private $uibModalInstance:ng.ui.bootstrap.IModalServiceInstance) {
-
- this.initScope();
- }
-
- private initScope = ():void => {
-
- this.$scope.modalInstance = this.$uibModalInstance;
-
- this.$scope.footerButtons = [
- {'name': 'Continue', 'css': 'grey', 'callback': this.$uibModalInstance.close},
- {'name': 'Reject', 'css': 'blue', 'callback': this.$uibModalInstance.dismiss}
- ];
-
- };
-
-}
diff --git a/catalog-ui/src/app/view-models/workspace/conformance-level-modal/conformance-level-modal-view.html b/catalog-ui/src/app/view-models/workspace/conformance-level-modal/conformance-level-modal-view.html
deleted file mode 100644
index 3577e4d77b..0000000000
--- a/catalog-ui/src/app/view-models/workspace/conformance-level-modal/conformance-level-modal-view.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<sdc-modal modal="modalInstance"
- type="classic"
- class="w-sdc-modal modal-type-alert conformance-level-modal"
- header="Warning"
- buttons="footerButtons"
- show-close-button="false">
-
- <perfect-scrollbar include-padding="true">
- <div class="w-sdc-modal-body-content" data-tests-id="message">
- <p>
- You are about to distribute a service with models and artifacts created with an <b>older version of the platform</b>.
- For such service, new properties, metadata and requirements needed by ECOMP components will not be available.
- </p><p>
- It is highly recommended that you upgrade the service models and artifacts.
- </p><p>
- Click "Continue" if you need to distribute the current service version.<br />
- Click "Reject" if you need to stop the distribution and manually upgrade the service.
- </p>
- </div>
- </perfect-scrollbar>
-
-</sdc-modal>
diff --git a/catalog-ui/src/app/view-models/workspace/conformance-level-modal/conformance-level-modal.less b/catalog-ui/src/app/view-models/workspace/conformance-level-modal/conformance-level-modal.less
deleted file mode 100644
index 7f195ade83..0000000000
--- a/catalog-ui/src/app/view-models/workspace/conformance-level-modal/conformance-level-modal.less
+++ /dev/null
@@ -1,3 +0,0 @@
-.conformance-level-modal{
-
-}
diff --git a/catalog-ui/src/app/view-models/workspace/tabs/composition/composition-view-model.ts b/catalog-ui/src/app/view-models/workspace/tabs/composition/composition-view-model.ts
index e2d95280c8..670655ea4b 100644
--- a/catalog-ui/src/app/view-models/workspace/tabs/composition/composition-view-model.ts
+++ b/catalog-ui/src/app/view-models/workspace/tabs/composition/composition-view-model.ts
@@ -215,6 +215,10 @@ export class CompositionViewModel {
if (this.$state.current.name === 'workspace.composition.api') {
this.$state.go('workspace.composition.details');
}
+
+ if(this.$scope.selectedComponent.isService() && this.$state.current.name === 'workspace.composition.relations'){
+ this.$state.go('workspace.composition.api');
+ }
};
this.$scope.openUpdateModal = ():void => {
diff --git a/catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/artifacts/artifacts-view-model.ts b/catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/artifacts/artifacts-view-model.ts
index 0ac5fd0799..5d03563042 100644
--- a/catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/artifacts/artifacts-view-model.ts
+++ b/catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/artifacts/artifacts-view-model.ts
@@ -179,7 +179,7 @@ export class ResourceArtifactsViewModel {
this.$scope.currentComponent.selectedInstance.artifacts = artifacts;
break;
}
- this.loadComponentArtifactIfNeeded();
+ this.initArtifactArr(this.$scope.artifactType);
};
let onError = ()=> {
diff --git a/catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/artifacts/artifacts-view.html b/catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/artifacts/artifacts-view.html
index b0d81b3437..bd4864771e 100644
--- a/catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/artifacts/artifacts-view.html
+++ b/catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/artifacts/artifacts-view.html
@@ -49,7 +49,7 @@
data-tests-id="edit-parameters-of-{{artifact.artifactDisplayName}}"></button>
<download-artifact ng-if="artifact.esId && 'deployment' != artifactType" class="i-sdc-designer-sidebar-section-content-item-button download sprite e-sdc-small-download hand"
- artifact="artifact" component="currentComponent" data-tests-id="download-{{artifact.artifactDisplayName}}" instance="isComponentInstanceSelected()"></download-artifact>
+ artifact="artifact" component="currentComponent" data-tests-id="download_{{artifact.artifactDisplayName}}" instance="isComponentInstanceSelected()"></download-artifact>
<download-artifact ng-if="artifact.esId && 'deployment' == artifactType" class="i-sdc-designer-sidebar-section-content-item-button download sprite e-sdc-small-download hand"
artifact="artifact" component="currentComponent" instance="isComponentInstanceSelected()" data-tests-id="download_{{artifact.artifactDisplayName}}"
show-loader="artifact.isHEAT()"
diff --git a/catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/details/details-view-model.ts b/catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/details/details-view-model.ts
index a81bb9176e..b19c08a28c 100644
--- a/catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/details/details-view-model.ts
+++ b/catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/details/details-view-model.ts
@@ -82,10 +82,11 @@ export class DetailsViewModel {
let highestVersion = _.last(Object.keys(this.$scope.selectedComponent.allVersions));
if (parseFloat(highestVersion) % 1) { //if highest is minor, make sure it is the latest checked in -
- let latestVersionComponent:LeftPaletteComponent = _.find(this.LeftPaletteLoaderService.getLeftPanelComponentsForDisplay(this.$scope.currentComponent.componentType), (component:LeftPaletteComponent) => { //latest checked in
+ let latestVersionComponent:LeftPaletteComponent = _.maxBy(_.filter(this.LeftPaletteLoaderService.getLeftPanelComponentsForDisplay(this.$scope.currentComponent.componentType), (component:LeftPaletteComponent) => { //latest checked in
return (component.systemName === this.$scope.selectedComponent.systemName
|| component.uuid === this.$scope.selectedComponent.uuid);
- });
+ }),(component)=>{return component.version});
+
let latestVersion:string = latestVersionComponent ? latestVersionComponent.version : highestVersion;
if (highestVersion != latestVersion) { //highest is checked out - remove from options
diff --git a/catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/properties-and-attributes/properties-view-model.ts b/catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/properties-and-attributes/properties-view-model.ts
index 84769d7a62..90cb556c75 100644
--- a/catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/properties-and-attributes/properties-view-model.ts
+++ b/catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/properties-and-attributes/properties-view-model.ts
@@ -118,7 +118,9 @@ export class ResourcePropertiesViewModel {
(this.$scope.isPropertyOwner() ?
this.$scope.properties[property.parentUniqueId] :
this.$scope.properties[property.resourceInstanceUniqueId]) || [],
- this.isPropertyValueOwner()).then(() => {
+ this.isPropertyValueOwner()).then((updatedProperty:PropertyModel) => {
+ let oldProp = _.find(this.$scope.properties[updatedProperty.resourceInstanceUniqueId], (prop:PropertyModel) => {return prop.uniqueId == updatedProperty.uniqueId;});
+ oldProp.value = updatedProperty.value;
});
};
diff --git a/catalog-ui/src/app/view-models/workspace/tabs/deployment-artifacts/deployment-artifacts-view.html b/catalog-ui/src/app/view-models/workspace/tabs/deployment-artifacts/deployment-artifacts-view.html
index cc914b07a8..a36eb1b74d 100644
--- a/catalog-ui/src/app/view-models/workspace/tabs/deployment-artifacts/deployment-artifacts-view.html
+++ b/catalog-ui/src/app/view-models/workspace/tabs/deployment-artifacts/deployment-artifacts-view.html
@@ -28,7 +28,7 @@
<div class="heat-env-connect-container" ng-class="{'heat-env-connect-container-view-mode': isViewMode()}" data-ng-if="artifact.envArtifact">
<span class="heat-env-connect"></span>
</div>
- <span data-tests-id="artifactDisplayName_{{artifact.artifactDisplayName}}" sdc-smart-tooltip class="artifact-name">{{artifact.artifactDisplayName}}</span>
+ <span data-tests-id="artifactDisplayName_{{artifact.artifactDisplayName}}" class="artifact-name text" tooltips tooltip-content="{{artifact.artifactDisplayName}}">{{artifact.artifactDisplayName}}</span>
<span class="sprite-new show-desc hand description-popover-icon"
uib-popover-template="popoverTemplate"
diff --git a/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts b/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts
index ff4636e002..48a2446e5f 100644
--- a/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts
+++ b/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts
@@ -408,7 +408,7 @@ export class WorkspaceViewModel {
switch (url) {
case 'lifecycleState/CHECKOUT':
// only checkOut get the full component from server
- this.$scope.component = component;
+ // this.$scope.component = component;
// Work around to change the csar version
if (this.cacheService.get(CHANGE_COMPONENT_CSAR_VERSION_FLAG)) {
(<Resource>this.$scope.component).csarVersion = this.cacheService.get(CHANGE_COMPONENT_CSAR_VERSION_FLAG);
@@ -424,12 +424,17 @@ export class WorkspaceViewModel {
//when checking out a major(certified) version
this.components.unshift(component);
}
+ this.EventListenerService.notifyObservers(EVENTS.ON_CHECKOUT, component);
+ // this.$state.go(this.$state.current.name, {
+ // id: component.uniqueId,
+ // type: component.componentType.toLowerCase(),
+ // components: this.components
+ // });
+ this.$scope.mode = this.initViewMode();
+ this.initChangeLifecycleStateButtons();
+ this.initVersionObject();
+ this.$scope.isLoading = false;
- this.$state.go(this.$state.current.name, {
- id: component.uniqueId,
- type: component.componentType.toLowerCase(),
- components: this.components
- });
this.Notification.success({
message: this.$filter('translate')("CHECKOUT_SUCCESS_MESSAGE_TEXT"),
title: this.$filter('translate')("CHECKOUT_SUCCESS_MESSAGE_TITLE")