cpee 2.1.125 → 2.1.127
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/cockpit/compliance.html +301 -0
- data/cockpit/css/compliance.css +38 -0
- data/cockpit/css/llm.css +27 -4
- data/cockpit/css/llm_active.svg +43 -0
- data/cockpit/css/llm_inactive.svg +43 -0
- data/cockpit/css/mode_active.svg +85 -0
- data/cockpit/css/mode_inactive.svg +77 -0
- data/cockpit/css/ui.css +21 -1
- data/cockpit/js/compliance.js +134 -0
- data/cockpit/js/instance.js +6 -1
- data/cockpit/js/llm.js +262 -86
- data/cockpit/js/parameters.js +19 -12
- data/cockpit/js/wfadaptor.js +49 -13
- data/cockpit/llm.html +34 -7
- data/cockpit/llmmodel.html +205 -0
- data/cockpit/only_llm.html +15 -7
- data/cockpit/rngs/requirements.rng +8 -0
- data/cockpit/themes/base.js +42 -18
- data/cockpit/themes/control/rngs/choose.rng +8 -1
- data/cockpit/themes/control/rngs/parallel.rng +4 -10
- data/cockpit/themes/dataflow/rngs/choose.rng +8 -1
- data/cockpit/themes/dataflow/rngs/parallel.rng +4 -10
- data/cockpit/themes/default/rngs/choose.rng +8 -1
- data/cockpit/themes/default/rngs/parallel.rng +4 -10
- data/cockpit/themes/extended/rngs/choose.rng +8 -1
- data/cockpit/themes/extended/rngs/parallel.rng +4 -10
- data/cockpit/themes/packed/rngs/choose.rng +8 -1
- data/cockpit/themes/packed/rngs/parallel.rng +4 -10
- data/cockpit/themes/preset/rngs/choose.rng +8 -1
- data/cockpit/themes/preset/rngs/parallel.rng +4 -10
- data/cockpit/themes/preset_model/rngs/alternative.rng +8 -0
- data/cockpit/themes/preset_model/rngs/call.rng +34 -0
- data/cockpit/themes/preset_model/rngs/callmanipulate.rng +39 -0
- data/cockpit/themes/preset_model/rngs/choose.rng +27 -0
- data/cockpit/themes/preset_model/rngs/critical.rng +8 -0
- data/cockpit/themes/preset_model/rngs/escape.rng +5 -0
- data/cockpit/themes/preset_model/rngs/group.rng +3 -0
- data/cockpit/themes/preset_model/rngs/loop.rng +14 -0
- data/cockpit/themes/preset_model/rngs/manipulate.rng +32 -0
- data/cockpit/themes/preset_model/rngs/otherwise.rng +5 -0
- data/cockpit/themes/preset_model/rngs/parallel.rng +24 -0
- data/cockpit/themes/preset_model/rngs/parallel_branch.rng +5 -0
- data/cockpit/themes/preset_model/rngs/scripts.rng +5 -0
- data/cockpit/themes/preset_model/rngs/start.rng +22 -0
- data/cockpit/themes/preset_model/rngs/stop.rng +5 -0
- data/cockpit/themes/preset_model/rngs/terminate.rng +8 -0
- data/cockpit/themes/preset_model/rngs/wait_for_signal.rng +8 -0
- data/cockpit/themes/preset_model/symbols/alternative.svg +15 -0
- data/cockpit/themes/preset_model/symbols/arrow.svg +3 -0
- data/cockpit/themes/preset_model/symbols/call.svg +19 -0
- data/cockpit/themes/preset_model/symbols/call_sensor.svg +23 -0
- data/cockpit/themes/preset_model/symbols/callmanipulate.svg +23 -0
- data/cockpit/themes/preset_model/symbols/callmanipulate_sensor.svg +26 -0
- data/cockpit/themes/preset_model/symbols/callmanipulate_sensor_signal.svg +32 -0
- data/cockpit/themes/preset_model/symbols/callmanipulate_signal.svg +29 -0
- data/cockpit/themes/preset_model/symbols/choose.svg +15 -0
- data/cockpit/themes/preset_model/symbols/choose_exclusive.svg +15 -0
- data/cockpit/themes/preset_model/symbols/choose_exclusive_finish.svg +5 -0
- data/cockpit/themes/preset_model/symbols/choose_inclusive.svg +13 -0
- data/cockpit/themes/preset_model/symbols/choose_inclusive_finish.svg +4 -0
- data/cockpit/themes/preset_model/symbols/closed_loop.svg +5 -0
- data/cockpit/themes/preset_model/symbols/closed_loop_cancel.svg +5 -0
- data/cockpit/themes/preset_model/symbols/closed_loop_control.svg +5 -0
- data/cockpit/themes/preset_model/symbols/closed_loop_measuring.svg +6 -0
- data/cockpit/themes/preset_model/symbols/complex.svg +8 -0
- data/cockpit/themes/preset_model/symbols/critical.svg +5 -0
- data/cockpit/themes/preset_model/symbols/delete.svg +4 -0
- data/cockpit/themes/preset_model/symbols/end.svg +3 -0
- data/cockpit/themes/preset_model/symbols/escape.svg +5 -0
- data/cockpit/themes/preset_model/symbols/event_end.svg +3 -0
- data/cockpit/themes/preset_model/symbols/loop.svg +15 -0
- data/cockpit/themes/preset_model/symbols/loop_end.svg +15 -0
- data/cockpit/themes/preset_model/symbols/manipulate.svg +19 -0
- data/cockpit/themes/preset_model/symbols/mark.svg +8 -0
- data/cockpit/themes/preset_model/symbols/otherwise.svg +5 -0
- data/cockpit/themes/preset_model/symbols/parallel.svg +6 -0
- data/cockpit/themes/preset_model/symbols/parallel_branch.svg +5 -0
- data/cockpit/themes/preset_model/symbols/parallel_branch_event.svg +14 -0
- data/cockpit/themes/preset_model/symbols/parallel_branch_normal.svg +5 -0
- data/cockpit/themes/preset_model/symbols/parallel_eventbased_exclusive.svg +9 -0
- data/cockpit/themes/preset_model/symbols/parallel_eventbased_parallel.svg +8 -0
- data/cockpit/themes/preset_model/symbols/scripts.svg +4 -0
- data/cockpit/themes/preset_model/symbols/start.svg +3 -0
- data/cockpit/themes/preset_model/symbols/start_event.svg +5 -0
- data/cockpit/themes/preset_model/symbols/stop.svg +5 -0
- data/cockpit/themes/preset_model/symbols/terminate.svg +4 -0
- data/cockpit/themes/preset_model/symbols/wait_for_signal.svg +21 -0
- data/cockpit/themes/preset_model/theme.js +50 -0
- data/cockpit/themes/presetaltid/rngs/choose.rng +8 -1
- data/cockpit/themes/presetaltid/rngs/parallel.rng +4 -10
- data/cockpit/themes/presetid/rngs/choose.rng +8 -1
- data/cockpit/themes/presetid/rngs/parallel.rng +4 -10
- data/cockpit/themes/reduced/rngs/choose.rng +8 -1
- data/cockpit/themes/reduced/rngs/parallel.rng +4 -10
- data/cpee.gemspec +1 -1
- data/server/executionhandlers/ruby/connection.rb +2 -2
- data/server/executionhandlers/ruby/dsl_to_dslx.xsl +20 -3
- data/server/routing/end.pid +1 -1
- data/server/routing/forward-events-00.pid +1 -1
- data/server/routing/forward-votes.pid +1 -1
- data/server/routing/persist.pid +1 -1
- data/server/routing/persist.rb +1 -5
- metadata +68 -1
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
3
|
+
|
|
4
|
+
<svg
|
|
5
|
+
width="39.688mm"
|
|
6
|
+
height="39.687504mm"
|
|
7
|
+
viewBox="0 0 39.688 39.687503"
|
|
8
|
+
version="1.1"
|
|
9
|
+
id="svg1"
|
|
10
|
+
xml:space="preserve"
|
|
11
|
+
sodipodi:docname="mode_inactive.svg"
|
|
12
|
+
inkscape:version="1.4.4 (dcaf3e7d9e, 2026-05-05)"
|
|
13
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
14
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
15
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
16
|
+
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
|
|
17
|
+
id="namedview1"
|
|
18
|
+
pagecolor="#ffffff"
|
|
19
|
+
bordercolor="#666666"
|
|
20
|
+
borderopacity="1.0"
|
|
21
|
+
inkscape:showpageshadow="2"
|
|
22
|
+
inkscape:pageopacity="0.0"
|
|
23
|
+
inkscape:pagecheckerboard="0"
|
|
24
|
+
inkscape:deskcolor="#d1d1d1"
|
|
25
|
+
inkscape:document-units="mm"
|
|
26
|
+
inkscape:zoom="4.0195288"
|
|
27
|
+
inkscape:cx="100.3849"
|
|
28
|
+
inkscape:cy="96.031157"
|
|
29
|
+
inkscape:window-width="3440"
|
|
30
|
+
inkscape:window-height="1371"
|
|
31
|
+
inkscape:window-x="0"
|
|
32
|
+
inkscape:window-y="0"
|
|
33
|
+
inkscape:window-maximized="1"
|
|
34
|
+
inkscape:current-layer="layer1"
|
|
35
|
+
showgrid="true"
|
|
36
|
+
showguides="true"><sodipodi:guide
|
|
37
|
+
position="-6.4326542,14.460154"
|
|
38
|
+
orientation="1,0"
|
|
39
|
+
id="guide1"
|
|
40
|
+
inkscape:locked="false" /><sodipodi:guide
|
|
41
|
+
position="9.2604167,30.427086"
|
|
42
|
+
orientation="1,0"
|
|
43
|
+
id="guide2"
|
|
44
|
+
inkscape:locked="false" /><sodipodi:guide
|
|
45
|
+
position="9.2604167,30.427086"
|
|
46
|
+
orientation="0,-1"
|
|
47
|
+
id="guide3"
|
|
48
|
+
inkscape:locked="false" /><sodipodi:guide
|
|
49
|
+
position="30.427083,10.583336"
|
|
50
|
+
orientation="1,0"
|
|
51
|
+
id="guide4"
|
|
52
|
+
inkscape:locked="false" /><sodipodi:guide
|
|
53
|
+
position="9.2604167,9.2604188"
|
|
54
|
+
orientation="0,-1"
|
|
55
|
+
id="guide5"
|
|
56
|
+
inkscape:locked="false" /><inkscape:grid
|
|
57
|
+
id="grid5"
|
|
58
|
+
units="mm"
|
|
59
|
+
originx="0"
|
|
60
|
+
originy="0"
|
|
61
|
+
spacingx="0.26458334"
|
|
62
|
+
spacingy="0.26458334"
|
|
63
|
+
empcolor="#0099e5"
|
|
64
|
+
empopacity="0.30196078"
|
|
65
|
+
color="#0099e5"
|
|
66
|
+
opacity="0.14901961"
|
|
67
|
+
empspacing="5"
|
|
68
|
+
enabled="true"
|
|
69
|
+
visible="true" /></sodipodi:namedview><defs
|
|
70
|
+
id="defs1" /><g
|
|
71
|
+
inkscape:label="Layer 1"
|
|
72
|
+
inkscape:groupmode="layer"
|
|
73
|
+
id="layer1"
|
|
74
|
+
transform="translate(-46.644447,-28.77213)"><path
|
|
75
|
+
style="fill:none;stroke:#3d3846;stroke-width:6;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:0.427451"
|
|
76
|
+
d="M 53.259031,35.386714 V 51.261715 H 69.134032 V 35.386714 Z"
|
|
77
|
+
id="path5" /></g></svg>
|
data/cockpit/css/ui.css
CHANGED
|
@@ -185,10 +185,28 @@ span.vote {
|
|
|
185
185
|
color: #73d216;
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
+
#details {
|
|
189
|
+
flex: 0 1 auto;
|
|
190
|
+
height: 100%;
|
|
191
|
+
overflow: scroll;
|
|
192
|
+
}
|
|
188
193
|
#modelling {
|
|
189
|
-
flex:
|
|
194
|
+
flex: 0 1 auto;
|
|
195
|
+
height: 100%;
|
|
190
196
|
overflow: scroll;
|
|
191
197
|
}
|
|
198
|
+
#input {
|
|
199
|
+
flex: 1 0 auto;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
#graphcolumn ui-resizehandle {
|
|
203
|
+
margin-right: 0.2em;
|
|
204
|
+
margin-bottom: 0.2em;
|
|
205
|
+
}
|
|
206
|
+
#detailcolumn ui-resizehandle {
|
|
207
|
+
margin-right: 0.5em;
|
|
208
|
+
margin-bottom: 0.2em;
|
|
209
|
+
}
|
|
192
210
|
|
|
193
211
|
#graphcolumn {
|
|
194
212
|
margin: 0;
|
|
@@ -201,6 +219,8 @@ span.vote {
|
|
|
201
219
|
}
|
|
202
220
|
#detailcolumn {
|
|
203
221
|
padding-left: 1.5em;
|
|
222
|
+
display: flex;
|
|
223
|
+
flex-direction: column;
|
|
204
224
|
}
|
|
205
225
|
|
|
206
226
|
#dat_log tr:nth-child(odd) { background-color: #e8e8e8; color: #333; }
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
$(document).ready(function() { //{{{
|
|
2
|
+
$.ajax({
|
|
3
|
+
type: "GET",
|
|
4
|
+
url: "rngs/requirements.rng",
|
|
5
|
+
dataType: "xml",
|
|
6
|
+
success: function(rng){
|
|
7
|
+
save['requirements'] = new RelaxNGui(rng,$('#dat_requirements'));
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
$("#verify").click(function(){
|
|
12
|
+
var uuid = save.attributes_raw && save.attributes_raw.uuid;
|
|
13
|
+
if (!uuid) {
|
|
14
|
+
$('#comp_log').html('<p>No instance loaded.</p>');
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
var baseUrl = 'https://cpee.org/comp-log/';
|
|
19
|
+
var currentUrl = baseUrl + uuid + '.xes.yaml';
|
|
20
|
+
var allUrl = baseUrl + uuid + '.all.xes.yaml';
|
|
21
|
+
|
|
22
|
+
$('#comp-all-log').attr('href', allUrl).show();
|
|
23
|
+
|
|
24
|
+
function tryLoad(url, fallback) {
|
|
25
|
+
$.ajax({
|
|
26
|
+
type: 'GET',
|
|
27
|
+
url: url,
|
|
28
|
+
dataType: 'text',
|
|
29
|
+
success: function(yaml) {
|
|
30
|
+
$('#comp-current-log').attr('href', url).text(url.split('/').pop()).show();
|
|
31
|
+
displayComplianceMessages(yaml);
|
|
32
|
+
},
|
|
33
|
+
error: function() {
|
|
34
|
+
if (fallback) {
|
|
35
|
+
tryLoad(fallback, null);
|
|
36
|
+
} else {
|
|
37
|
+
$('#comp_log').html('<p>Could not load compliance log.</p>');
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
tryLoad(currentUrl, baseUrl + uuid + '.current.xes.yaml');
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
document.addEventListener('attributes:changed', function (e) {
|
|
47
|
+
let req = $X("<requirements xmlns='http://cpee.org/ns/properties/2.0'/>");
|
|
48
|
+
let reqs;
|
|
49
|
+
let regex = /\"\s*=>\s*"/g
|
|
50
|
+
if (save.attributes_raw.requirements.match(regex)) {
|
|
51
|
+
reqs = save.attributes_raw.requirements.replace(regex,"\":\"");
|
|
52
|
+
} else {
|
|
53
|
+
reqs = save.attributes_raw.requirements;
|
|
54
|
+
}
|
|
55
|
+
reqj = JSON.parse(reqs);
|
|
56
|
+
for (let key in reqj) {
|
|
57
|
+
let ele = $X("<" + key + " xmlns='http://cpee.org/ns/properties/2.0'/>");
|
|
58
|
+
ele.text(reqj[key]);
|
|
59
|
+
req.append(ele);
|
|
60
|
+
}
|
|
61
|
+
save['requirements'].content(req);
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
var timer;
|
|
65
|
+
// when input in one of the inputs, save
|
|
66
|
+
$(document).on('input','#dat_requirements input',function(event){
|
|
67
|
+
clearTimeout(timer);
|
|
68
|
+
timer = setTimeout(function(){ do_requirements_save(event); }, 5000);
|
|
69
|
+
});
|
|
70
|
+
$(document).on('relaxngui_remove', '#dat_requirements', function(event){
|
|
71
|
+
clearTimeout(timer);
|
|
72
|
+
do_requirements_save(event);
|
|
73
|
+
});
|
|
74
|
+
$(document).on('relaxngui_move', '#dat_requirements', function(event){
|
|
75
|
+
clearTimeout(timer);
|
|
76
|
+
do_requirements_save(event);
|
|
77
|
+
});
|
|
78
|
+
$(document).on('relaxngui_change', '#dat_requirements', function(event){
|
|
79
|
+
clearTimeout(timer);
|
|
80
|
+
do_requirements_save(event);
|
|
81
|
+
});
|
|
82
|
+
}); //}}}
|
|
83
|
+
|
|
84
|
+
function displayComplianceMessages(yaml) { //{{{
|
|
85
|
+
var messages = [];
|
|
86
|
+
var parts = yaml.split(/\n---\s*\n/);
|
|
87
|
+
|
|
88
|
+
for (var i = 0; i < parts.length; i++) {
|
|
89
|
+
var part = parts[i];
|
|
90
|
+
if (!part.match(/^event:/m)) continue;
|
|
91
|
+
|
|
92
|
+
// No /m flag: $ matches end-of-string only, preventing premature match on
|
|
93
|
+
// the first line of a multi-line YAML single-quoted scalar.
|
|
94
|
+
var m = part.match(/\n data:\s*([\s\S]*?)(?=\n [a-zA-Z]|\s*$)/);
|
|
95
|
+
if (!m) continue;
|
|
96
|
+
|
|
97
|
+
var val = m[1].trim();
|
|
98
|
+
if (!val) continue;
|
|
99
|
+
|
|
100
|
+
// Remove surrounding YAML flow-scalar single quotes and unescape ''
|
|
101
|
+
if (val.charAt(0) === "'" && val.charAt(val.length - 1) === "'") {
|
|
102
|
+
val = val.slice(1, -1).replace(/''/g, "'");
|
|
103
|
+
}
|
|
104
|
+
// Collapse multi-line continuation whitespace (incl. column-0 continuations)
|
|
105
|
+
val = val.replace(/\n[ \t]*/g, ' ').trim();
|
|
106
|
+
|
|
107
|
+
messages.push(val);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
if (messages.length === 0) {
|
|
111
|
+
$('#comp_log').html('<div>No messages found.</div>');
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
var html = '<div>Pre-Tests</div>';
|
|
116
|
+
for (var j = 0; j < messages.length; j++) {
|
|
117
|
+
var msg = messages[j];
|
|
118
|
+
var isHeader = /^Verifying Requirement R/.test(msg) || /^Requirement R/.test(msg);
|
|
119
|
+
var cls = isHeader ? '' : ' class="indent"';
|
|
120
|
+
html += '<div' + cls + '>' + $('<span>').text(msg).html() + '</div>';
|
|
121
|
+
}
|
|
122
|
+
$('#comp_log').html(html);
|
|
123
|
+
} //}}}
|
|
124
|
+
|
|
125
|
+
function do_requirements_save(event) { //{{{
|
|
126
|
+
if (save['requirements'].has_changed()) {
|
|
127
|
+
save['requirements'].set_checkpoint();
|
|
128
|
+
var url = $('body').attr('current-instance');
|
|
129
|
+
let reqj = save['requirements'].save_json();
|
|
130
|
+
let att = save['attributes'].save();
|
|
131
|
+
$(' > attributes > requirements', att).text(reqj);
|
|
132
|
+
do_parameters_save_part('attributes',$(att).serializePrettyXML());
|
|
133
|
+
}
|
|
134
|
+
} //}}}
|
data/cockpit/js/instance.js
CHANGED
|
@@ -156,6 +156,9 @@ function cockpit() { //{{{
|
|
|
156
156
|
uidash_toggle_vis_tab($('#instance'));
|
|
157
157
|
uidash_toggle_vis_tab($('#parameters'));
|
|
158
158
|
}
|
|
159
|
+
if (q.dea || q.dea == "") {
|
|
160
|
+
uidash_toggle_vis_tab($('#instance'));
|
|
161
|
+
}
|
|
159
162
|
if (q.theme) { graph_theme = q.theme; }
|
|
160
163
|
if (q.position) { graph_position = q.position == 'false' ? 'false' : 'true'; }
|
|
161
164
|
if (q.highlight) {
|
|
@@ -518,7 +521,8 @@ function monitor_instance_values(type,vals) {// {{{
|
|
|
518
521
|
var tmp = {};
|
|
519
522
|
let deferreds = [];
|
|
520
523
|
$(res).find(" > endpoints > *").each(function(k,v) {
|
|
521
|
-
|
|
524
|
+
let val = v.lastChild ? v.lastChild.nodeValue : '';
|
|
525
|
+
save['endpoints_list'][v.localName] = val;
|
|
522
526
|
let rep = $('body').attr('current-resources');
|
|
523
527
|
let def = new $.Deferred();
|
|
524
528
|
deferreds.push(def);
|
|
@@ -559,6 +563,7 @@ function monitor_instance_values(type,vals) {// {{{
|
|
|
559
563
|
$(" > attributes > *",res).each((k,v)=>{
|
|
560
564
|
save['attributes_raw'][v.nodeName] = v.textContent;
|
|
561
565
|
});
|
|
566
|
+
document.dispatchEvent(eval(type + '_changed'));
|
|
562
567
|
if ($(" > attributes > resources",res).length > 0) {
|
|
563
568
|
save['resources'] = $(" > attributes > resources",res).text();
|
|
564
569
|
} else {
|