From dd60339b06d252fcb1382aa97ab3d65b37dad021 Mon Sep 17 00:00:00 2001 From: Michael Lando Date: Wed, 12 Jul 2017 00:54:52 +0300 Subject: [sdc] rebase update Change-Id: I8f1fc7150975122dd9f3f4e653b9983064b399a6 Signed-off-by: Michael Lando --- .../tabs/composition/composition-view-model.ts | 11 +++---- .../workspace/tabs/composition/composition.less | 12 +++++--- .../tabs/artifacts/artifacts-view-model.ts | 36 +++++++++++++++++----- .../composition/tabs/artifacts/artifacts-view.html | 8 ++--- .../tabs/composition/tabs/artifacts/artifacts.less | 3 +- .../composition/tabs/details/details-view-model.ts | 4 +-- .../tabs/composition/tabs/details/details.less | 10 ++++-- .../properties-view-model.ts | 20 ++++++++++++ .../tabs/relations/relations-view-model.ts | 20 ++++++++++++ .../composition/tabs/structure/structure-view.ts | 20 ++++++++++++ 10 files changed, 118 insertions(+), 26 deletions(-) (limited to 'catalog-ui/src/app/view-models/workspace/tabs/composition') 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 d0eefdfd11..894f8aeb2a 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 @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -134,6 +134,8 @@ export class CompositionViewModel { private removeSelectedComponentInstance = ():void => { this.eventListenerService.notifyObservers(GRAPH_EVENTS.ON_DELETE_MULTIPLE_COMPONENTS); + this.$scope.currentComponent.selectedInstance = null; + this.$scope.selectedComponent = this.$scope.currentComponent; }; private updateUuidMap = ():void => { @@ -241,10 +243,7 @@ export class CompositionViewModel { this.$scope.setComponent(this.$scope.currentComponent); this.$scope.updateSelectedComponent(); }; - - this.$scope.reload = (component:Component):void => { - this.$state.go(this.$state.current.name,{id:component.uniqueId},{reload:true}); - }; + this.eventListenerService.registerObserverCallback(EVENTS.ON_CHECKOUT, this.$scope.reload); diff --git a/catalog-ui/src/app/view-models/workspace/tabs/composition/composition.less b/catalog-ui/src/app/view-models/workspace/tabs/composition/composition.less index 501805be3f..7a775bdb11 100644 --- a/catalog-ui/src/app/view-models/workspace/tabs/composition/composition.less +++ b/catalog-ui/src/app/view-models/workspace/tabs/composition/composition.less @@ -242,6 +242,10 @@ white-space: nowrap; } + .w-sdc-designer-sidebar-section-title { + text-transform: uppercase; + } + .w-sdc-designer-sidebar-section-title + .w-sdc-designer-sidebar-section-content { margin: 0 auto; } @@ -253,6 +257,8 @@ .i-sdc-designer-sidebar-section-content-item { .b_7; + font-size: 13px; + margin-bottom: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; @@ -668,11 +674,10 @@ } .i-sdc-designer-leftbar-section-content-item-info-title { - .m_14_m; + .m_13_m; line-height: 14px; overflow: hidden; text-overflow: ellipsis; - text-transform: uppercase; max-width: 120px; display: inline-block; white-space: nowrap; @@ -680,12 +685,11 @@ } .i-sdc-designer-leftbar-section-content-item-info-text { - .p_3; + .m_13_r; line-height: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; - //margin: -1px 0 2px 0; } .i-sdc-designer-leftbar-section-content-item-info-text-link { 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 f12e95c9df..83e4653954 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 @@ -1,3 +1,23 @@ +/*- + * ============LICENSE_START======================================================= + * SDC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + 'use strict'; import { ArtifactModel, @@ -28,7 +48,7 @@ export interface IArtifactsViewModelScope extends ICompositionViewModelScope { getEnvArtifact(heatArtifact:ArtifactModel):any; getEnvArtifactName(artifact:ArtifactModel):string; isLicenseArtifact(artifact:ArtifactModel):boolean; - isVFiArtifact(artifact:ArtifactModel):boolean; + //isVFiArtifact(artifact:ArtifactModel):boolean; } export class ResourceArtifactsViewModel { @@ -105,6 +125,7 @@ export class ResourceArtifactsViewModel { } } this.$scope.artifacts = artifacts; + this.$scope.isLoading = false; }; @@ -217,12 +238,13 @@ export class ResourceArtifactsViewModel { return this.artifactsUtils.getTitle(this.$scope.artifactType, this.$scope.currentComponent); }; - this.$scope.isVFiArtifact = (artifact:ArtifactModel):boolean=> { - if (artifact.artifactGroupType === ArtifactGroupType.INFORMATION) {//fix DE256847 - return this.$scope.currentComponent.artifacts && (!this.$scope.currentComponent.artifacts[artifact.artifactLabel] || !this.$scope.currentComponent.artifacts[artifact.artifactLabel].artifactName); - } - return this.$scope.currentComponent.selectedInstance && this.$scope.currentComponent.selectedInstance.deploymentArtifacts && this.$scope.currentComponent.selectedInstance.deploymentArtifacts[artifact.artifactLabel]; - }; + // Bug 310499 - user should be unable to delete RI artifact. (also talked to David and agreed this function isn't necessary) + // this.$scope.isVFiArtifact = (artifact:ArtifactModel):boolean=> { + // if (artifact.artifactGroupType === ArtifactGroupType.INFORMATION) {//fix DE256847 + // return this.$scope.currentComponent.artifacts && (!this.$scope.currentComponent.artifacts[artifact.artifactLabel] || !this.$scope.currentComponent.artifacts[artifact.artifactLabel].artifactName); + // } + // return this.$scope.currentComponent.selectedInstance && this.$scope.currentComponent.selectedInstance.deploymentArtifacts && this.$scope.currentComponent.selectedInstance.deploymentArtifacts[artifact.artifactLabel]; + // }; this.$scope.addOrUpdate = (artifact:ArtifactModel):void => { this.artifactsUtils.setArtifactType(artifact, this.$scope.artifactType); 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 bd4864771e..01cb9d4ee4 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 @@ -10,7 +10,7 @@
@@ -19,8 +19,8 @@ data-ng-if="artifact.artifactName">
@@ -36,7 +36,7 @@ Description:{{artifact.description}}
-