From ee2eb99f5e996b941757c2e747af6df0db61ffc6 Mon Sep 17 00:00:00 2001 From: Anjali walsatwar Date: Wed, 10 Oct 2018 11:58:51 +0530 Subject: composition-graph refactoring Issue-ID: SDC-1789 Change-Id: I65f8b68fd79dc9e9cbc78fe1b7f06af24f777985 Signed-off-by: Anjali walsatwar --- .../utils/composition-graph-service-path-utils.ts | 40 +++++++++++----------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'catalog-ui/src/app/directives/graphs-v2/composition-graph/utils/composition-graph-service-path-utils.ts') diff --git a/catalog-ui/src/app/directives/graphs-v2/composition-graph/utils/composition-graph-service-path-utils.ts b/catalog-ui/src/app/directives/graphs-v2/composition-graph/utils/composition-graph-service-path-utils.ts index 1a348912fc..48befef22d 100644 --- a/catalog-ui/src/app/directives/graphs-v2/composition-graph/utils/composition-graph-service-path-utils.ts +++ b/catalog-ui/src/app/directives/graphs-v2/composition-graph/utils/composition-graph-service-path-utils.ts @@ -19,34 +19,34 @@ */ import * as _ from "lodash"; -import {LoaderService} from "app/services"; -import {CompositionGraphGeneralUtils} from "./composition-graph-general-utils"; -import {ICompositionGraphScope} from "../composition-graph.directive"; -import {ServiceServiceNg2} from 'app/ng2/services/component-services/service.service'; -import {Service} from "../../../../models/components/service"; -import {ForwardingPath} from "app/models/forwarding-path"; -import {ForwardingPathLink} from "app/models/forwarding-path-link"; -import {CompositionCiServicePathLink} from "../../../../models/graph/graph-links/composition-graph-links/composition-ci-service-path-link"; -import {CommonGraphUtils} from "app/directives/graphs-v2/common/common-graph-utils"; +import { LoaderService } from "app/services"; +import { CompositionGraphGeneralUtils } from "./composition-graph-general-utils"; +import { ICompositionGraphScope } from "../composition-graph.directive"; +import { ServiceServiceNg2 } from 'app/ng2/services/component-services/service.service'; +import { Service } from "../../../../models/components/service"; +import { ForwardingPath } from "app/models/forwarding-path"; +import { ForwardingPathLink } from "app/models/forwarding-path-link"; +import { CompositionCiServicePathLink } from "../../../../models/graph/graph-links/composition-graph-links/composition-ci-service-path-link"; +import { CommonGraphUtils } from "app/directives/graphs-v2/common/common-graph-utils"; export class ServicePathGraphUtils { constructor( - private loaderService:LoaderService, - private generalGraphUtils:CompositionGraphGeneralUtils, - private serviceService:ServiceServiceNg2, - private commonGraphUtils:CommonGraphUtils - ) {} + private loaderService: LoaderService, + private generalGraphUtils: CompositionGraphGeneralUtils, + private serviceService: ServiceServiceNg2, + private commonGraphUtils: CommonGraphUtils + ) { } - public deletePathsFromGraph(cy: Cy.Instance, service:Service){ - cy.remove(`[type="${CompositionCiServicePathLink.LINK_TYPE}"]`); + public deletePathsFromGraph(cy: Cy.Instance, service: Service) { + cy.remove(`[type="${CompositionCiServicePathLink.LINK_TYPE}"]`); } - - public drawPath(cy: Cy.Instance, forwardingPath: ForwardingPath, service:Service) { + + public drawPath(cy: Cy.Instance, forwardingPath: ForwardingPath, service: Service) { let pathElements = forwardingPath.pathElements.listToscaDataDefinition; _.forEach(pathElements, (link: ForwardingPathLink) => { - let data:CompositionCiServicePathLink = new CompositionCiServicePathLink(link); + let data: CompositionCiServicePathLink = new CompositionCiServicePathLink(link); data.source = _.find( service.componentInstances, instance => instance.name === data.forwardingPathLink.fromNode @@ -61,7 +61,7 @@ export class ServicePathGraphUtils { }); } - public createOrUpdateServicePath = (scope:ICompositionGraphScope, path: any): void => { + public createOrUpdateServicePath = (scope: ICompositionGraphScope, path: any): void => { let service = scope.component; this.loaderService.showLoader('composition-graph'); -- cgit 1.2.3-korg