cpee 2.1.125 → 2.1.126

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.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/cockpit/compliance.html +301 -0
  3. data/cockpit/css/compliance.css +38 -0
  4. data/cockpit/css/llm.css +15 -4
  5. data/cockpit/css/llm_active.svg +43 -0
  6. data/cockpit/css/llm_inactive.svg +43 -0
  7. data/cockpit/css/mode_active.svg +85 -0
  8. data/cockpit/css/mode_inactive.svg +77 -0
  9. data/cockpit/css/ui.css +10 -1
  10. data/cockpit/js/compliance.js +134 -0
  11. data/cockpit/js/instance.js +6 -1
  12. data/cockpit/js/llm.js +254 -86
  13. data/cockpit/js/parameters.js +19 -12
  14. data/cockpit/js/wfadaptor.js +49 -12
  15. data/cockpit/llm.html +34 -7
  16. data/cockpit/only_llm.html +15 -7
  17. data/cockpit/rngs/requirements.rng +8 -0
  18. data/cockpit/themes/base.js +1 -0
  19. data/cockpit/themes/control/rngs/choose.rng +8 -1
  20. data/cockpit/themes/control/rngs/parallel.rng +4 -10
  21. data/cockpit/themes/dataflow/rngs/choose.rng +8 -1
  22. data/cockpit/themes/dataflow/rngs/parallel.rng +4 -10
  23. data/cockpit/themes/default/rngs/choose.rng +8 -1
  24. data/cockpit/themes/default/rngs/parallel.rng +4 -10
  25. data/cockpit/themes/extended/rngs/choose.rng +8 -1
  26. data/cockpit/themes/extended/rngs/parallel.rng +4 -10
  27. data/cockpit/themes/packed/rngs/choose.rng +8 -1
  28. data/cockpit/themes/packed/rngs/parallel.rng +4 -10
  29. data/cockpit/themes/preset/rngs/choose.rng +8 -1
  30. data/cockpit/themes/preset/rngs/parallel.rng +4 -10
  31. data/cockpit/themes/presetaltid/rngs/choose.rng +8 -1
  32. data/cockpit/themes/presetaltid/rngs/parallel.rng +4 -10
  33. data/cockpit/themes/presetid/rngs/choose.rng +8 -1
  34. data/cockpit/themes/presetid/rngs/parallel.rng +4 -10
  35. data/cockpit/themes/reduced/rngs/choose.rng +8 -1
  36. data/cockpit/themes/reduced/rngs/parallel.rng +4 -10
  37. data/cpee.gemspec +1 -1
  38. data/server/executionhandlers/ruby/connection.rb +2 -2
  39. data/server/executionhandlers/ruby/dsl_to_dslx.xsl +20 -3
  40. data/server/routing/persist.rb +1 -5
  41. metadata +9 -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
@@ -186,9 +186,18 @@ span.vote {
186
186
  }
187
187
 
188
188
  #modelling {
189
- flex: 1 1 auto;
189
+ flex: 0 1 auto;
190
+ height: 100%;
190
191
  overflow: scroll;
191
192
  }
193
+ #input {
194
+ flex: 1 0 auto;
195
+ }
196
+
197
+ #graphcolumn ui-resizehandle {
198
+ margin-right: 0.2em;
199
+ margin-bottom: 0.2em;
200
+ }
192
201
 
193
202
  #graphcolumn {
194
203
  margin: 0;
@@ -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
+ } //}}}
@@ -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
- save['endpoints_list'][v.localName] = v.lastChild.nodeValue;
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 {