From 16a9fce0e104a38371a9e5a567ec611ae3fc7f33 Mon Sep 17 00:00:00 2001 From: ys9693 Date: Sun, 19 Jan 2020 13:50:02 +0200 Subject: Catalog alignment Issue-ID: SDC-2724 Signed-off-by: ys9693 Change-Id: I52b4aacb58cbd432ca0e1ff7ff1f7dd52099c6fe --- .../connection-properties-view.component.html | 20 ------- .../connection-properties-view.component.less | 4 -- .../connection-properties-view.component.ts | 10 ---- .../connection-wizard-header.component.html | 52 ----------------- .../connection-wizard-header.component.less | 53 ----------------- .../connection-wizard-header.component.ts | 37 ------------ .../connection-wizard/connection-wizard.module.ts | 43 -------------- .../connection-wizard/connection-wizard.service.ts | 55 ----------------- .../from-node-step/from-node-step.component.html | 23 -------- .../from-node-step/from-node-step.component.ts | 45 -------------- .../properties-step/properties-step.component.html | 30 ---------- .../properties-step/properties-step.component.less | 15 ----- .../properties-step/properties-step.component.ts | 68 ---------------------- .../to-node-step/to-node-step.component.html | 25 -------- .../to-node-step/to-node-step.component.ts | 65 --------------------- 15 files changed, 545 deletions(-) delete mode 100644 catalog-ui/src/app/ng2/pages/connection-wizard/connection-properties-view/connection-properties-view.component.html delete mode 100644 catalog-ui/src/app/ng2/pages/connection-wizard/connection-properties-view/connection-properties-view.component.less delete mode 100644 catalog-ui/src/app/ng2/pages/connection-wizard/connection-properties-view/connection-properties-view.component.ts delete mode 100644 catalog-ui/src/app/ng2/pages/connection-wizard/connection-wizard-header/connection-wizard-header.component.html delete mode 100644 catalog-ui/src/app/ng2/pages/connection-wizard/connection-wizard-header/connection-wizard-header.component.less delete mode 100644 catalog-ui/src/app/ng2/pages/connection-wizard/connection-wizard-header/connection-wizard-header.component.ts delete mode 100644 catalog-ui/src/app/ng2/pages/connection-wizard/connection-wizard.module.ts delete mode 100644 catalog-ui/src/app/ng2/pages/connection-wizard/connection-wizard.service.ts delete mode 100644 catalog-ui/src/app/ng2/pages/connection-wizard/from-node-step/from-node-step.component.html delete mode 100644 catalog-ui/src/app/ng2/pages/connection-wizard/from-node-step/from-node-step.component.ts delete mode 100644 catalog-ui/src/app/ng2/pages/connection-wizard/properties-step/properties-step.component.html delete mode 100644 catalog-ui/src/app/ng2/pages/connection-wizard/properties-step/properties-step.component.less delete mode 100644 catalog-ui/src/app/ng2/pages/connection-wizard/properties-step/properties-step.component.ts delete mode 100644 catalog-ui/src/app/ng2/pages/connection-wizard/to-node-step/to-node-step.component.html delete mode 100644 catalog-ui/src/app/ng2/pages/connection-wizard/to-node-step/to-node-step.component.ts (limited to 'catalog-ui/src/app/ng2/pages/connection-wizard') diff --git a/catalog-ui/src/app/ng2/pages/connection-wizard/connection-properties-view/connection-properties-view.component.html b/catalog-ui/src/app/ng2/pages/connection-wizard/connection-properties-view/connection-properties-view.component.html deleted file mode 100644 index b24e469554..0000000000 --- a/catalog-ui/src/app/ng2/pages/connection-wizard/connection-properties-view/connection-properties-view.component.html +++ /dev/null @@ -1,20 +0,0 @@ - - -
- - -
diff --git a/catalog-ui/src/app/ng2/pages/connection-wizard/connection-properties-view/connection-properties-view.component.less b/catalog-ui/src/app/ng2/pages/connection-wizard/connection-properties-view/connection-properties-view.component.less deleted file mode 100644 index 07f9aa2135..0000000000 --- a/catalog-ui/src/app/ng2/pages/connection-wizard/connection-properties-view/connection-properties-view.component.less +++ /dev/null @@ -1,4 +0,0 @@ -connection-wizard-header { - display: block; - margin-bottom: 15px; -} diff --git a/catalog-ui/src/app/ng2/pages/connection-wizard/connection-properties-view/connection-properties-view.component.ts b/catalog-ui/src/app/ng2/pages/connection-wizard/connection-properties-view/connection-properties-view.component.ts deleted file mode 100644 index 5abb879013..0000000000 --- a/catalog-ui/src/app/ng2/pages/connection-wizard/connection-properties-view/connection-properties-view.component.ts +++ /dev/null @@ -1,10 +0,0 @@ -import {Component} from "@angular/core"; - - -@Component({ - selector: 'connection-properties-view', - templateUrl: './connection-properties-view.component.html', - styleUrls:['./connection-properties-view.component.less'] -}) -export class ConnectionPropertiesViewComponent { -} diff --git a/catalog-ui/src/app/ng2/pages/connection-wizard/connection-wizard-header/connection-wizard-header.component.html b/catalog-ui/src/app/ng2/pages/connection-wizard/connection-wizard-header/connection-wizard-header.component.html deleted file mode 100644 index 7e7e82d85f..0000000000 --- a/catalog-ui/src/app/ng2/pages/connection-wizard/connection-wizard-header/connection-wizard-header.component.html +++ /dev/null @@ -1,52 +0,0 @@ - - -
-
-
-
-
- {{connectWizardService.connectRelationModel.fromNode.componentInstance.name}} -
-
- {{getSelectedReqOrCapName(true)}} -
-
-
-
-
-
-
-
- -
-
-
-
-
-
- -
-
- {{connectWizardService.connectRelationModel.toNode.componentInstance.name}} -
-
- {{getSelectedReqOrCapName(false)}} -
-
-
-
-
\ No newline at end of file diff --git a/catalog-ui/src/app/ng2/pages/connection-wizard/connection-wizard-header/connection-wizard-header.component.less b/catalog-ui/src/app/ng2/pages/connection-wizard/connection-wizard-header/connection-wizard-header.component.less deleted file mode 100644 index 72fa6e813f..0000000000 --- a/catalog-ui/src/app/ng2/pages/connection-wizard/connection-wizard-header/connection-wizard-header.component.less +++ /dev/null @@ -1,53 +0,0 @@ -@import '../../../../../assets/styles/sprite-proxy-services-icons'; -@import '../../../../../assets/styles/variables'; -.header-main-container{ - background-color: #f8f8f8; - width: 100%; - height: 100px; - display: flex; - .inner-container{ - margin: 0 auto; - display: flex; - } -} -.selected { - color: @main_color_a; -} -.node{ - display: flex; - &.from-node{ - text-align: right; - } - &.to-node{ - text-align: left; - } - &.selected{ - .icon{ - border: solid 3px @main_color_a; - padding: 4px; - border-radius: 50%; - background-color: @main_color_p; - } - } - .icon{ - margin: auto 0; - display: flex; - } - .text{ - font-family: @font-opensans-medium; - margin: auto 10px; - min-width: 450px; - .node-name{ - font-size: 11px; - } - .selected-req-or-cap{ - font-size: 14px; - } - } -} -.connection{ - width: 67px; - height: 0px; - border-bottom: dashed 2px #979797; - margin: auto 0; -} diff --git a/catalog-ui/src/app/ng2/pages/connection-wizard/connection-wizard-header/connection-wizard-header.component.ts b/catalog-ui/src/app/ng2/pages/connection-wizard/connection-wizard-header/connection-wizard-header.component.ts deleted file mode 100644 index f5bc3b7ca4..0000000000 --- a/catalog-ui/src/app/ng2/pages/connection-wizard/connection-wizard-header/connection-wizard-header.component.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Created by rc2122 on 9/27/2017. - */ -import {Component, Inject, forwardRef} from "@angular/core"; -import {ConnectionWizardService} from "../connection-wizard.service"; -import {WizardHeaderBaseComponent} from "app/ng2/components/ui/multi-steps-wizard/multi-steps-wizard-header-base.component"; - -@Component({ - selector: 'connection-wizard-header', - templateUrl: './connection-wizard-header.component.html', - styleUrls:['./connection-wizard-header.component.less'] -}) - -export class ConnectionWizardHeaderComponent extends WizardHeaderBaseComponent{ - - constructor(@Inject(forwardRef(() => ConnectionWizardService)) public connectWizardService: ConnectionWizardService) { - super(); - } - - private _getReqOrCapName(isFromNode:boolean) { - const attributeReqOrCap:string = isFromNode ? 'requirement' : 'capability'; - if (this.connectWizardService.selectedMatch[attributeReqOrCap]) { - return this.connectWizardService.selectedMatch[attributeReqOrCap].getTitle(); - } else if (this.connectWizardService.selectedMatch.relationship) { - return this.connectWizardService.selectedMatch.relationship.relation[attributeReqOrCap]; - } - return ''; - } - - private getSelectedReqOrCapName = (isFromNode:boolean):string => { - if(!this.connectWizardService.selectedMatch){ - return ''; - } - return this._getReqOrCapName(this.connectWizardService.selectedMatch.isFromTo ? isFromNode : !isFromNode); - } -} - diff --git a/catalog-ui/src/app/ng2/pages/connection-wizard/connection-wizard.module.ts b/catalog-ui/src/app/ng2/pages/connection-wizard/connection-wizard.module.ts deleted file mode 100644 index 6b4b4128c1..0000000000 --- a/catalog-ui/src/app/ng2/pages/connection-wizard/connection-wizard.module.ts +++ /dev/null @@ -1,43 +0,0 @@ -import {ToNodeStepComponent} from "./to-node-step/to-node-step.component"; -import {NgModule} from "@angular/core"; -import {FromNodeStepComponent} from "./from-node-step/from-node-step.component"; -import {PropertiesStepComponent} from "./properties-step/properties-step.component"; -import {ConnectionWizardService} from "./connection-wizard.service"; -import {SelectRequirementOrCapabilityModule} from "../../components/logic/select-requirement-or-capability/select-requirement-or-capability.module"; -import {PropertyTableModule} from "../../components/logic/properties-table/property-table.module"; -import {FormElementsModule} from "../../components/ui/form-components/form-elements.module"; -import {ConnectionWizardHeaderComponent} from "./connection-wizard-header/connection-wizard-header.component"; -import {ConnectionPropertiesViewComponent} from "./connection-properties-view/connection-properties-view.component"; -import {BrowserModule} from "@angular/platform-browser"; - -@NgModule({ - declarations: [ - FromNodeStepComponent, - ToNodeStepComponent, - PropertiesStepComponent, - ConnectionWizardHeaderComponent, - ConnectionPropertiesViewComponent - ], - imports: [ - FormElementsModule, - PropertyTableModule, - SelectRequirementOrCapabilityModule, - BrowserModule - ], - exports: [ - FromNodeStepComponent, - ToNodeStepComponent, - PropertiesStepComponent, - ConnectionWizardHeaderComponent, - ConnectionPropertiesViewComponent - ], - entryComponents: [FromNodeStepComponent, - ToNodeStepComponent, - PropertiesStepComponent, - ConnectionWizardHeaderComponent, - ConnectionPropertiesViewComponent - ], - providers: [ConnectionWizardService] -}) -export class ConnectionWizardModule { -} \ No newline at end of file diff --git a/catalog-ui/src/app/ng2/pages/connection-wizard/connection-wizard.service.ts b/catalog-ui/src/app/ng2/pages/connection-wizard/connection-wizard.service.ts deleted file mode 100644 index af8dcb4956..0000000000 --- a/catalog-ui/src/app/ng2/pages/connection-wizard/connection-wizard.service.ts +++ /dev/null @@ -1,55 +0,0 @@ -import * as _ from "lodash"; -import {ConnectRelationModel} from "../../../models/graph/connectRelationModel"; -import {Injectable} from "@angular/core"; -import { Requirement, Capability} from "app/models"; -import {Dictionary} from "lodash"; -import {Match, Component, PropertyFEModel} from "app/models"; - -@Injectable() -export class ConnectionWizardService { - - connectRelationModel:ConnectRelationModel; - currentComponent:Component; - selectedMatch:Match; - changedCapabilityProperties:PropertyFEModel[]; - - constructor() { - this.changedCapabilityProperties = []; - } - - public setRelationMenuDirectiveObj = (connectRelationModel:ConnectRelationModel) => { - this.connectRelationModel = connectRelationModel; - // this.selectedCapability = rel - } - - getOptionalRequirementsByInstanceUniqueId = (isFromTo: boolean, matchWith?:Capability): Dictionary => { - let requirements: Array = []; - _.forEach(this.connectRelationModel.possibleRelations, (match: Match) => { - if(!matchWith || match.capability.uniqueId == matchWith.uniqueId){ - if(match.isFromTo == isFromTo){ - requirements.push(match.requirement); - } - } - }); - requirements = _.uniqBy(requirements, (req:Requirement)=>{ - return req.ownerId + req.uniqueId + req.name; - }); - return _.groupBy(requirements, 'capability'); - } - - getOptionalCapabilitiesByInstanceUniqueId = (isFromTo: boolean, matchWith?:Requirement): Dictionary => { - let capabilities: Array = []; - _.forEach(this.connectRelationModel.possibleRelations, (match: Match) => { - if(!matchWith || match.requirement.uniqueId == matchWith.uniqueId){ - if(match.isFromTo == isFromTo){ - capabilities.push(match.capability); - } - } - }); - capabilities = _.uniqBy(capabilities, (cap:Capability)=>{ - return cap.ownerId + cap.uniqueId + cap.name; - }); - return _.groupBy(capabilities, 'type'); - } -} - diff --git a/catalog-ui/src/app/ng2/pages/connection-wizard/from-node-step/from-node-step.component.html b/catalog-ui/src/app/ng2/pages/connection-wizard/from-node-step/from-node-step.component.html deleted file mode 100644 index 1cb3df735c..0000000000 --- a/catalog-ui/src/app/ng2/pages/connection-wizard/from-node-step/from-node-step.component.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - \ No newline at end of file diff --git a/catalog-ui/src/app/ng2/pages/connection-wizard/from-node-step/from-node-step.component.ts b/catalog-ui/src/app/ng2/pages/connection-wizard/from-node-step/from-node-step.component.ts deleted file mode 100644 index 054d38b063..0000000000 --- a/catalog-ui/src/app/ng2/pages/connection-wizard/from-node-step/from-node-step.component.ts +++ /dev/null @@ -1,45 +0,0 @@ -import {Component, OnInit, Inject, forwardRef} from "@angular/core"; -import {IStepComponent} from "../../../../models/wizard-step"; -import {Dictionary} from "lodash"; -import { Match} from "app/models"; -import {ConnectionWizardService} from "../connection-wizard.service"; -import {Requirement} from "../../../../models/requirement"; -import {Capability} from "../../../../models/capability"; -import {PropertyModel} from "../../../../models/properties"; - -@Component({ - selector: 'from-node-step', - templateUrl: './from-node-step.component.html' -}) - -export class FromNodeStepComponent implements IStepComponent, OnInit{ - - constructor(@Inject(forwardRef(() => ConnectionWizardService)) public connectWizardService: ConnectionWizardService) {} - - optionalRequirementsMap: Dictionary; - optionalCapabilitiesMap: Dictionary; - - ngOnInit(){ - this.optionalRequirementsMap = this.connectWizardService.getOptionalRequirementsByInstanceUniqueId(true); - this.optionalCapabilitiesMap = this.connectWizardService.getOptionalCapabilitiesByInstanceUniqueId(false); - } - - preventNext = ():boolean => { - return !this.connectWizardService.selectedMatch || (!this.connectWizardService.selectedMatch.capability && !this.connectWizardService.selectedMatch.requirement); - } - - preventBack = ():boolean => { - return true; - } - - private updateSelectedReqOrCap = (selected:Requirement|Capability):void => { - if(!selected){ - this.connectWizardService.selectedMatch = null; - } else if(selected instanceof Requirement){ - this.connectWizardService.selectedMatch = new Match(selected, null, true, this.connectWizardService.connectRelationModel.fromNode.componentInstance.uniqueId, null); - } else{ - this.connectWizardService.selectedMatch = new Match(null,selected , false, null, this.connectWizardService.connectRelationModel.fromNode.componentInstance.uniqueId); - } - } - -} diff --git a/catalog-ui/src/app/ng2/pages/connection-wizard/properties-step/properties-step.component.html b/catalog-ui/src/app/ng2/pages/connection-wizard/properties-step/properties-step.component.html deleted file mode 100644 index 293ebf9822..0000000000 --- a/catalog-ui/src/app/ng2/pages/connection-wizard/properties-step/properties-step.component.html +++ /dev/null @@ -1,30 +0,0 @@ - - - -
- - {{(connectWizardService.selectedMatch.capability && connectWizardService.selectedMatch.capability.getTitle()) || connectWizardService.selectedMatch.relationship.relation.capability}} - -
-
- - -
\ No newline at end of file diff --git a/catalog-ui/src/app/ng2/pages/connection-wizard/properties-step/properties-step.component.less b/catalog-ui/src/app/ng2/pages/connection-wizard/properties-step/properties-step.component.less deleted file mode 100644 index 8e9e07c0d5..0000000000 --- a/catalog-ui/src/app/ng2/pages/connection-wizard/properties-step/properties-step.component.less +++ /dev/null @@ -1,15 +0,0 @@ -@import '../../../../../assets/styles/variables'; -.title{ - margin-bottom: 20px; - .capability-name-label{ - font-size: 13px; - } - .capability-name{ - font-family: @font-opensans-medium; - color: @main_color_a; - } -} -.properties-table-container{ - height: 362px; - overflow-y: auto; -} \ No newline at end of file diff --git a/catalog-ui/src/app/ng2/pages/connection-wizard/properties-step/properties-step.component.ts b/catalog-ui/src/app/ng2/pages/connection-wizard/properties-step/properties-step.component.ts deleted file mode 100644 index 946d1858dc..0000000000 --- a/catalog-ui/src/app/ng2/pages/connection-wizard/properties-step/properties-step.component.ts +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Created by ob0695 on 9/4/2017. - */ -/** - * Created by rc2122 on 9/4/2017. - */ -import {Component, Inject, forwardRef} from '@angular/core'; -import {IStepComponent} from "app/models" -import {ConnectionWizardService} from "../connection-wizard.service"; -import {PropertyFEModel} from "../../../../models/properties-inputs/property-fe-model"; -import {InstanceFePropertiesMap} from "../../../../models/properties-inputs/property-fe-map"; -import {PropertiesUtils} from "../../properties-assignment/services/properties.utils"; -import {ComponentInstanceServiceNg2} from "../../../services/component-instance-services/component-instance.service"; - -@Component({ - selector: 'properties-step', - templateUrl: './properties-step.component.html', - styleUrls: ['./properties-step.component.less'] -}) - -export class PropertiesStepComponent implements IStepComponent{ - - capabilityPropertiesMap: InstanceFePropertiesMap; - savingProperty:boolean = false; - - constructor(@Inject(forwardRef(() => ConnectionWizardService)) public connectWizardService: ConnectionWizardService, private componentInstanceServiceNg2:ComponentInstanceServiceNg2, private propertiesUtils:PropertiesUtils) { - - this.capabilityPropertiesMap = this.propertiesUtils.convertPropertiesMapToFEAndCreateChildren({'capability' : connectWizardService.selectedMatch.capability.properties}, false); - } - - ngOnInit() { - this.connectWizardService.changedCapabilityProperties = []; - } - - onPropertySelectedUpdate = ($event) => { - console.log("==>" + 'PROPERTY VALUE SELECTED'); - // this.selectedFlatProperty = $event; - // let parentProperty:PropertyFEModel = this.propertiesService.getParentPropertyFEModelFromPath(this.instanceFePropertiesMap[this.selectedFlatProperty.instanceName], this.selectedFlatProperty.path); - // parentProperty.expandedChildPropertyId = this.selectedFlatProperty.path; - }; - - propertyValueChanged = (property: PropertyFEModel) => { - if (!property.isDeclared) { - const propChangedIdx = this.connectWizardService.changedCapabilityProperties.indexOf(property); - if (property.hasValueObjChanged()) { - // if (this.componentInstanceServiceNg2.hasPropertyChanged(property)) { - console.log("==>" + this.constructor.name + ": propertyValueChanged " + property); - if (propChangedIdx === -1) { - this.connectWizardService.changedCapabilityProperties.push(property); - } - } - else { - if (propChangedIdx !== -1) { - console.log("==>" + this.constructor.name + ": propertyValueChanged (reset to original) " + property); - this.connectWizardService.changedCapabilityProperties.splice(propChangedIdx, 1); - } - } - } - }; - - preventNext = ():boolean => { - return false; - } - - preventBack = ():boolean => { - return this.savingProperty; - } -} 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 @@ - - - - - \ 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 = {}; - optionalCapabilitiesMap: Dictionary ={}; - - 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 = selected; - this.connectWizardService.selectedMatch.fromNode = this.connectWizardService.connectRelationModel.toNode.componentInstance.uniqueId; - } else { - this.connectWizardService.selectedMatch.capability = selected; - this.connectWizardService.selectedMatch.toNode = this.connectWizardService.connectRelationModel.toNode.componentInstance.uniqueId; - } - this.connectWizardService.selectedMatch.relationship = undefined; - } - -} -- cgit 1.2.3-korg