-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add policies * add deployment policy * add deploymentStrategy to task * fix props for deployment policy * remove paths * checkbox, change icon * add palette * change base shape * change onDemand of task * add constants * move policies to opentosca * remove privacy policy split into location, dedicatedHosting, cloudDeploymentMode * fix display of properties * add transformation into service deployment * remove on-demand modal from deploy workflow * update service task ids * adjust height & position * change icons of policies * adjust blue box * sync between task & policy * fix lint * add icons for palette & replace menu * change quantme to opentosca * update palette * add replace rule * Add missing header * remove entries from contextpad * restrict number of policies * update connect rule * add header * Update docs * update rule of reconnect * remove checkbox from ondemandpolicy, fix icons * remove checkbox for dedicated hosting policy * fix flag * remove on-demand policy when on-demand task is transformed --------- Co-authored-by: Benjamin Weder <benjamin.weder@iaas.uni-stuttgart.de>
- Loading branch information
1 parent
bf5414d
commit 3758f64
Showing
34 changed files
with
2,677 additions
and
216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 0 additions & 56 deletions
56
components/bpmn-q/modeler-component/editor/ui/OnDemandDeploymentModal.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
components/bpmn-q/modeler-component/extensions/opentosca/Constants.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* Copyright (c) 2023 Institute of Architecture of Application Systems - | ||
* University of Stuttgart | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms the Apache Software License 2.0 | ||
* which is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
export const POLICY = "opentosca:Policy"; | ||
export const CLOUD_DEPLOYMENT_MODEL_POLICY = | ||
"opentosca:CloudDeploymentModelPolicy"; | ||
export const ON_DEMAND_POLICY = "opentosca:OnDemandPolicy"; | ||
export const LOCATION_POLICY = "opentosca:LocationPolicy"; | ||
export const DEDICATED_HOSTING_POLICY = "opentosca:DedicatedHostingPolicy"; | ||
|
||
export const ON_DEMAND = "onDemand"; | ||
export const DEDICATED_HOSTING = "dedicatedHosting"; | ||
export const CLOUD_TYPE = "cloudType"; | ||
export const LOCATION = "location"; | ||
|
||
export const POLICIES = [ | ||
POLICY, | ||
CLOUD_DEPLOYMENT_MODEL_POLICY, | ||
DEDICATED_HOSTING_POLICY, | ||
LOCATION_POLICY, | ||
ON_DEMAND_POLICY, | ||
]; |
45 changes: 45 additions & 0 deletions
45
...nts/bpmn-q/modeler-component/extensions/opentosca/modeling/OpenTOSCAContextPadProvider.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/** | ||
* Copyright (c) 2023 Institute of Architecture of Application Systems - | ||
* University of Stuttgart | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms the Apache Software License 2.0 | ||
* which is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
import inherits from "inherits"; | ||
|
||
import ContextPadProvider from "bpmn-js/lib/features/context-pad/ContextPadProvider"; | ||
|
||
import { bind } from "min-dash"; | ||
|
||
import * as consts from "../Constants"; | ||
|
||
export default function OpenTOSCAContextPadProvider(injector) { | ||
injector.invoke(ContextPadProvider, this); | ||
bind(this.getContextPadEntries, this); | ||
|
||
const _getContextPadEntries = | ||
ContextPadProvider.prototype.getContextPadEntries; | ||
ContextPadProvider.prototype.getContextPadEntries = function (element) { | ||
const entries = _getContextPadEntries.apply(this, [element]); | ||
if (consts.POLICIES.includes(element.type)) { | ||
delete entries["append.end-event"]; | ||
delete entries["append.intermediate-event"]; | ||
delete entries["append.gateway"]; | ||
delete entries["append.append-task"]; | ||
delete entries["append.text-annotation"]; | ||
delete entries["connect"]; | ||
if (element.type === consts.ON_DEMAND_POLICY) { | ||
delete entries["delete"]; | ||
delete entries["replace"]; | ||
} | ||
} | ||
return entries; | ||
}; | ||
} | ||
|
||
inherits(OpenTOSCAContextPadProvider, ContextPadProvider); | ||
|
||
OpenTOSCAContextPadProvider.$inject = ["injector", "connect", "translate"]; |
65 changes: 65 additions & 0 deletions
65
...onents/bpmn-q/modeler-component/extensions/opentosca/modeling/OpenTOSCAPaletteProvider.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/** | ||
* Copyright (c) 2023 Institute of Architecture of Application Systems - | ||
* University of Stuttgart | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms the Apache Software License 2.0 | ||
* which is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import * as consts from "../Constants"; | ||
|
||
export default class OpenTOSCAPaletteProvider { | ||
constructor(bpmnFactory, create, elementFactory, palette, translate) { | ||
this.bpmnFactory = bpmnFactory; | ||
this.create = create; | ||
this.elementFactory = elementFactory; | ||
this.translate = translate; | ||
|
||
palette.registerProvider(this); | ||
} | ||
|
||
getPaletteEntries() { | ||
return this.createPolicyEntry(); | ||
} | ||
|
||
createPolicyEntry() { | ||
const { bpmnFactory, create, elementFactory, translate } = this; | ||
|
||
function createPolicy(event) { | ||
const businessObject = bpmnFactory.create(consts.POLICY); | ||
let shape = elementFactory.createShape({ | ||
type: consts.POLICY, | ||
businessObject: businessObject, | ||
}); | ||
create.start(event, shape); | ||
} | ||
|
||
return { | ||
// add separator line to delimit the new group | ||
"opentosca-separator": { | ||
group: "opentosca", | ||
separator: true, | ||
}, | ||
"create.opentosca-policy": { | ||
group: "opentosca", | ||
className: "qwm opentosca-icon-policy-palette", | ||
title: translate("Creates a policy"), | ||
action: { | ||
click: createPolicy, | ||
dragstart: createPolicy, | ||
}, | ||
}, | ||
}; | ||
} | ||
} | ||
|
||
OpenTOSCAPaletteProvider.$inject = [ | ||
"bpmnFactory", | ||
"create", | ||
"elementFactory", | ||
"palette", | ||
"translate", | ||
]; |
Oops, something went wrong.