From a5445100050e49e83f73424198d73cd72d672a4d Mon Sep 17 00:00:00 2001 From: Michael Lando Date: Sun, 4 Mar 2018 14:53:33 +0200 Subject: Sync Integ to Master Change-Id: I71e3acc26fa612127756ac04073a522b9cc6cd74 Issue-ID: SDC-977 Signed-off-by: Gitelman, Tal (tg851x) --- .../workspace/tabs/activity-log/activity-log.ts | 1 + .../tabs/composition/composition-view-model.ts | 95 +++++++++++++++++----- .../tabs/composition/composition-view.html | 21 +++-- .../workspace/tabs/composition/composition.less | 45 +++++++++- .../tabs/artifacts/artifacts-view-model.ts | 3 + .../composition/tabs/details/details-view-model.ts | 52 +++++++++--- .../composition/tabs/details/details-view.html | 2 +- .../properties-view-model.ts | 1 + .../tabs/relations/relations-view-model.ts | 1 + .../deployment-artifacts-view-model.ts | 1 + .../disribution-status-modal-view-model.ts | 1 + .../tabs/distribution/distribution-view-model.ts | 1 + .../tabs/distribution/distribution-view.html | 1 + .../workspace/tabs/general/general-view-model.ts | 1 + .../workspace/tabs/general/general-view.html | 20 ++--- .../information-artifacts-view-model.ts | 1 + .../resource-input/resource-inputs-view-model.ts | 1 + .../service-input/service-inputs-view-model.ts | 1 + .../network-call-flow-view-model.ts | 1 + .../req-and-capabilities-view-model.ts | 1 + .../tosca-artifacts/tosca-artifacts-view-model.ts | 2 + 21 files changed, 197 insertions(+), 56 deletions(-) (limited to 'catalog-ui/src/app/view-models/workspace/tabs') diff --git a/catalog-ui/src/app/view-models/workspace/tabs/activity-log/activity-log.ts b/catalog-ui/src/app/view-models/workspace/tabs/activity-log/activity-log.ts index 5d22d65f52..452224a829 100644 --- a/catalog-ui/src/app/view-models/workspace/tabs/activity-log/activity-log.ts +++ b/catalog-ui/src/app/view-models/workspace/tabs/activity-log/activity-log.ts @@ -19,6 +19,7 @@ */ 'use strict'; +import * as _ from "lodash"; import {IWorkspaceViewModelScope} from "app/view-models/workspace/workspace-view-model"; import {Activity} from "app/models"; import {ActivityLogService} from "app/services"; 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 5236259f30..46c2d2edf9 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 @@ -18,14 +18,18 @@ * ============LICENSE_END========================================================= */ 'use strict'; +import * as _ from "lodash"; import {Component, ComponentInstance, IAppMenu} from "app/models"; import {SharingService, CacheService, EventListenerService, LeftPaletteLoaderService} from "app/services"; import {ModalsHandler, GRAPH_EVENTS, ComponentFactory, ChangeLifecycleStateHandler, MenuHandler, EVENTS} from "app/utils"; import {IWorkspaceViewModelScope} from "../../workspace-view-model"; -import {ComponentServiceNg2} from "app/ng2/services/component-services/component.service"; import {ComponentGenericResponse} from "app/ng2/services/responses/component-generic-response"; import {Resource} from "app/models/components/resource"; -import {ResourceType,ComponentType} from "../../../../utils/constants"; +import {ResourceType,ComponentType} from "app/utils/constants"; +import {ComponentServiceFactoryNg2} from "app/ng2/services/component-services/component.service.factory"; +import {ServiceGenericResponse} from "app/ng2/services/responses/service-generic-response"; +import {Service} from "app/models/components/service"; + export interface ICompositionViewModelScope extends IWorkspaceViewModelScope { @@ -39,6 +43,8 @@ export interface ICompositionViewModelScope extends IWorkspaceViewModelScope { version:string; isViewOnly:boolean; isLoadingRightPanel:boolean; + disabledTabs:boolean; + openVersionChangeModal(pathsToDelete:string[]):ng.IPromise; onComponentInstanceVersionChange(component:Component); isComponentInstanceSelected():boolean; updateSelectedComponent():void @@ -49,6 +55,7 @@ export interface ICompositionViewModelScope extends IWorkspaceViewModelScope { printScreen():void; isPNF():boolean; isConfiguration():boolean; + preventMoveTab(state: boolean):void; cacheComponentsInstancesFullData:Component; } @@ -70,7 +77,7 @@ export class CompositionViewModel { 'LeftPaletteLoaderService', 'ModalsHandler', 'EventListenerService', - 'ComponentServiceNg2' + 'ComponentServiceFactoryNg2' ]; constructor(private $scope:ICompositionViewModelScope, @@ -87,7 +94,7 @@ export class CompositionViewModel { private LeftPaletteLoaderService:LeftPaletteLoaderService, private ModalsHandler:ModalsHandler, private eventListenerService:EventListenerService, - private ComponentServiceNg2: ComponentServiceNg2) { + private ComponentServiceFactoryNg2: ComponentServiceFactoryNg2) { this.$scope.setValidState(true); this.initScope(); @@ -99,9 +106,14 @@ export class CompositionViewModel { private initGraphData = ():void => { if(!this.$scope.component.componentInstances || !this.$scope.component.componentInstancesRelations ) { this.$scope.isLoading = true; - this.ComponentServiceNg2.getComponentInstancesAndRelation(this.$scope.component).subscribe((response:ComponentGenericResponse) => { + let service = this.ComponentServiceFactoryNg2.getComponentService(this.$scope.component); + service.getComponentCompositionData(this.$scope.component).subscribe((response:ComponentGenericResponse) => { + if (this.$scope.component.isService()) { + ( this.$scope.component).forwardingPaths = (response).forwardingPaths; + } this.$scope.component.componentInstances = response.componentInstances; this.$scope.component.componentInstancesRelations = response.componentInstancesRelations; + this.$scope.component.policies = response.policies; this.$scope.isLoading = false; this.initComponent(); this.eventListenerService.notifyObservers(GRAPH_EVENTS.ON_COMPOSITION_GRAPH_DATA_LOADED); @@ -116,17 +128,15 @@ export class CompositionViewModel { private cacheComponentsInstancesFullData:Array; private initComponent = ():void => { - this.$scope.currentComponent = this.$scope.component; this.$scope.selectedComponent = this.$scope.currentComponent; this.updateUuidMap(); this.$scope.isViewOnly = this.$scope.isViewMode(); }; - private registerGraphEvents = (scope:ICompositionViewModelScope):void => { + private registerGraphEvents = (scope:ICompositionViewModelScope):void => { this.eventListenerService.registerObserverCallback(GRAPH_EVENTS.ON_NODE_SELECTED, scope.setSelectedInstance); this.eventListenerService.registerObserverCallback(GRAPH_EVENTS.ON_GRAPH_BACKGROUND_CLICKED, scope.onBackgroundClick); - }; private openUpdateComponentInstanceNameModal = ():void => { @@ -136,7 +146,7 @@ export class CompositionViewModel { }; private removeSelectedComponentInstance = ():void => { - this.eventListenerService.notifyObservers(GRAPH_EVENTS.ON_DELETE_MULTIPLE_COMPONENTS); + this.eventListenerService.notifyObservers(GRAPH_EVENTS.ON_DELETE_COMPONENT_INSTANCE, this.$scope.currentComponent.selectedInstance) this.$scope.currentComponent.selectedInstance = null; this.$scope.selectedComponent = this.$scope.currentComponent; }; @@ -151,7 +161,6 @@ export class CompositionViewModel { }; private initScope = ():void => { - this.$scope.sharingService = this.sharingService; this.$scope.sdcMenu = this.sdcMenu; this.$scope.isLoading = false; @@ -231,20 +240,60 @@ export class CompositionViewModel { }; this.$scope.deleteSelectedComponentInstance = ():void => { - let state = "deleteInstance"; - let onOk = ():void => { - this.removeSelectedComponentInstance(); - //this.$scope.graphApi.deleteSelectedNodes(); - }; - let title:string = this.$scope.sdcMenu.alertMessages[state].title; - let message:string = this.$scope.sdcMenu.alertMessages[state].message.format([this.$scope.currentComponent.selectedInstance.name]); - this.ModalsHandler.openAlertModal(title, message).then(onOk); + const {currentComponent} = this.$scope; + const {title, message} = this.$scope.sdcMenu.alertMessages['deleteInstance']; + let modalText = message.format([currentComponent.selectedInstance.name]); + + if (currentComponent.isService()) { + const {forwardingPaths} = (currentComponent); + const instanceId = currentComponent.selectedInstance.uniqueId; + + const relatedPaths = _.filter(forwardingPaths, forwardingPath => { + const pathElements = forwardingPath.pathElements.listToscaDataDefinition; + return pathElements.find(path => path.fromNode === instanceId || path.toNode === instanceId); + }); + + if (relatedPaths.length) { + const pathNames = _.map(relatedPaths, path => path.name).join(', '); + modalText += `

The following service paths will be erased: ${pathNames}

`; + } + } + + this.ModalsHandler.openAlertModal(title, modalText).then(this.removeSelectedComponentInstance); + }; + + this.$scope.openVersionChangeModal = (pathsToDelete:string[]):ng.IPromise => { + const {currentComponent} = this.$scope; + const {forwardingPaths} = currentComponent; + + const relatedPaths = _.filter(forwardingPaths, path => + _.find(pathsToDelete, id => + path.uniqueId === id + ) + ).map(path => path.name); + const pathNames = _.join(relatedPaths, ', ') || 'none'; + + const {title, message} = this.$scope.sdcMenu.alertMessages['upgradeInstance']; + return this.ModalsHandler.openConfirmationModal(title, message.format([pathNames]), false); }; this.$scope.onComponentInstanceVersionChange = (component:Component):void => { - this.$scope.currentComponent = component; - this.$scope.setComponent(this.$scope.currentComponent); - this.$scope.updateSelectedComponent(); + let onChange = () => { + this.$scope.currentComponent = component; + this.$scope.setComponent(this.$scope.currentComponent); + this.$scope.updateSelectedComponent(); + this.eventListenerService.notifyObservers(GRAPH_EVENTS.ON_VERSION_CHANGED, this.$scope.currentComponent); + }; + + if (component.isService()) { + const service = this.ComponentServiceFactoryNg2.getComponentService(component); + service.getComponentCompositionData(component).subscribe((response:ServiceGenericResponse) => { + (component).forwardingPaths = response.forwardingPaths; + onChange(); + }); + } else { + onChange(); + } }; this.$scope.isPNF = (): boolean => { @@ -255,6 +304,10 @@ export class CompositionViewModel { return this.$scope.selectedComponent.isResource() && (this.$scope.selectedComponent).resourceType === ResourceType.CONFIGURATION; }; + this.$scope.preventMoveTab = (state: boolean): void => { + this.$scope.disabledTabs = state; + }; + this.eventListenerService.registerObserverCallback(EVENTS.ON_CHECKOUT, this.$scope.reload); } diff --git a/catalog-ui/src/app/view-models/workspace/tabs/composition/composition-view.html b/catalog-ui/src/app/view-models/workspace/tabs/composition/composition-view.html index bfb2865348..fceb73b882 100644 --- a/catalog-ui/src/app/view-models/workspace/tabs/composition/composition-view.html +++ b/catalog-ui/src/app/view-models/workspace/tabs/composition/composition-view.html @@ -5,6 +5,8 @@ is-view-only="isViewOnly" is-loading="isLoading"> + + @@ -46,7 +48,8 @@ @@ -58,32 +61,38 @@ data-ui-sref="workspace.composition.deployment" tooltips tooltip-class="tooltip-custom tab-tooltip" tooltip-content="Deployment Artifacts" data-tests-id="deployment-artifact-tab" - data-ng-if="!isPNF() && !isConfiguration() && !(isComponentInstanceSelected() && currentComponent.selectedInstance.isServiceProxy())"> + data-ng-if="!isPNF() && !isConfiguration() && !(isComponentInstanceSelected() && currentComponent.selectedInstance.isServiceProxy())" + data-ng-class="{'disabled': disabledTabs}">
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 624ed03431..f351450e6d 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 @@ -1,3 +1,33 @@ + .i-sdc-designer-leftbar-section-popup-panel { + position: absolute; + display: inline-block; + background-color: white; + border: solid 1px #d2d2d2; + border-top: solid 3px #13a7df; + width: 140px; + height: 40px; + z-index: 10000; + } + + .i-sdc-designer-leftbar-section-popup-panel-group { + padding-left: 8px; + padding-top: 8px; + } + + .i-sdc-designer-leftbar-section-popup-panel-plus { + border-radius: 50%; + color: white; + background-color: #13a7df; + width: 20px; + text-align: center; + display: inline-block; + cursor: pointer; + } + + .i-sdc-designer-leftbar-section-popup-panel-title { + padding-left: 10px; + display: inline-block; + } .composition{ .sdc-workspace-container{ @@ -791,7 +821,16 @@ .g_1; line-height: 18px; } - + + .service-path-buttons { + margin-top: 12px; + position: absolute; + right: 70px; + top: 53px; + &.with-sidebar { + right: 380px; + } + } //Canvas search menu .w-sdc-search-menu { position:absolute; @@ -815,8 +854,8 @@ padding:2px 50px 2px 10px; transition:all 0.4s; } - .clear-search-x { - top: 17px + .search-bar-container { + position:relative; } &:not(:hover):not(.autocomplete-visible):not(.active){ 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 b80b63cac9..627d20528e 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 @@ -19,6 +19,7 @@ */ 'use strict'; +import * as _ from "lodash"; import { ArtifactModel, Service, @@ -131,6 +132,7 @@ export class ResourceArtifactsViewModel { this.$scope.allowDeleteAndUpdateArtifactMap[artifact.artifactLabel] = this.allowDeleteAndUpdateArtifact(artifact); }); this.$scope.isLoading = false; + this.$scope.preventMoveTab(false); }; @@ -213,6 +215,7 @@ export class ResourceArtifactsViewModel { }; this.$scope.isLoading = true; + this.$scope.preventMoveTab(true); if (this.$scope.isComponentInstanceSelected()) { this.$scope.component.getComponentInstanceArtifactsByGroupType(this.$scope.component.selectedInstance.uniqueId, this.convertToArtifactUrl(this.$scope.artifactType)).then(onGetInstanceArtifactsSuccess, onError); } else { 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 0d8d17ec73..6e3258f69b 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 @@ -19,11 +19,15 @@ */ 'use strict'; +import * as _ from "lodash"; import {Component} from "app/models"; import {GRAPH_EVENTS} from "app/utils"; import {LeftPaletteLoaderService, EventListenerService} from "app/services"; import {ICompositionViewModelScope} from "../../composition-view-model"; import {LeftPaletteComponent} from "../../../../../../models/components/displayComponent"; +import {ComponentServiceFactoryNg2} from "app/ng2/services/component-services/component.service.factory"; +import {ServiceServiceNg2} from 'app/ng2/services/component-services/service.service'; +import {Service} from "app/models/components/service"; export interface IEditResourceVersion { allVersions:any; @@ -45,13 +49,16 @@ export class DetailsViewModel { static '$inject' = [ '$scope', 'LeftPaletteLoaderService', - 'EventListenerService' - + 'EventListenerService', + 'ComponentServiceFactoryNg2', + 'ServiceServiceNg2' ]; constructor(private $scope:IDetailsViewModelScope, private LeftPaletteLoaderService:LeftPaletteLoaderService, - private eventListenerService:EventListenerService) { + private eventListenerService:EventListenerService, + private ComponentServiceFactoryNg2: ComponentServiceFactoryNg2, + private serviceService: ServiceServiceNg2) { this.initScope(); } @@ -112,22 +119,43 @@ export class DetailsViewModel { this.$scope.isLoading = true; this.$scope.$parent.isLoading = true; - let onSuccess = (component:Component)=> { + let service = this.$scope.currentComponent; + let {changeVersion} = this.$scope.editResourceVersion; + let componentUid:string = this.$scope.editResourceVersion.allVersions[changeVersion]; + + let onCancel = (error:any) => { this.$scope.isLoading = false; this.$scope.$parent.isLoading = false; - this.$scope.onComponentInstanceVersionChange(component); + this.$scope.editResourceVersion.changeVersion = this.$scope.currentComponent.selectedInstance.componentVersion; - this.eventListenerService.notifyObservers(GRAPH_EVENTS.ON_VERSION_CHANGED, this.$scope.currentComponent); + if (error) { + console.log(error); + } }; - let onFailed = (error:any)=> { - this.$scope.isLoading = false; - this.$scope.$parent.isLoading = false; - console.log(error); + let onUpdate = () => { + let onSuccess = (component:Component) => { + this.$scope.isLoading = false; + this.$scope.$parent.isLoading = false; + this.$scope.onComponentInstanceVersionChange(component); + }; + + this.$scope.currentComponent.changeComponentInstanceVersion(componentUid).then(onSuccess, onCancel); }; - let componentUid:string = this.$scope.editResourceVersion.allVersions[this.$scope.editResourceVersion.changeVersion]; - this.$scope.currentComponent.changeComponentInstanceVersion(componentUid).then(onSuccess, onFailed); + this.serviceService.checkComponentInstanceVersionChange(service, componentUid).subscribe((pathsToDelete:string[]) => { + if (pathsToDelete && pathsToDelete.length) { + this.$scope.isLoading = false; + this.$scope.$parent.isLoading = false; + this.$scope.$parent.openVersionChangeModal(pathsToDelete).then(() => { + this.$scope.isLoading = true; + this.$scope.$parent.isLoading = true; + onUpdate(); + }, onCancel); + } else { + onUpdate(); + } + }, onCancel); }; } } diff --git a/catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/details/details-view.html b/catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/details/details-view.html index 5020c73df4..033c4668f3 100644 --- a/catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/details/details-view.html +++ b/catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/details/details-view.html @@ -26,7 +26,7 @@ data-ng-if="!isComponentInstanceSelected()" data-tests-id="rightTab_version" data-ng-bind="selectedComponent.version"> - @@ -178,10 +176,11 @@ data-ng-pattern="validation.contactIdValidationPattern" data-ng-model-options="{ debounce: 500 }" data-tests-id="contactId" - maxlength="50" + data-ng-maxlength="50" />
+
@@ -196,7 +195,7 @@ data-ng-model="component.projectCode" data-ng-class="{'view-mode': isViewMode()}" data-ng-model-options="{ debounce: 500 }" - maxlength="50" + data-ng-maxlength="50" data-required name="projectCode" data-ng-pattern="validation.projectCodeValidationPattern" @@ -204,6 +203,7 @@ />
+
@@ -222,7 +222,6 @@ name="vendorName" data-ng-change="onVendorNameChange(oldValue)" data-ng-pattern="validation.VendorNameValidationPattern" - maxlength="60" data-ng-disabled="component.isAlreadyCertified() || (component.isCsarComponent() && component.vendorName && component.vendorName!=='')" data-tests-id="vendorName" /> @@ -250,7 +249,6 @@ data-required name="vendorRelease" data-ng-pattern="validation.VendorReleaseValidationPattern" - maxlength="25" data-ng-disabled="component.isCsarComponent() && component.vendorRelease && component.vendorRelease!==''" data-tests-id="vendorRelease" /> @@ -275,7 +273,6 @@ data-ng-maxlength="65" name="resourceVendorModelNumber" data-ng-pattern="validation.VendorModelNumberValidationPattern" - maxlength="65" data-tests-id="resourceVendorModelNumber" /> @@ -312,10 +309,9 @@
- +
@@ -367,10 +362,9 @@ data-tests-id="serviceRole" data-ng-maxlength="256" data-ng-pattern="validation.ServiceTypeAndRoleValidationPattern" - maxlength="256" />
- +
diff --git a/catalog-ui/src/app/view-models/workspace/tabs/information-artifacts/information-artifacts-view-model.ts b/catalog-ui/src/app/view-models/workspace/tabs/information-artifacts/information-artifacts-view-model.ts index b2fd4d68c0..47a96fb385 100644 --- a/catalog-ui/src/app/view-models/workspace/tabs/information-artifacts/information-artifacts-view-model.ts +++ b/catalog-ui/src/app/view-models/workspace/tabs/information-artifacts/information-artifacts-view-model.ts @@ -19,6 +19,7 @@ */ 'use strict'; +import * as _ from "lodash"; import {ModalsHandler} from "app/utils"; import {SharingService} from "app/services"; import {IAppConfigurtaion, ArtifactModel, IFileDownload} from "app/models"; diff --git a/catalog-ui/src/app/view-models/workspace/tabs/inputs/resource-input/resource-inputs-view-model.ts b/catalog-ui/src/app/view-models/workspace/tabs/inputs/resource-input/resource-inputs-view-model.ts index 2e871a5f8d..2a7cd3dd65 100644 --- a/catalog-ui/src/app/view-models/workspace/tabs/inputs/resource-input/resource-inputs-view-model.ts +++ b/catalog-ui/src/app/view-models/workspace/tabs/inputs/resource-input/resource-inputs-view-model.ts @@ -19,6 +19,7 @@ */ 'use strict'; +import * as _ from "lodash"; import {IWorkspaceViewModelScope} from "app/view-models/workspace/workspace-view-model"; import {ComponentInstance, InstancesInputsOrPropertiesMapData, Resource, PropertyModel, InputModel} from "app/models"; import {ModalsHandler} from "app/utils"; diff --git a/catalog-ui/src/app/view-models/workspace/tabs/inputs/service-input/service-inputs-view-model.ts b/catalog-ui/src/app/view-models/workspace/tabs/inputs/service-input/service-inputs-view-model.ts index 00f3347b74..bdbc0a4334 100644 --- a/catalog-ui/src/app/view-models/workspace/tabs/inputs/service-input/service-inputs-view-model.ts +++ b/catalog-ui/src/app/view-models/workspace/tabs/inputs/service-input/service-inputs-view-model.ts @@ -19,6 +19,7 @@ */ 'use strict'; +import * as _ from "lodash"; import {IWorkspaceViewModelScope} from "app/view-models/workspace/workspace-view-model"; import {ComponentInstance, InstancesInputsOrPropertiesMapData, Service, IAppMenu, InputModel, PropertyModel, InputPropertyBase} from "app/models"; import {DataTypesService} from "app/services"; diff --git a/catalog-ui/src/app/view-models/workspace/tabs/network-call-flow/network-call-flow-view-model.ts b/catalog-ui/src/app/view-models/workspace/tabs/network-call-flow/network-call-flow-view-model.ts index 488e4c774d..af11e1cf9a 100644 --- a/catalog-ui/src/app/view-models/workspace/tabs/network-call-flow/network-call-flow-view-model.ts +++ b/catalog-ui/src/app/view-models/workspace/tabs/network-call-flow/network-call-flow-view-model.ts @@ -19,6 +19,7 @@ */ 'use strict'; +import * as _ from "lodash"; import {IWorkspaceViewModelScope} from "app/view-models/workspace/workspace-view-model"; import {VendorModel} from "app/view-models/workspace/tabs/management-workflow/management-workflow-view-model"; import {ResourceType, ArtifactType} from "app/utils"; diff --git a/catalog-ui/src/app/view-models/workspace/tabs/req-and-capabilities/req-and-capabilities-view-model.ts b/catalog-ui/src/app/view-models/workspace/tabs/req-and-capabilities/req-and-capabilities-view-model.ts index b6cbf65cf0..f63ab1ccbc 100644 --- a/catalog-ui/src/app/view-models/workspace/tabs/req-and-capabilities/req-and-capabilities-view-model.ts +++ b/catalog-ui/src/app/view-models/workspace/tabs/req-and-capabilities/req-and-capabilities-view-model.ts @@ -22,6 +22,7 @@ * Created by rcohen on 9/22/2016. */ 'use strict'; +import * as _ from "lodash"; import {IWorkspaceViewModelScope} from "app/view-models/workspace/workspace-view-model"; import {ModalsHandler} from "app/utils"; import {Capability, PropertyModel, Requirement} from "app/models"; diff --git a/catalog-ui/src/app/view-models/workspace/tabs/tosca-artifacts/tosca-artifacts-view-model.ts b/catalog-ui/src/app/view-models/workspace/tabs/tosca-artifacts/tosca-artifacts-view-model.ts index 77b5ab74eb..a1f8152cea 100644 --- a/catalog-ui/src/app/view-models/workspace/tabs/tosca-artifacts/tosca-artifacts-view-model.ts +++ b/catalog-ui/src/app/view-models/workspace/tabs/tosca-artifacts/tosca-artifacts-view-model.ts @@ -19,10 +19,12 @@ */ 'use strict'; +import * as _ from "lodash"; import {ArtifactModel, IFileDownload} from "app/models"; import {IWorkspaceViewModelScope} from "app/view-models/workspace/workspace-view-model"; import {ComponentGenericResponse} from "../../../../ng2/services/responses/component-generic-response"; import {ComponentServiceNg2} from "../../../../ng2/services/component-services/component.service"; + export interface IToscaArtifactsScope extends IWorkspaceViewModelScope { artifacts:Array; tableHeadersList:Array; -- cgit 1.2.3-korg