diff --git a/org.eclipse.winery.frontends/app/topologymodeler/src/app/canvas/entities-modal/entities-modal.component.ts b/org.eclipse.winery.frontends/app/topologymodeler/src/app/canvas/entities-modal/entities-modal.component.ts index d1fc73796d..ec3598990f 100644 --- a/org.eclipse.winery.frontends/app/topologymodeler/src/app/canvas/entities-modal/entities-modal.component.ts +++ b/org.eclipse.winery.frontends/app/topologymodeler/src/app/canvas/entities-modal/entities-modal.component.ts @@ -434,7 +434,7 @@ export class EntitiesModalComponent implements OnInit, OnChanges, OnDestroy { nodeId: this.currentNodeData.id, newPolicy: policyToBeSavedToRedux }; - if (this.deploymentArtifactOrPolicyModalData.nodeTemplateId.startsWith('con')) { + if (this.deploymentArtifactOrPolicyModalData.nodeTemplateId.includes('con_')) { this.ngRedux.dispatch(this.actions.setPolicyForRelationship(actionObject)); } else { this.ngRedux.dispatch(this.actions.setPolicy(actionObject)); diff --git a/org.eclipse.winery.frontends/app/topologymodeler/src/app/enricher/enricher.component.html b/org.eclipse.winery.frontends/app/topologymodeler/src/app/enricher/enricher.component.html index c9e0b3ac71..879603077a 100644 --- a/org.eclipse.winery.frontends/app/topologymodeler/src/app/enricher/enricher.component.html +++ b/org.eclipse.winery.frontends/app/topologymodeler/src/app/enricher/enricher.component.html @@ -15,6 +15,8 @@
Management Feature Enrichment + + , private actions: TopologyRendererActions, @@ -88,6 +89,7 @@ export class EnricherComponent { * It starts the Enricher Service to apply the selected enrichments. */ protected applyEnrichment() { + this.loading = true; this.enricherService.applySelectedFeatures(this.toApply).subscribe( data => this.enrichmentApplied(data), error => this.handleError(error) @@ -128,11 +130,12 @@ export class EnricherComponent { private checkButtonsState(currentButtonsState: TopologyRendererState) { // check if Enrichment Button is clicked and available features are pulled if (currentButtonsState.buttonsState.enrichmentButton && !this.availableFeatures) { + this.loading = true; this.enricherService.getAvailableFeatures().subscribe( data => this.showAvailableFeatures(data), error => this.handleError(error) ); - // if button is unclicked, reset available features + // if button is clicked again, reset available features } else if (!currentButtonsState.buttonsState.enrichmentButton) { this.availableFeatures = null; } @@ -193,6 +196,7 @@ export class EnricherComponent { * @param data: json response of backend containing available features for all node templates */ private showAvailableFeatures(data: Enrichment): void { + this.loading = false; // check if array contains data at all (data != null does not work, as data is not null but an empty array) if (data.length > 0) { this.availableFeatures = data; @@ -203,11 +207,12 @@ export class EnricherComponent { /** * This method is called when an error occurs durring fetching or pushing the enrichments. - * It alerts the merror message in the UI. + * It alerts the error message in the UI. * @param error: error message */ private handleError(error: HttpErrorResponse) { this.alert.error(error.message); + this.loading = false; } /** @@ -216,6 +221,7 @@ export class EnricherComponent { * @param data: topology template that was updated */ private enrichmentApplied(data: TTopologyTemplate) { + this.loading = false; TopologyTemplateUtil.updateTopologyTemplate(this.ngRedux, this.wineryActions, data, this.entityTypes, this.configurationService.isYaml()); // reset available features since they are no longer valid this.availableFeatures = null; diff --git a/org.eclipse.winery.frontends/app/topologymodeler/src/app/models/instanceModeling.ts b/org.eclipse.winery.frontends/app/topologymodeler/src/app/models/instanceModeling.ts new file mode 100644 index 0000000000..929b146e64 --- /dev/null +++ b/org.eclipse.winery.frontends/app/topologymodeler/src/app/models/instanceModeling.ts @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright (c) 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0, or the Apache Software License 2.0 + * which is available at https://www.apache.org/licenses/LICENSE-2.0. + * + * SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 + *******************************************************************************/ + +export interface InstancePlugin { + id: string; + discoveredIds: string[]; +} + +export interface InstanceDeploymentTechnology extends InstancePlugin { + technologyId: string; + managedIds: string[]; + properties: any; +} diff --git a/org.eclipse.winery.frontends/app/topologymodeler/src/app/models/topologyTemplateUtil.ts b/org.eclipse.winery.frontends/app/topologymodeler/src/app/models/topologyTemplateUtil.ts index 5fca69165e..437bc049db 100644 --- a/org.eclipse.winery.frontends/app/topologymodeler/src/app/models/topologyTemplateUtil.ts +++ b/org.eclipse.winery.frontends/app/topologymodeler/src/app/models/topologyTemplateUtil.ts @@ -26,7 +26,6 @@ import { InheritanceUtils } from './InheritanceUtils'; import { QName } from '../../../../shared/src/app/model/qName'; import { TPolicy } from './policiesModalData'; import * as _ from 'lodash'; -import { TNode } from '@angular/core/src/render3/interfaces/node'; export abstract class TopologyTemplateUtil { @@ -119,7 +118,7 @@ export abstract class TopologyTemplateUtil { } // look for missing capabilities and add them const capDefs: CapabilityDefinitionModel[] = InheritanceUtils.getEffectiveCapabilityDefinitionsOfNodeType(node.type, types); - if (!node.capabilities ) { + if (!node.capabilities) { node.capabilities = []; } capDefs.forEach((def) => { @@ -169,8 +168,8 @@ export abstract class TopologyTemplateUtil { otherAttributes, node.x, node.y, - node.capabilities ? node.capabilities : [] , - node.requirements ? node.requirements : [], + node.capabilities ? node.capabilities : [], + node.requirements ? node.requirements : [], node.deploymentArtifacts ? node.deploymentArtifacts : [], node.policies ? node.policies : [], node.artifacts ? node.artifacts : [], @@ -320,8 +319,8 @@ export abstract class TopologyTemplateUtil { return true; } - return typeof o1 === 'object' && Object.keys(o1).length > 0 - ? Object.keys(o1).length === Object.keys(o2).length + return typeof o1 === 'object' && typeof o2 === 'object' + && Object.keys(o1).length > 0 ? Object.keys(o1).length === Object.keys(o2).length && Object.keys(o1).every((p) => { return this.objectsEquals(o1[p], o2[p]); }) @@ -368,10 +367,10 @@ export abstract class TopologyTemplateUtil { static findLastSavedRelationshipTemplate(lastSavedTopology: TTopologyTemplate, currentRelationshipTemplate: TRelationshipTemplate): TRelationshipTemplate { return lastSavedTopology.relationshipTemplates.find((relationshipTemplate) => { - return relationshipTemplate.sourceElement.ref === currentRelationshipTemplate.sourceElement.ref && - relationshipTemplate.targetElement.ref === currentRelationshipTemplate.targetElement.ref && - relationshipTemplate.type === currentRelationshipTemplate.type; - } + return relationshipTemplate.sourceElement.ref === currentRelationshipTemplate.sourceElement.ref && + relationshipTemplate.targetElement.ref === currentRelationshipTemplate.targetElement.ref && + relationshipTemplate.type === currentRelationshipTemplate.type; + } ); } diff --git a/org.eclipse.winery.frontends/app/topologymodeler/src/app/node/node.component.css b/org.eclipse.winery.frontends/app/topologymodeler/src/app/node/node.component.css index e2fb347d19..934a23ec98 100644 --- a/org.eclipse.winery.frontends/app/topologymodeler/src/app/node/node.component.css +++ b/org.eclipse.winery.frontends/app/topologymodeler/src/app/node/node.component.css @@ -210,6 +210,13 @@ button.btn.btn-sm.btn-outline-secondary:hover, button.btn.btn-sm.btn-outline-sec max-height: 30px; } +.deploymentTech { + position: absolute; + top: 3px; + float: right; + left: 185px; +} + .newVersionTriangle { position: absolute; right: -4px; @@ -258,7 +265,3 @@ div.overlay .overlay-icon { top: 0; transform: translate(50%, -50%); } - -div.pattern > bs-tooltip-container { - z-index: 50; -} diff --git a/org.eclipse.winery.frontends/app/topologymodeler/src/app/node/node.component.html b/org.eclipse.winery.frontends/app/topologymodeler/src/app/node/node.component.html index 66b337b1b8..a02e684217 100644 --- a/org.eclipse.winery.frontends/app/topologymodeler/src/app/node/node.component.html +++ b/org.eclipse.winery.frontends/app/topologymodeler/src/app/node/node.component.html @@ -36,6 +36,24 @@ Policy icon
+ + + + +
+ Kubernetes + Puppet + Terraform +
-
+

@@ -60,3 +60,30 @@
{{refinementType === 'patternDetection' ? 'Detection' : 'Refinement'}} succe
+ + + + + +
+

+ The PRM {{ confirmCandidate.refinementModel.name }} shows the following warnings: +

+
    +
  • + Warnings for Node Template {{ nodeId }} +
      +
    • + {{ warning }} +
    • +
    +
  • +
+
+
+ + +
diff --git a/org.eclipse.winery.frontends/app/topologymodeler/src/app/sidebars/refinement/refinementSidebar.component.ts b/org.eclipse.winery.frontends/app/topologymodeler/src/app/sidebars/refinement/refinementSidebar.component.ts index 4786ad0bc9..7dec2ad410 100644 --- a/org.eclipse.winery.frontends/app/topologymodeler/src/app/sidebars/refinement/refinementSidebar.component.ts +++ b/org.eclipse.winery.frontends/app/topologymodeler/src/app/sidebars/refinement/refinementSidebar.component.ts @@ -11,7 +11,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 *******************************************************************************/ -import { Component, Input, OnDestroy } from '@angular/core'; +import { Component, Input, OnDestroy, ViewChild } from '@angular/core'; import { PatternRefinementModel, RefinementElement, RefinementWebSocketService } from './refinementWebSocket.service'; import { BackendService } from '../../services/backend.service'; import { NgRedux } from '@angular-redux/store'; @@ -21,6 +21,7 @@ import { WineryActions } from '../../redux/actions/winery.actions'; import { TopologyTemplateUtil } from '../../models/topologyTemplateUtil'; import { WineryRepositoryConfigurationService } from '../../../../../tosca-management/src/app/wineryFeatureToggleModule/WineryRepositoryConfiguration.service'; import { EntityTypesModel } from '../../models/entityTypesModel'; +import { ModalDirective } from 'ngx-bootstrap'; @Component({ selector: 'winery-refinement', @@ -34,6 +35,8 @@ import { EntityTypesModel } from '../../models/entityTypesModel'; }) export class RefinementSidebarComponent implements OnDestroy { + public object = Object; + @Input() refinementType: string; refinementIsRunning: boolean; @@ -41,6 +44,10 @@ export class RefinementSidebarComponent implements OnDestroy { refinementIsDone: boolean; prmCandidates: PatternRefinementModel[]; + @ViewChild('confirmRefineModal') confirmRefineModal: ModalDirective; + confirmCandidate: PatternRefinementModel; + + private entityTypes: EntityTypesModel; constructor(private ngRedux: NgRedux, @@ -68,6 +75,15 @@ export class RefinementSidebarComponent implements OnDestroy { prmChosen(event: MouseEvent, candidate: PatternRefinementModel) { event.stopPropagation(); + if (candidate.warnings && Object.keys(candidate.warnings).length > 0) { + this.confirmRefineModal.show(); + this.confirmCandidate = candidate; + } else { + this.candidateConfirmed(candidate); + } + } + + candidateConfirmed(candidate: PatternRefinementModel) { this.webSocketService.refineWith(candidate); this.refinementIsLoading = true; } diff --git a/org.eclipse.winery.frontends/app/topologymodeler/src/app/sidebars/refinement/refinementWebSocket.service.ts b/org.eclipse.winery.frontends/app/topologymodeler/src/app/sidebars/refinement/refinementWebSocket.service.ts index 03bd0b5c63..2243f7b24e 100644 --- a/org.eclipse.winery.frontends/app/topologymodeler/src/app/sidebars/refinement/refinementWebSocket.service.ts +++ b/org.eclipse.winery.frontends/app/topologymodeler/src/app/sidebars/refinement/refinementWebSocket.service.ts @@ -14,9 +14,7 @@ import { Injectable } from '@angular/core'; import { BackendService } from '../../services/backend.service'; import { TTopologyTemplate } from '../../models/ttopology-template'; -import { - AbstractRefinementWebSocketService, RefinementTasks, RefinementWebSocketData -} from './abstractRefinementWebSocket.service'; +import { AbstractRefinementWebSocketService, RefinementTasks, RefinementWebSocketData } from './abstractRefinementWebSocket.service'; export interface RefinementElement { refinementCandidates: PatternRefinementModel[]; @@ -38,6 +36,10 @@ export interface PatternRefinementModel { name: string; targetNamespace: string; }; + + warnings: { + [key: string]: string[] + }; } @Injectable() diff --git a/org.eclipse.winery.frontends/app/topologymodeler/src/app/winery.module.ts b/org.eclipse.winery.frontends/app/topologymodeler/src/app/winery.module.ts index ba41cc6060..f4d6cf741b 100644 --- a/org.eclipse.winery.frontends/app/topologymodeler/src/app/winery.module.ts +++ b/org.eclipse.winery.frontends/app/topologymodeler/src/app/winery.module.ts @@ -50,7 +50,7 @@ import { PlaceComponentsService } from './services/placement.service'; import { MultiParticipantsComponent } from './multi-participants/multi-participants.component'; import { LiveModelingService } from './services/live-modeling.service'; import { ContainerService } from './services/container.service'; -import { ModalModule, TooltipModule } from 'ngx-bootstrap'; +import { CollapseModule, ModalModule, TooltipModule } from 'ngx-bootstrap'; import { ReqCapRelationshipService } from './services/req-cap-relationship.service'; import { WineryTableModule } from '../../../tosca-management/src/app/wineryTableModule/wineryTable.module'; import { LiveModelingActions } from './redux/actions/live-modeling.actions'; @@ -67,7 +67,6 @@ import { GroupViewComponent } from './group-view/group-view.component'; import { TagService } from '../../../tosca-management/src/app/instance/sharedComponents/tag/tag.service'; import { WineryDynamicTableModule } from '../../../tosca-management/src/app/wineryDynamicTable/wineryDynamicTable.module'; import { WineryDuplicateValidatorModule } from '../../../tosca-management/src/app/wineryValidators/wineryDuplicateValidator.module'; -import { CollapseModule } from 'ngx-bootstrap'; import { GroupViewPoliciesComponent } from './group-view/policies/policies.component'; import { VersionSliderComponent } from './version-slider/version-slider.component'; import { NgxSliderModule } from '@angular-slider/ngx-slider'; @@ -89,6 +88,7 @@ import { PlaceholderSubstitutionWebSocketService } from './sidebars/placeholderS import { CdkAccordionModule } from '@angular/cdk/accordion'; import { MatListModule } from '@angular/material'; import { SplitMatchTopologyComponent } from './sidebars/splitting-matching/split-match-topology.component'; +import { WineryLoaderModule } from '../../../tosca-management/src/app/wineryLoader/wineryLoader.module'; @NgModule({ declarations: [ @@ -151,7 +151,8 @@ import { SplitMatchTopologyComponent } from './sidebars/splitting-matching/split LiveModelingSidebarModule, NavbarModule, CdkAccordionModule, - MatListModule + MatListModule, + WineryLoaderModule ], providers: [ // { provide: ToastOptions, useClass: WineryCustomOption }, diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/header/header.component.html b/org.eclipse.winery.frontends/app/tosca-management/src/app/header/header.component.html index 4794a59336..fc0ede198e 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/header/header.component.html +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/header/header.component.html @@ -38,13 +38,20 @@
Relationship Types
+ +
+
{{ selectedOtherComponent | toscaTypeToReadableName:'true' }}
+
+
+ [class.selected]="otherActive">
- Other Elements{{ !selectedOtherComponent ? '' : ': ' + selectedOtherComponent }} + Other Elements
diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/header/header.component.ts b/org.eclipse.winery.frontends/app/tosca-management/src/app/header/header.component.ts index c86122325f..d6cffe8f33 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/header/header.component.ts +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/header/header.component.ts @@ -11,11 +11,11 @@ * * SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 *******************************************************************************/ -import {Component, OnInit, ViewChild} from '@angular/core'; -import {NavigationEnd, Router} from '@angular/router'; -import {ModalDirective} from 'ngx-bootstrap'; -import {ToscaTypes} from '../model/enums'; -import {Utils} from '../wineryUtils/utils'; +import { Component, OnInit, ViewChild } from '@angular/core'; +import { NavigationEnd, Router } from '@angular/router'; +import { ModalDirective } from 'ngx-bootstrap'; +import { ToscaTypes } from '../model/enums'; +import { Utils } from '../wineryUtils/utils'; @Component({ selector: 'winery-header', @@ -32,27 +32,31 @@ export class HeaderComponent implements OnInit { } ngOnInit(): void { + this.identifySelectedType(this.router.url); this.router.events.subscribe(data => { if (!(data instanceof NavigationEnd)) { return; } + this.identifySelectedType(data.url); + }); + } - let others: string = data.url.slice(1); + private identifySelectedType(url: string): void { + let others: string = url.slice(1); - if (others.includes('/')) { - others = others.split('/')[0]; - } - if (others.length > 0 && - !(others.includes(ToscaTypes.ServiceTemplate) || others.includes(ToscaTypes.NodeType) || - others.includes(ToscaTypes.RelationshipType) || others.includes('other') || - others.includes('admin')) - ) { - this.otherActive = true; - this.selectedOtherComponent = Utils.getToscaTypeNameFromToscaType(Utils.getToscaTypeFromString(others), true); - } else { - this.otherActive = others.includes('other'); - this.selectedOtherComponent = ''; - } - }); + if (others.includes('/')) { + others = others.split('/')[0]; + } + if (others.length > 0 && + !(others.includes(ToscaTypes.ServiceTemplate) || others.includes(ToscaTypes.NodeType) || + others.includes(ToscaTypes.RelationshipType) || others.includes('other') || + others.includes('admin')) + ) { + this.otherActive = false; + this.selectedOtherComponent = Utils.getToscaTypeFromString(others); + } else { + this.otherActive = others.includes('other'); + this.selectedOtherComponent = ''; + } } } diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/header/header.style.css b/org.eclipse.winery.frontends/app/tosca-management/src/app/header/header.style.css index a72f90a31b..cfbf6c19e4 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/header/header.style.css +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/header/header.style.css @@ -37,7 +37,7 @@ a.styledTabMenuButton > div { } a.styledTabMenuButton > div.left { - width: 19px; + width: 15px; } a.styledTabMenuButton > div.center { @@ -51,5 +51,5 @@ a.styledTabMenuButton > div.center { } a.styledTabMenuButton > div.right { - width: 29px; + width: 22px; } diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/header/wineryOauth/wineryOAuth.component.html b/org.eclipse.winery.frontends/app/tosca-management/src/app/header/wineryOauth/wineryOAuth.component.html index 80cad9b0d7..ff2994e01b 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/header/wineryOauth/wineryOAuth.component.html +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/header/wineryOauth/wineryOAuth.component.html @@ -11,4 +11,4 @@ ~ ~ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--> - + diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/admin/configuration/configuration.component.html b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/admin/configuration/configuration.component.html index 44f8de5ae9..342e470d93 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/admin/configuration/configuration.component.html +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/admin/configuration/configuration.component.html @@ -105,6 +105,10 @@

Configure the visibility of the following features:

[checked]="config.features.placement">
+ + +
diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/admin/edmmMappings/edmmMappings.component.html b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/admin/edmmMappings/edmmMappings.component.html index adbbda0f9f..aded3b7b45 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/admin/edmmMappings/edmmMappings.component.html +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/admin/edmmMappings/edmmMappings.component.html @@ -57,6 +57,7 @@ diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/admin/edmmTypes/edmmTypes.component.html b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/admin/edmmTypes/edmmTypes.component.html index a76a231745..4f93a264f7 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/admin/edmmTypes/edmmTypes.component.html +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/admin/edmmTypes/edmmTypes.component.html @@ -51,6 +51,7 @@ diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/admin/repository/repository.component.html b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/admin/repository/repository.component.html index fdb6c312fd..fd8b91d635 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/admin/repository/repository.component.html +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/admin/repository/repository.component.html @@ -34,6 +34,7 @@

Manage Git Repositories

diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/instance.component.ts b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/instance.component.ts index 445a305a22..dac5f911d6 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/instance.component.ts +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/instance.component.ts @@ -27,6 +27,7 @@ import { HttpErrorResponse } from '@angular/common/http'; import { SubMenuItem } from '../model/subMenuItem'; import { QName } from '../../../../shared/src/app/model/qName'; import { backendBaseURL } from '../configuration'; +import { WineryRepositoryConfigurationService } from '../wineryFeatureToggleModule/WineryRepositoryConfiguration.service'; @Component({ templateUrl: 'instance.component.html', @@ -57,6 +58,7 @@ export class InstanceComponent implements OnDestroy { private router: Router, private service: InstanceService, private notify: WineryNotificationService, + private config: WineryRepositoryConfigurationService, private existService: ExistService) { this.routeSub = this.route .data @@ -84,7 +86,7 @@ export class InstanceComponent implements OnDestroy { compData => this.handleComponentData(compData) ); this.getVersionInfo(); - if (this.toscaComponent.toscaType === ToscaTypes.ServiceTemplate) { + if (this.toscaComponent.toscaType === ToscaTypes.ServiceTemplate && this.config.configuration.features.edmmModeling) { this.getToscaLightCompatibility(); } } else { diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/instance.module.ts b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/instance.module.ts index c242691f51..dcf5f4e634 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/instance.module.ts +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/instance.module.ts @@ -28,6 +28,7 @@ import { AttributesModule } from './sharedComponents/attributes/attributes.modul import { InterfaceDefinitionsModule } from './sharedComponents/interfaceDefinitions/interfaceDefinitions.module'; import { ParametersModule } from './sharedComponents/parameters/parameters.module'; import { MatDialogModule, MatProgressBarModule } from '@angular/material'; +import { DetectionComponent } from './refinementModels/detection/detection.component'; @NgModule({ imports: [ @@ -53,6 +54,7 @@ import { MatDialogModule, MatProgressBarModule } from '@angular/material'; InstanceComponent, InstanceHeaderComponent, PropertyRenameComponent, + DetectionComponent ], providers: [], }) diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/instance.service.ts b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/instance.service.ts index 4a86aeec88..a7e6b77ed0 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/instance.service.ts +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/instance.service.ts @@ -19,9 +19,7 @@ import { ToscaComponent } from '../model/toscaComponent'; import { ToscaTypes } from '../model/enums'; import { WineryVersion } from '../model/wineryVersion'; import { HttpClient, HttpResponse } from '@angular/common/http'; -import { - WineryRepositoryConfigurationService -} from '../wineryFeatureToggleModule/WineryRepositoryConfiguration.service'; +import { WineryRepositoryConfigurationService } from '../wineryFeatureToggleModule/WineryRepositoryConfiguration.service'; import { SubMenuItem, SubMenuItems } from '../model/subMenuItem'; export interface ToscaLightCompatibilityData { @@ -154,7 +152,11 @@ export class InstanceService { subMenu = [SubMenuItems.readme, SubMenuItems.license, SubMenuItems.detector, SubMenuItems.refinementStructure, SubMenuItems.graficPrmModelling, SubMenuItems.relationMappings, SubMenuItems.attributeMappings, SubMenuItems.stayMappings, SubMenuItems.deploymentArtifactMappings, SubMenuItems.permutationMappings, - SubMenuItems.permutations, SubMenuItems.behaviorPatternMappings, SubMenuItems.xml]; + SubMenuItems.permutations, SubMenuItems.behaviorPatternMappings]; + if (this.toscaComponent.toscaType === ToscaTypes.PatternRefinementModel) { + subMenu.push(SubMenuItems.detectionModel); + } + subMenu.push(SubMenuItems.xml); break; case ToscaTypes.TestRefinementModel: subMenu = [SubMenuItems.readme, SubMenuItems.license, SubMenuItems.detector, SubMenuItems.testFragment, SubMenuItems.graficPrmModelling, diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/instanceHeader/instanceHeader.component.html b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/instanceHeader/instanceHeader.component.html index 42051f93c2..75037c0cfb 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/instanceHeader/instanceHeader.component.html +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/instanceHeader/instanceHeader.component.html @@ -122,7 +122,7 @@

diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/refinementModels/attributeMappings/attributeMappings.component.html b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/refinementModels/attributeMappings/attributeMappings.component.html index d71ca75a34..83403dba79 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/refinementModels/attributeMappings/attributeMappings.component.html +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/refinementModels/attributeMappings/attributeMappings.component.html @@ -82,6 +82,7 @@ diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/refinementModels/behavior-pattern-mappings/behavior-pattern-mappings.component.html b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/refinementModels/behavior-pattern-mappings/behavior-pattern-mappings.component.html index c414cd6949..419d5cf28d 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/refinementModels/behavior-pattern-mappings/behavior-pattern-mappings.component.html +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/refinementModels/behavior-pattern-mappings/behavior-pattern-mappings.component.html @@ -69,6 +69,7 @@ diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/refinementModels/detection/detection.component.html b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/refinementModels/detection/detection.component.html new file mode 100644 index 0000000000..5af222a947 --- /dev/null +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/refinementModels/detection/detection.component.html @@ -0,0 +1,30 @@ + + + +
+ +
+
+ +
+
diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/refinementModels/detection/detection.component.ts b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/refinementModels/detection/detection.component.ts new file mode 100644 index 0000000000..3a4fa50536 --- /dev/null +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/refinementModels/detection/detection.component.ts @@ -0,0 +1,61 @@ +/******************************************************************************* + * Copyright (c) 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0, or the Apache Software License 2.0 + * which is available at https://www.apache.org/licenses/LICENSE-2.0. + * + * SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 + *******************************************************************************/ +import { Component, OnInit } from '@angular/core'; +import { DetectionModel, DetectionService } from './detection.service'; +import { InstanceService } from '../../instance.service'; +import { WineryNotificationService } from '../../../wineryNotificationModule/wineryNotification.service'; + +@Component({ + templateUrl: 'detection.component.html', + providers: [ + DetectionService + ] +}) +export class DetectionComponent implements OnInit { + + detectionModel: DetectionModel = { isPdrm: false }; + loading = true; + + constructor(private service: DetectionService, + private sharedData: InstanceService, + private notify: WineryNotificationService) { + } + + ngOnInit(): void { + this.service.getDetectionModel() + .subscribe((data) => { + this.detectionModel = data; + this.loading = false; + }, + (error) => { + this.notify.error(error.message); + this.loading = false; + }); + } + + public saveDetectionModel() { + this.loading = true; + this.service.setDetectionModel(this.detectionModel) + .subscribe( + () => { + this.notify.success('Saved successfully'); + this.loading = false; + }, + (error) => { + this.notify.error(error.message); + this.loading = false; + } + ); + } +} diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/refinementModels/detection/detection.service.ts b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/refinementModels/detection/detection.service.ts new file mode 100644 index 0000000000..93f705e763 --- /dev/null +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/refinementModels/detection/detection.service.ts @@ -0,0 +1,38 @@ +/******************************************************************************* + * Copyright (c) 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0, or the Apache Software License 2.0 + * which is available at https://www.apache.org/licenses/LICENSE-2.0. + * + * SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 + *******************************************************************************/ +import { Injectable } from '@angular/core'; +import { HttpClient } from '@angular/common/http'; +import { InstanceService } from '../../instance.service'; +import { Observable } from 'rxjs'; + +export interface DetectionModel { + isPdrm: boolean; +} + +@Injectable() +export class DetectionService { + private readonly path: string; + + constructor(private http: HttpClient, private sharedData: InstanceService) { + this.path = this.sharedData.path + '/detectionmodel'; + } + + public setDetectionModel(model: DetectionModel): Observable { + return this.http.post(this.path, model); + } + + public getDetectionModel(): Observable { + return this.http.get(this.path); + } +} diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/refinementModels/refinementMappings.service.ts b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/refinementModels/refinementMappings.service.ts index 23a9992ec9..1cbfebf9e8 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/refinementModels/refinementMappings.service.ts +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/refinementModels/refinementMappings.service.ts @@ -148,11 +148,13 @@ export class RefinementMappingsService { public getNewMappingsId(mappings: RefinementMappings[], prefix: string): number { let id = 0; mappings.forEach(value => { - const number = Number(value.id.split(prefix)[1]); - if (!isNaN(number) && number >= id) { - id = number; - if (number === id) { - id++; + if (value.id) { + const number = Number(value.id.split(prefix)[1]); + if (!isNaN(number) && number >= id) { + id = number; + if (number === id) { + id++; + } } } }); diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/refinementModels/relationshipMappings/relationMappings.component.html b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/refinementModels/relationshipMappings/relationMappings.component.html index ac5fd9ee7b..693fc498ac 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/refinementModels/relationshipMappings/relationMappings.component.html +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/refinementModels/relationshipMappings/relationMappings.component.html @@ -19,6 +19,7 @@ [modalTitle]="modalTitle" [data]="relationshipMappings" (entryAdded)="save($event)" + (entryEdited)="save($event)" (entryRemoved)="remove($event)"> diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/refinementModels/relationshipMappings/relationMappings.component.ts b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/refinementModels/relationshipMappings/relationMappings.component.ts index c36f9a6aab..7420562faa 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/refinementModels/relationshipMappings/relationMappings.component.ts +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/refinementModels/relationshipMappings/relationMappings.component.ts @@ -132,8 +132,13 @@ export class RelationMappingsComponent implements OnInit { save(mapping: RelationMapping) { this.loading = true; - const id = this.service.getNewMappingsId(this.relationshipMappings, RelationMapping.idPrefix); - const newMapping = new RelationMapping(id); + let newMapping = mapping; + + if (!mapping.id) { + newMapping = new RelationMapping( + this.service.getNewMappingsId(this.relationshipMappings, RelationMapping.idPrefix) + ); + } newMapping.detectorElement = mapping.detectorElement; newMapping.refinementElement = mapping.refinementElement; newMapping.direction = mapping.direction; diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/refinementModels/stayMappings/stayMappings.component.html b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/refinementModels/stayMappings/stayMappings.component.html index a29c07c364..c52fbf357d 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/refinementModels/stayMappings/stayMappings.component.html +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/refinementModels/stayMappings/stayMappings.component.html @@ -70,6 +70,7 @@ diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/serviceTemplates/boundaryDefinitions/policies/policies.component.html b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/serviceTemplates/boundaryDefinitions/policies/policies.component.html index 6026875ddf..6872711d5c 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/serviceTemplates/boundaryDefinitions/policies/policies.component.html +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/serviceTemplates/boundaryDefinitions/policies/policies.component.html @@ -87,6 +87,7 @@

diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/serviceTemplates/boundaryDefinitions/propertyConstraints/propertyConstraints.component.html b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/serviceTemplates/boundaryDefinitions/propertyConstraints/propertyConstraints.component.html index e363672226..43763a2717 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/serviceTemplates/boundaryDefinitions/propertyConstraints/propertyConstraints.component.html +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/serviceTemplates/boundaryDefinitions/propertyConstraints/propertyConstraints.component.html @@ -93,6 +93,7 @@ diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/serviceTemplates/plans/plans.component.html b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/serviceTemplates/plans/plans.component.html index e69b5e565d..aa1ca050d4 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/serviceTemplates/plans/plans.component.html +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/serviceTemplates/plans/plans.component.html @@ -171,6 +171,7 @@ diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/artifactSource/source.component.html b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/artifactSource/source.component.html index 94e6cf5ade..a729495746 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/artifactSource/source.component.html +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/artifactSource/source.component.html @@ -95,6 +95,7 @@
Already included Files:

diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/artifacts/artifacts.component.html b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/artifacts/artifacts.component.html index b8ffb6b620..703819890c 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/artifacts/artifacts.component.html +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/artifacts/artifacts.component.html @@ -30,6 +30,7 @@

diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/filesTag/files.component.html b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/filesTag/files.component.html index 825a81d555..515eb4bba5 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/filesTag/files.component.html +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/filesTag/files.component.html @@ -55,6 +55,7 @@
Contained Files

diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/implementations/implementations.component.html b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/implementations/implementations.component.html index b6e351a381..c0abdf077f 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/implementations/implementations.component.html +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/implementations/implementations.component.html @@ -41,6 +41,7 @@ diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/instanceStates/instanceStates.component.html b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/instanceStates/instanceStates.component.html index b14649c21f..68977a47d1 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/instanceStates/instanceStates.component.html +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/instanceStates/instanceStates.component.html @@ -67,6 +67,7 @@ diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/interfaceDefinitions/dependencies/dependencies.component.html b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/interfaceDefinitions/dependencies/dependencies.component.html index b370845a90..96750b8d05 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/interfaceDefinitions/dependencies/dependencies.component.html +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/interfaceDefinitions/dependencies/dependencies.component.html @@ -45,5 +45,7 @@

Do you want to delete the dependency?

+ [okButtonClass]="'btn-danger'" + [okButtonLabel]="'Delete'"> + diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/interfaceDefinitions/interfaceDefinitions.component.html b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/interfaceDefinitions/interfaceDefinitions.component.html index 92954a38e9..3a3773d176 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/interfaceDefinitions/interfaceDefinitions.component.html +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/interfaceDefinitions/interfaceDefinitions.component.html @@ -152,6 +152,7 @@

diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/interfaces/interfaces.component.html b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/interfaces/interfaces.component.html index 8c8b9706a8..10292bf335 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/interfaces/interfaces.component.html +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/interfaces/interfaces.component.html @@ -185,6 +185,7 @@

diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/propertiesDefinition/propertiesDefinition.component.html b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/propertiesDefinition/propertiesDefinition.component.html index e7813a8b9f..2d63a306b0 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/propertiesDefinition/propertiesDefinition.component.html +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/propertiesDefinition/propertiesDefinition.component.html @@ -251,6 +251,7 @@ diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/tag/tag.component.html b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/tag/tag.component.html index 886380055d..6acaccbc26 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/tag/tag.component.html +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/tag/tag.component.html @@ -91,6 +91,7 @@ diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/wineryArtifacts/artifact.component.html b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/wineryArtifacts/artifact.component.html index 77e0f072e3..41e6ff35cd 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/wineryArtifacts/artifact.component.html +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/wineryArtifacts/artifact.component.html @@ -38,6 +38,7 @@ @@ -205,6 +206,7 @@
Contained Files

diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/wineryArtifacts/artifact.component.ts b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/wineryArtifacts/artifact.component.ts index 3122c8bee6..7ac62a3c14 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/wineryArtifacts/artifact.component.ts +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/instance/sharedComponents/wineryArtifacts/artifact.component.ts @@ -33,6 +33,7 @@ import { SectionService } from '../../../section/section.service'; import { AddComponentValidation } from '../../../wineryAddComponentModule/addComponentValidation'; import { ExistService } from '../../../wineryUtils/existService'; import { WineryAddComponentDataComponent } from '../../../wineryAddComponentDataModule/addComponentData.component'; +import { QName } from '../../../../../../shared/src/app/model/qName'; @Component({ selector: 'winery-artifact', @@ -167,14 +168,16 @@ export class WineryArtifactComponent implements OnInit { this.artifact.name = this.nodeOrRelationShipTypeName; this.artifact.toscaType = ToscaTypes.ArtifactTemplate; this.existCheck(); - this.addComponentData.createArtifactName( - this.sharedData.toscaComponent, - this.nodeOrRelationshipType, - this.selectedInterface ? this.selectedInterface.text : null, - this.selectedOperation, - this.isImplementationArtifact, - this.nodeOrRelationShipTypeName - ); + if (this.addComponentData) { + this.addComponentData.createArtifactName( + this.sharedData.toscaComponent, + this.nodeOrRelationshipType, + this.selectedInterface ? this.selectedInterface.text : null, + this.selectedOperation, + this.isImplementationArtifact, + this.nodeOrRelationShipTypeName + ); + } this.addArtifactModal.show(); } @@ -361,7 +364,7 @@ export class WineryArtifactComponent implements OnInit { this.interfaceAndOperation(); } - interfaceAndOperation() { + public interfaceAndOperation() { if (this.isImplementationArtifact) { this.addComponentData.createArtifactName(this.sharedData.toscaComponent, this.nodeOrRelationshipType, this.selectedInterface.text, this.selectedOperation, this.isImplementationArtifact, this.nodeOrRelationShipTypeName); @@ -404,7 +407,9 @@ export class WineryArtifactComponent implements OnInit { this.artifactUrl = ''; this.uploadUrl = ''; this.artifact.name = ''; - this.addComponentData.reset(); + if (this.addComponentData) { + this.addComponentData.reset(); + } this.noneSelected = true; } @@ -471,7 +476,7 @@ export class WineryArtifactComponent implements OnInit { } else { this.nodeOrRelationshipType = compData.serviceTemplateOrNodeTypeOrNodeTypeImplementation[0].relationshipType; } - this.nodeOrRelationShipTypeName = this.nodeOrRelationshipType - .substring(this.nodeOrRelationshipType.lastIndexOf('}') + 1, this.nodeOrRelationshipType.lastIndexOf('_')); + + this.nodeOrRelationShipTypeName = Utils.getNameWithoutVersion(new QName(this.nodeOrRelationshipType).localName); } } diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/model/subMenuItem.ts b/org.eclipse.winery.frontends/app/tosca-management/src/app/model/subMenuItem.ts index 2ae7183dd2..0887764d26 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/model/subMenuItem.ts +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/model/subMenuItem.ts @@ -48,7 +48,7 @@ export class SubMenuItems { static readonly deploymentArtifacts: SubMenuItem = { displayName: 'Deployment Artifacts', urlFragment: 'deploymentartifacts' }; - static readonly detector: SubMenuItem = { displayName: 'Detector', urlFragment: 'detector' }; + static readonly detector: SubMenuItem = { displayName: 'Pattern Structure', urlFragment: 'detector' }; static readonly documentation: SubMenuItem = { displayName: 'Documentation', urlFragment: 'documentation' }; static readonly edmmTypes: SubMenuItem = { displayName: 'EDMM Types', urlFragment: 'edmmtypes' }; static readonly files: SubMenuItem = { displayName: 'Files', urlFragment: 'files' }; @@ -83,7 +83,7 @@ export class SubMenuItems { }; static readonly readme: SubMenuItem = { displayName: 'README', urlFragment: 'readme' }; static readonly refinementStructure: SubMenuItem = { - displayName: 'Refinement Structure', urlFragment: 'refinementstructure' + displayName: 'Solution Structure', urlFragment: 'refinementstructure' }; static readonly relationMappings: SubMenuItem = { displayName: 'Relation Mappings', urlFragment: 'relationmappings' @@ -145,4 +145,7 @@ export class SubMenuItems { static readonly interfacedefinitions: SubMenuItem = { displayName: 'Interfaces', urlFragment: 'interfacedefinitions' }; + static readonly detectionModel: SubMenuItem = { + displayName: 'Detection Model', urlFragment: 'detectionmodel' + }; } diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/other/other.component.html b/org.eclipse.winery.frontends/app/tosca-management/src/app/other/other.component.html index cca828300a..0a1846d41f 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/other/other.component.html +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/other/other.component.html @@ -11,7 +11,7 @@ ~ ~ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--> -
+

The following items list TOSCA elements contained in TOSCA's Definitions @@ -50,8 +50,8 @@

Imports

WSDLs -
+

YAML Simple Profile

Custom YAML Datatypes
diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/section/entityContainer/entity.component.html b/org.eclipse.winery.frontends/app/tosca-management/src/app/section/entityContainer/entity.component.html index d42f523a2a..7efa83fb9c 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/section/entityContainer/entity.component.html +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/section/entityContainer/entity.component.html @@ -68,6 +68,7 @@ diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/section/entityContainer/entity.component.ts b/org.eclipse.winery.frontends/app/tosca-management/src/app/section/entityContainer/entity.component.ts index efe688aa86..abf46bfdc8 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/section/entityContainer/entity.component.ts +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/section/entityContainer/entity.component.ts @@ -77,7 +77,8 @@ export class EntityComponent implements OnInit { } this.showButtons = this.toscaType !== ToscaTypes.Imports; - this.showTargetAllocationButton = !this.configurationService.isYaml() && this.toscaType === ToscaTypes.ServiceTemplate; + this.showTargetAllocationButton = !this.configurationService.isYaml() && this.toscaType === ToscaTypes.ServiceTemplate + && this.configurationService.configuration.features.cloudAllocation; if (this.maxWidth === 380) { this.containerSizeClass = 'smallContainer'; diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/section/entityContainer/entityContainer.component.css b/org.eclipse.winery.frontends/app/tosca-management/src/app/section/entityContainer/entityContainer.component.css index ca0b6fdfe3..8c60722db4 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/section/entityContainer/entityContainer.component.css +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/section/entityContainer/entityContainer.component.css @@ -34,11 +34,11 @@ } .largeContainer { - max-width: 274px; + max-width: 318px; } .middleContainerSize { - max-width: 214px; + max-width: 258px; } .smallContainer { diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/section/entityContainer/entityContainer.component.ts b/org.eclipse.winery.frontends/app/tosca-management/src/app/section/entityContainer/entityContainer.component.ts index 53201329f3..e31444d3fa 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/section/entityContainer/entityContainer.component.ts +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/section/entityContainer/entityContainer.component.ts @@ -173,7 +173,7 @@ export class EntityContainerComponent implements OnInit { // Thus, we need to subtract 1 from all version instances. let childrenCount = this.data.versionInstances.length - 1; - // If we show the differences dialog, we add the size of the dialog. + // If we show the differences' dialog, we add the size of the dialog. let children = 0; let directChildrenShowingTheirContent = 0; let containersShowingDiff = 0; diff --git a/org.eclipse.winery.frontends/app/tosca-management/src/app/section/section.component.html b/org.eclipse.winery.frontends/app/tosca-management/src/app/section/section.component.html index 7e28d7ba36..b4020d5053 100644 --- a/org.eclipse.winery.frontends/app/tosca-management/src/app/section/section.component.html +++ b/org.eclipse.winery.frontends/app/tosca-management/src/app/section/section.component.html @@ -39,12 +39,20 @@