diff options
author | ys9693 <ys9693@att.com> | 2020-01-19 13:50:02 +0200 |
---|---|---|
committer | Ofir Sonsino <ofir.sonsino@intl.att.com> | 2020-01-22 12:33:31 +0000 |
commit | 16a9fce0e104a38371a9e5a567ec611ae3fc7f33 (patch) | |
tree | 03a2aff3060ddb5bc26a90115805a04becbaffc9 /catalog-ui/src/app/ng2/pages/connection-wizard/to-node-step | |
parent | aa83a2da4f911c3ac89318b8e9e8403b072942e1 (diff) |
Catalog alignment
Issue-ID: SDC-2724
Signed-off-by: ys9693 <ys9693@att.com>
Change-Id: I52b4aacb58cbd432ca0e1ff7ff1f7dd52099c6fe
Diffstat (limited to 'catalog-ui/src/app/ng2/pages/connection-wizard/to-node-step')
-rw-r--r-- | catalog-ui/src/app/ng2/pages/connection-wizard/to-node-step/to-node-step.component.html | 25 | ||||
-rw-r--r-- | catalog-ui/src/app/ng2/pages/connection-wizard/to-node-step/to-node-step.component.ts | 65 |
2 files changed, 0 insertions, 90 deletions
diff --git a/catalog-ui/src/app/ng2/pages/connection-wizard/to-node-step/to-node-step.component.html b/catalog-ui/src/app/ng2/pages/connection-wizard/to-node-step/to-node-step.component.html deleted file mode 100644 index 775a1a7fc2..0000000000 --- a/catalog-ui/src/app/ng2/pages/connection-wizard/to-node-step/to-node-step.component.html +++ /dev/null @@ -1,25 +0,0 @@ -<!-- - ~ Copyright (C) 2018 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. - --> - - -<select-requirement-or-capability [optionalRequirementsMap]="optionalRequirementsMap" - [optionalCapabilitiesMap]="optionalCapabilitiesMap" - [selectedReqOrCapModel]="connectWizardService.selectedMatch.isFromTo ? connectWizardService.selectedMatch.capability : connectWizardService.selectedMatch.requirement" - [selectedReqOrCapOption]="displayRequirementsOrCapabilities" - [currentComponent]="connectWizardService.currentComponent" - [componentInstanceId]="connectWizardService.connectRelationModel.toNode.componentInstance.uniqueId" - (updateSelectedReqOrCap)="updateSelectedReqOrCap($event)"> -</select-requirement-or-capability>
\ No newline at end of file diff --git a/catalog-ui/src/app/ng2/pages/connection-wizard/to-node-step/to-node-step.component.ts b/catalog-ui/src/app/ng2/pages/connection-wizard/to-node-step/to-node-step.component.ts deleted file mode 100644 index ea3b129c7b..0000000000 --- a/catalog-ui/src/app/ng2/pages/connection-wizard/to-node-step/to-node-step.component.ts +++ /dev/null @@ -1,65 +0,0 @@ -import {Component, forwardRef, Inject} from '@angular/core'; -import {IStepComponent} from "app/models" -import {Dictionary} from "lodash"; -import {ConnectionWizardService} from "../connection-wizard.service"; -import {Match} from "../../../../models/graph/match-relation"; -import {Requirement} from "../../../../models/requirement"; -import {Capability} from "../../../../models/capability"; -import {PropertyModel} from "../../../../models/properties"; - -@Component({ - selector: 'to-node-step', - templateUrl: './to-node-step.component.html' -}) - -export class ToNodeStepComponent implements IStepComponent{ - - displayRequirementsOrCapabilities:string; //get 'Requirement' or 'Capability' - optionalRequirementsMap: Dictionary<Requirement[]> = {}; - optionalCapabilitiesMap: Dictionary<Capability[]> ={}; - - constructor(@Inject(forwardRef(() => ConnectionWizardService)) public connectWizardService: ConnectionWizardService) { - } - - ngOnInit(){ - if(this.connectWizardService.selectedMatch.isFromTo){ - this.displayRequirementsOrCapabilities = 'Capability'; - this.optionalRequirementsMap = {}; - this.optionalCapabilitiesMap = this.connectWizardService.getOptionalCapabilitiesByInstanceUniqueId(true, this.connectWizardService.selectedMatch.requirement); - }else{ - this.displayRequirementsOrCapabilities = 'Requirement'; - this.optionalRequirementsMap = this.connectWizardService.getOptionalRequirementsByInstanceUniqueId(false, this.connectWizardService.selectedMatch.capability); - this.optionalCapabilitiesMap = {} - } - - - } - - preventNext = ():boolean => { - return !this.connectWizardService.selectedMatch.capability || !this.connectWizardService.selectedMatch.requirement; - } - - preventBack = ():boolean => { - return false; - } - - private updateSelectedReqOrCap = (selected:Requirement|Capability):void => { - if (!selected) { - if (this.connectWizardService.selectedMatch.isFromTo) { - this.connectWizardService.selectedMatch.capability = undefined; - this.connectWizardService.selectedMatch.toNode = undefined; - } else { - this.connectWizardService.selectedMatch.requirement = undefined; - this.connectWizardService.selectedMatch.fromNode = undefined; - } - } else if (selected instanceof Requirement) { - this.connectWizardService.selectedMatch.requirement = <Requirement>selected; - this.connectWizardService.selectedMatch.fromNode = this.connectWizardService.connectRelationModel.toNode.componentInstance.uniqueId; - } else { - this.connectWizardService.selectedMatch.capability = <Capability>selected; - this.connectWizardService.selectedMatch.toNode = this.connectWizardService.connectRelationModel.toNode.componentInstance.uniqueId; - } - this.connectWizardService.selectedMatch.relationship = undefined; - } - -} |