cpee 2.1.29 → 2.1.50
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/Rakefile +1 -1
- data/cockpit/config.json +1 -1
- data/cockpit/css/graph.css +13 -0
- data/cockpit/css/track.css +1 -1
- data/cockpit/css/wfadaptor.css +9 -2
- data/cockpit/edit.html +1 -1
- data/cockpit/graph.html +1 -0
- data/cockpit/index.html +2 -2
- data/cockpit/js/details.js +2 -2
- data/cockpit/js/instance.js +162 -112
- data/cockpit/js/wfadaptor.js +20 -14
- data/cockpit/js_libs.zip +0 -0
- data/cockpit/templates/Coopis 2010.xml +109 -14
- data/cockpit/templates/Frames.xml +297 -0
- data/cockpit/templates/Subprocess.xml +54 -6
- data/cockpit/templates/Wait.xml +5 -11
- data/cockpit/templates/Worklist.xml +58 -26
- data/cockpit/themes/compact/rngs/call.rng +127 -86
- data/cockpit/themes/compact/rngs/callmanipulate.rng +32 -7
- data/cockpit/themes/compact/rngs/closed_loop_control.rng +2 -2
- data/cockpit/themes/compact/rngs/closed_loop_measuring.rng +3 -3
- data/cockpit/themes/compact/rngs/start.rng +110 -72
- data/cockpit/themes/compact/symbols/call_sensor.svg +9 -0
- data/cockpit/themes/compact/symbols/callmanipulate.svg +3 -3
- data/cockpit/themes/compact/symbols/callmanipulate_sensor.svg +11 -0
- data/cockpit/themes/compact/symbols/delete.svg +4 -0
- data/cockpit/themes/compact/symbols/start_event.svg +5 -0
- data/cockpit/themes/compact/symbols/test.svg +74 -0
- data/cockpit/themes/compact/theme.js +105 -9
- data/cockpit/themes/control/rngs/call.rng +127 -86
- data/cockpit/themes/control/rngs/callmanipulate.rng +32 -7
- data/cockpit/themes/control/rngs/closed_loop_control.rng +2 -2
- data/cockpit/themes/control/rngs/closed_loop_measuring.rng +3 -3
- data/cockpit/themes/control/rngs/start.rng +110 -72
- data/cockpit/themes/control/symbols/call_sensor.svg +9 -0
- data/cockpit/themes/control/symbols/callmanipulate.svg +3 -3
- data/cockpit/themes/control/symbols/callmanipulate_sensor.svg +11 -0
- data/cockpit/themes/control/symbols/delete.svg +4 -0
- data/cockpit/themes/control/symbols/start_event.svg +5 -0
- data/cockpit/themes/control/symbols/test.svg +74 -0
- data/cockpit/themes/control/theme.js +53 -7
- data/cockpit/themes/default/rngs/call.rng +127 -86
- data/cockpit/themes/default/rngs/callmanipulate.rng +32 -7
- data/cockpit/themes/default/rngs/closed_loop_control.rng +2 -2
- data/cockpit/themes/default/rngs/closed_loop_measuring.rng +3 -3
- data/cockpit/themes/default/rngs/start.rng +110 -72
- data/cockpit/themes/default/symbols/call_sensor.svg +9 -0
- data/cockpit/themes/default/symbols/callmanipulate.svg +3 -3
- data/cockpit/themes/default/symbols/callmanipulate_sensor.svg +11 -0
- data/cockpit/themes/default/symbols/delete.svg +4 -0
- data/cockpit/themes/default/symbols/start_event.svg +5 -0
- data/cockpit/themes/default/symbols/test.svg +74 -0
- data/cockpit/themes/default/theme.js +105 -9
- data/cockpit/themes/extended/rngs/call.rng +127 -86
- data/cockpit/themes/extended/rngs/callmanipulate.rng +32 -7
- data/cockpit/themes/extended/rngs/closed_loop_control.rng +2 -2
- data/cockpit/themes/extended/rngs/closed_loop_measuring.rng +3 -3
- data/cockpit/themes/extended/rngs/start.rng +110 -72
- data/cockpit/themes/extended/symbols/call_sensor.svg +9 -0
- data/cockpit/themes/extended/symbols/callmanipulate.svg +3 -3
- data/cockpit/themes/extended/symbols/callmanipulate_sensor.svg +11 -0
- data/cockpit/themes/extended/symbols/delete.svg +4 -0
- data/cockpit/themes/extended/symbols/start_event.svg +5 -0
- data/cockpit/themes/extended/symbols/test.svg +74 -0
- data/cockpit/themes/extended/theme.js +105 -9
- data/cockpit/themes/model/symbols/call_sensor.svg +9 -0
- data/cockpit/themes/model/symbols/callmanipulate.svg +3 -3
- data/cockpit/themes/model/symbols/callmanipulate_sensor.svg +11 -0
- data/cockpit/themes/model/symbols/delete.svg +4 -0
- data/cockpit/themes/model/symbols/start_event.svg +5 -0
- data/cockpit/themes/model/symbols/test.svg +74 -0
- data/cockpit/themes/model/theme.js +50 -4
- data/cockpit/themes/packed/rngs/call.rng +127 -86
- data/cockpit/themes/packed/rngs/callmanipulate.rng +32 -7
- data/cockpit/themes/packed/rngs/closed_loop_control.rng +2 -2
- data/cockpit/themes/packed/rngs/closed_loop_measuring.rng +3 -3
- data/cockpit/themes/packed/rngs/start.rng +110 -72
- data/cockpit/themes/packed/symbols/call_sensor.svg +9 -0
- data/cockpit/themes/packed/symbols/callmanipulate.svg +3 -3
- data/cockpit/themes/packed/symbols/callmanipulate_sensor.svg +11 -0
- data/cockpit/themes/packed/symbols/delete.svg +4 -0
- data/cockpit/themes/packed/symbols/start_event.svg +5 -0
- data/cockpit/themes/packed/symbols/test.svg +74 -0
- data/cockpit/themes/packed/theme.js +105 -9
- data/cockpit/themes/preset/rngs/call.rng +127 -86
- data/cockpit/themes/preset/rngs/callmanipulate.rng +32 -7
- data/cockpit/themes/preset/rngs/closed_loop_control.rng +2 -2
- data/cockpit/themes/preset/rngs/closed_loop_measuring.rng +3 -3
- data/cockpit/themes/preset/rngs/start.rng +110 -72
- data/cockpit/themes/preset/symbols/call_sensor.svg +9 -0
- data/cockpit/themes/preset/symbols/callmanipulate.svg +3 -3
- data/cockpit/themes/preset/symbols/callmanipulate_sensor.svg +11 -0
- data/cockpit/themes/preset/symbols/delete.svg +4 -0
- data/cockpit/themes/preset/symbols/start_event.svg +5 -0
- data/cockpit/themes/preset/symbols/test.svg +74 -0
- data/cockpit/themes/preset/theme.js +105 -9
- data/cpee.gemspec +6 -5
- data/lib/cpee/fail.rb +23 -0
- data/lib/cpee/implementation.rb +144 -49
- data/lib/cpee/implementation_callbacks.rb +11 -10
- data/lib/cpee/implementation_notifications.rb +4 -3
- data/lib/cpee/implementation_properties.rb +2 -2
- data/lib/cpee/message.rb +49 -15
- data/lib/cpee/persistence.rb +34 -12
- data/lib/cpee.xml +1 -1
- data/server/executionhandlers/ruby/backend/instance.template +1 -1
- data/server/executionhandlers/ruby/backend/run +4 -4
- data/server/executionhandlers/ruby/connection.rb +93 -34
- data/server/executionhandlers/ruby/controller.rb +29 -19
- data/server/executionhandlers/ruby/desc.xml +107 -0
- data/server/executionhandlers/ruby/dsl_to_dslx.xsl +67 -24
- data/server/executionhandlers/ruby/execution.rb +1 -0
- data/server/resources/states.xml +3 -0
- data/server/resources/test.pdf +0 -0
- data/server/resources/topics.xml +4 -2
- data/server/routing/end.pid +1 -0
- data/server/routing/end.rb +3 -2
- data/server/routing/forward-events-00.pid +1 -0
- data/server/routing/forward-events.rb +26 -13
- data/server/routing/forward-votes.pid +1 -0
- data/server/routing/forward-votes.rb +4 -4
- data/server/routing/persist.pid +1 -0
- data/server/routing/persist.rb +41 -31
- data/server/server.pid +1 -0
- data/tools/cpee +99 -24
- metadata +80 -32
- data/cockpit/templates/Coopis 2010.xml.active +0 -1
- data/cockpit/templates/Coopis 2010.xml.active-uuid +0 -1
- data/cockpit/templates/Subprocess.xml.active +0 -1
- data/cockpit/templates/Subprocess.xml.active-uuid +0 -1
- data/cockpit/templates/Track Test.xml.active +0 -1
- data/cockpit/templates/Track Test.xml.active-uuid +0 -1
- data/cockpit/templates/UR-VUE 2020 Solution Baseline.xml.active +0 -1
- data/cockpit/templates/UR-VUE 2020 Solution Baseline.xml.active-uuid +0 -1
- data/cockpit/templates/Wait.xml.active +0 -1
- data/cockpit/templates/Wait.xml.active-uuid +0 -1
- data/cockpit/templates/Wait.xml.attrs +0 -13
- data/server/executionhandlers/ruby/test.xml +0 -43
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ae076f6c9e29ad07d9fde309d7d442c217f4f5e6dc7d53a1568539ac8ab355b5
|
|
4
|
+
data.tar.gz: 848076eca4541d65022199637c8b49a01a27072a05217e953b56b260e131bbf3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9fb987297935bf548bd59a0547bf11b1b4b2a333d7064d7b4e1b124ece5372384c39263550476d474cf1b255a58a2dfb59ce8858d4b15f5572b7277cccfd755c
|
|
7
|
+
data.tar.gz: c7ce6bcb5a7d798ea680c160941fd3d2a76c990ee7a32c9ee55da99eff9dc9f75c5073c05cf6b01066d6a05e7afa31e8a13717ffb32e4382e2e3bd8f91c622f7
|
data/Rakefile
CHANGED
data/cockpit/config.json
CHANGED
data/cockpit/css/track.css
CHANGED
data/cockpit/css/wfadaptor.css
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
--wfadaptor-selected: #f57900;
|
|
28
28
|
--wfadaptor-stripe: #e9e9e9;
|
|
29
29
|
--wfadaptor-background: #ffffff;
|
|
30
|
-
--wfadaptor-
|
|
30
|
+
--wfadaptor-menu: #ef2929;
|
|
31
31
|
--wfadaptor-border: #a1a1a1;
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -73,7 +73,11 @@ svg g.vote .rline {
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
svg .rfill.menu {
|
|
76
|
-
fill: var(--wfadaptor-
|
|
76
|
+
fill: var(--wfadaptor-menu);
|
|
77
|
+
fill-opacity:1;
|
|
78
|
+
}
|
|
79
|
+
svg .hfill.menu {
|
|
80
|
+
fill: var(--wfadaptor-menu);
|
|
77
81
|
fill-opacity:1;
|
|
78
82
|
}
|
|
79
83
|
|
|
@@ -130,6 +134,9 @@ svg .standfat {
|
|
|
130
134
|
stroke-opacity:1;
|
|
131
135
|
stroke-dasharray:none;
|
|
132
136
|
}
|
|
137
|
+
svg .standfat.menu {
|
|
138
|
+
stroke: var(--wfadaptor-menu);
|
|
139
|
+
}
|
|
133
140
|
svg .normal {
|
|
134
141
|
fill: var(--wfadaptor-base);
|
|
135
142
|
fill-opacity:1;
|
data/cockpit/edit.html
CHANGED
|
@@ -253,7 +253,7 @@
|
|
|
253
253
|
</ui-area>
|
|
254
254
|
<ui-area data-belongs-to-tab="dsl" id="areadsl" class="inactive"></ui-area>
|
|
255
255
|
<ui-area data-belongs-to-tab="log" id="arealog" class="inactive"> <!--{{{-->
|
|
256
|
-
<div>Persistent Log: <a style='display:none' target='_blank' id='current-log'></a
|
|
256
|
+
<div>Persistent Log: <a style='display:none' target='_blank' id='current-log'></a> [<a style='display:none' target='_blank' id='shifted-log'>S</a>]</div>
|
|
257
257
|
<table id="dat_log" class="x-ui-layout"></table>
|
|
258
258
|
</ui-area> <!--}}}-->
|
|
259
259
|
</ui-content>
|
data/cockpit/graph.html
CHANGED
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
<script type="text/javascript" src="js/parameters.js"></script>
|
|
57
57
|
<script type="text/javascript" src="js/modifiers.js"></script>
|
|
58
58
|
<link rel="stylesheet" href="css/ui.css" type="text/css"/>
|
|
59
|
+
<link rel="stylesheet" href="css/graph.css" type="text/css"/>
|
|
59
60
|
</head>
|
|
60
61
|
<body data-base-port="8298" data-res-port="9303" data-theme-base="themes" is="x-ui-">
|
|
61
62
|
<div class='hidden' id='relaxngworker'></div>
|
data/cockpit/index.html
CHANGED
|
@@ -243,7 +243,7 @@
|
|
|
243
243
|
<ui-behind ><a style='display:none' target='_blank' id='current-track'>T</a><a style='display:none' target='_blank' id='current-graph'>G</a></ui-behind>
|
|
244
244
|
</ui-tabbar>
|
|
245
245
|
<ui-content>
|
|
246
|
-
<ui-area data-belongs-to-tab="details" id='graphcolumn'>
|
|
246
|
+
<ui-area data-belongs-to-tab="details" id='graphcolumn' oncontextmenu='return false'>
|
|
247
247
|
<div id='graphgrid'>
|
|
248
248
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:x="http://www.w3.org/1999/xlink" id='graphcanvas' width='1' height='1'></svg>
|
|
249
249
|
</div>
|
|
@@ -254,7 +254,7 @@
|
|
|
254
254
|
</ui-area>
|
|
255
255
|
<ui-area data-belongs-to-tab="dsl" id="areadsl" class="inactive"></ui-area>
|
|
256
256
|
<ui-area data-belongs-to-tab="log" id="arealog" class="inactive"> <!--{{{-->
|
|
257
|
-
<div>Persistent Log: <a style='display:none' target='_blank' id='current-log'></a
|
|
257
|
+
<div>Persistent Log: <a style='display:none' target='_blank' id='current-log'></a> [<a style='display:none' target='_blank' id='shifted-log'>S</a>]</div>
|
|
258
258
|
<table id="dat_log" class="x-ui-layout"></table>
|
|
259
259
|
</ui-area> <!--}}}-->
|
|
260
260
|
</ui-content>
|
data/cockpit/js/details.js
CHANGED
|
@@ -21,8 +21,8 @@ $(document).ready(function() {
|
|
|
21
21
|
});
|
|
22
22
|
$(document).on('keypress','#dat_details [contenteditable]',function(e){
|
|
23
23
|
if (e.keyCode == 13) {
|
|
24
|
-
document.execCommand('
|
|
25
|
-
|
|
24
|
+
document.execCommand('insertLineBreak')
|
|
25
|
+
e.preventDefault()
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
$(document).on('relaxngui_remove', '#dat_details', function(e){
|
data/cockpit/js/instance.js
CHANGED
|
@@ -17,9 +17,11 @@ function global_init() {
|
|
|
17
17
|
loading = false;
|
|
18
18
|
subscription = undefined;
|
|
19
19
|
subscription_state = 'less';
|
|
20
|
+
save['states']= {};
|
|
20
21
|
save['state']= undefined;
|
|
21
22
|
save['dsl'] = undefined;
|
|
22
|
-
save['
|
|
23
|
+
save['activity_red_states'] = {}
|
|
24
|
+
save['activity_blue_states'] = {}
|
|
23
25
|
save['graph'] = undefined;
|
|
24
26
|
save['graph_theme'] = undefined;
|
|
25
27
|
save['graph_adaptor'] = undefined;
|
|
@@ -270,7 +272,7 @@ function sse() { //{{{
|
|
|
270
272
|
if (data['type'] == 'event') {
|
|
271
273
|
switch(data['topic']) {
|
|
272
274
|
case 'dataelements':
|
|
273
|
-
monitor_instance_values("dataelements");
|
|
275
|
+
monitor_instance_values("dataelements",data.content.values);
|
|
274
276
|
break;
|
|
275
277
|
case 'description':
|
|
276
278
|
monitor_instance_dsl();
|
|
@@ -291,6 +293,7 @@ function sse() { //{{{
|
|
|
291
293
|
}
|
|
292
294
|
break;
|
|
293
295
|
case 'state':
|
|
296
|
+
save['states'][data['content']['state']] = Date.parse(data.timestamp);
|
|
294
297
|
monitor_instance_state_change(data['content']['state']);
|
|
295
298
|
break;
|
|
296
299
|
case 'position':
|
|
@@ -390,82 +393,110 @@ function monitor_instance(cin,rep,load,exec) {// {{{
|
|
|
390
393
|
});
|
|
391
394
|
}// }}}
|
|
392
395
|
|
|
393
|
-
function monitor_instance_values(
|
|
396
|
+
function monitor_instance_values(type,vals) {// {{{
|
|
394
397
|
var url = $('body').attr('current-instance');
|
|
395
398
|
var rep = $('body').attr('current-resources');
|
|
396
399
|
var bas = $('body').attr('current-base');
|
|
397
400
|
|
|
398
|
-
|
|
399
|
-
type
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
var tmp = {};
|
|
406
|
-
$(res).find(" > endpoints > *").each(function(k,v) {
|
|
407
|
-
save['endpoints_list'][v.localName] = v.lastChild.nodeValue;
|
|
408
|
-
$.ajax({
|
|
409
|
-
url: rep + 'endpoints/' + encodeURIComponent($(v).text()),
|
|
410
|
-
success: function() {
|
|
411
|
-
tmp[v.tagName] = {};
|
|
412
|
-
var deferreds = [new $.Deferred(), new $.Deferred(), new $.Deferred()];
|
|
413
|
-
$.ajax({
|
|
414
|
-
url: rep + 'endpoints/' + encodeURIComponent($(v).text()) + "/symbol.svg",
|
|
415
|
-
success: function(res) {
|
|
416
|
-
tmp[v.tagName]['symbol'] = res;
|
|
417
|
-
deferreds[0].resolve(true);
|
|
418
|
-
},
|
|
419
|
-
error: deferreds[0].resolve
|
|
420
|
-
})
|
|
421
|
-
$.ajax({
|
|
422
|
-
url: rep + 'endpoints/' + encodeURIComponent($(v).text()) + "/schema.rng",
|
|
423
|
-
success: function(res) {
|
|
424
|
-
tmp[v.tagName]['schema'] = res;
|
|
425
|
-
deferreds[1].resolve(true);
|
|
426
|
-
},
|
|
427
|
-
error: deferreds[1].resolve
|
|
428
|
-
})
|
|
429
|
-
$.ajax({
|
|
430
|
-
url: rep + 'endpoints/' + encodeURIComponent($(v).text()) + "/properties.json",
|
|
431
|
-
success: function(res) {
|
|
432
|
-
tmp[v.tagName]['properties'] = res;
|
|
433
|
-
deferreds[2].resolve(true);
|
|
434
|
-
},
|
|
435
|
-
error: deferreds[2].resolve
|
|
436
|
-
})
|
|
437
|
-
$.when.apply($, deferreds).then(function(x) {
|
|
438
|
-
save['endpoints_cache'] = tmp;
|
|
439
|
-
// when updating attributes clear the attributes, because they might change as well. New arguments are possible.
|
|
440
|
-
$('#dat_details').empty();
|
|
441
|
-
adaptor_update();
|
|
442
|
-
});
|
|
443
|
-
}
|
|
444
|
-
});
|
|
445
|
-
});
|
|
446
|
-
} else if(val == "attributes") {
|
|
447
|
-
if ($('#modifiers > div').length == 0) {
|
|
448
|
-
modifiers_display().then(function(){ modifiers_select(); });
|
|
401
|
+
if (type == "dataelements" && save['state'] == "running") {
|
|
402
|
+
let de = save[type].save();
|
|
403
|
+
Object.entries(vals).forEach(([key,value]) => {
|
|
404
|
+
let entry = $(de).find(' > dataelements > ' + key);
|
|
405
|
+
if (entry.length > 0) {
|
|
406
|
+
if (typeof value === 'string' || typeof value === 'boolean' || typeof value === 'number') {
|
|
407
|
+
entry.text(value)
|
|
449
408
|
} else {
|
|
450
|
-
|
|
409
|
+
entry.text(JSON.stringify(value))
|
|
451
410
|
}
|
|
452
|
-
|
|
453
|
-
$('
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
411
|
+
} else {
|
|
412
|
+
let ele = $X('<' + key + ' xmlns="http://cpee.org/ns/properties/2.0"/>')
|
|
413
|
+
if (typeof value === 'string' || typeof value === 'boolean' || typeof value === 'number') {
|
|
414
|
+
$(ele).text(value)
|
|
415
|
+
} else {
|
|
416
|
+
$(ele).text(JSON.stringify(value))
|
|
457
417
|
}
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
418
|
+
$(de).find(' > dataelements').append(ele)
|
|
419
|
+
}
|
|
420
|
+
});
|
|
421
|
+
save[type].content(de);
|
|
422
|
+
} else {
|
|
423
|
+
$.ajax({
|
|
424
|
+
type: "GET",
|
|
425
|
+
url: url + "/properties/" + type + "/",
|
|
426
|
+
success: function(res){
|
|
427
|
+
save[type].content(res);
|
|
428
|
+
if (type == "endpoints") {
|
|
429
|
+
save['endpoints_list'] = {};
|
|
430
|
+
var tmp = {};
|
|
431
|
+
$(res).find(" > endpoints > *").each(function(k,v) {
|
|
432
|
+
save['endpoints_list'][v.localName] = v.lastChild.nodeValue;
|
|
433
|
+
$.ajax({
|
|
434
|
+
url: rep + 'endpoints/' + encodeURIComponent($(v).text()),
|
|
435
|
+
success: function() {
|
|
436
|
+
tmp[v.tagName] = {};
|
|
437
|
+
var deferreds = [new $.Deferred(), new $.Deferred(), new $.Deferred()];
|
|
438
|
+
$.ajax({
|
|
439
|
+
url: rep + 'endpoints/' + encodeURIComponent($(v).text()) + "/symbol.svg",
|
|
440
|
+
success: function(res) {
|
|
441
|
+
tmp[v.tagName]['symbol'] = res;
|
|
442
|
+
deferreds[0].resolve(true);
|
|
443
|
+
},
|
|
444
|
+
error: deferreds[0].resolve
|
|
445
|
+
})
|
|
446
|
+
$.ajax({
|
|
447
|
+
url: rep + 'endpoints/' + encodeURIComponent($(v).text()) + "/schema.rng",
|
|
448
|
+
success: function(res) {
|
|
449
|
+
tmp[v.tagName]['schema'] = res;
|
|
450
|
+
deferreds[1].resolve(true);
|
|
451
|
+
},
|
|
452
|
+
error: deferreds[1].resolve
|
|
453
|
+
})
|
|
454
|
+
$.ajax({
|
|
455
|
+
url: rep + 'endpoints/' + encodeURIComponent($(v).text()) + "/properties.json",
|
|
456
|
+
success: function(res) {
|
|
457
|
+
tmp[v.tagName]['properties'] = res;
|
|
458
|
+
deferreds[2].resolve(true);
|
|
459
|
+
},
|
|
460
|
+
error: deferreds[2].resolve
|
|
461
|
+
})
|
|
462
|
+
$.when.apply($, deferreds).then(function(x) {
|
|
463
|
+
save['endpoints_cache'] = tmp;
|
|
464
|
+
// when updating attributes clear the attributes, because they might change as well. New arguments are possible.
|
|
465
|
+
$('#dat_details').empty();
|
|
466
|
+
adaptor_update();
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
});
|
|
470
|
+
});
|
|
471
|
+
} else if(type == "attributes") {
|
|
472
|
+
if ($('#modifiers > div').length == 0) {
|
|
473
|
+
modifiers_display().then(function(){ modifiers_select(); });
|
|
474
|
+
} else {
|
|
475
|
+
modifiers_select();
|
|
476
|
+
}
|
|
477
|
+
var text = $(" > attributes > info",res).text() + " (" + url.replace(/\/$/,'').split(/[\\/]/).pop() + ")";
|
|
478
|
+
$('#title').text(text);
|
|
479
|
+
document.title = text;
|
|
480
|
+
if ($('body').attr('current-save')) {
|
|
481
|
+
$('body').attr('current-save-dir',$(" > attributes > design_dir",res).text());
|
|
482
|
+
}
|
|
483
|
+
if ($('body').attr('current-logs')) {
|
|
484
|
+
var uuid = $(" > attributes > uuid",res).text();
|
|
485
|
+
$("#current-log").show();
|
|
486
|
+
$("#shifted-log").show();
|
|
487
|
+
$("#current-log").attr('href',$('body').attr('current-logs') + uuid + '.xes.yaml');
|
|
488
|
+
$("#shifted-log").attr('href',$('body').attr('current-logs') + uuid + '.xes.shift.yaml');
|
|
489
|
+
if ($("#current-log").text() == '') {
|
|
490
|
+
$("#current-log").text(uuid + '.xes.yaml');
|
|
491
|
+
}
|
|
492
|
+
if ($("#shifted-log").text() == '') {
|
|
493
|
+
$("#shifted-log").text(uuid + '.xes.shift.yaml');
|
|
494
|
+
}
|
|
464
495
|
}
|
|
465
496
|
}
|
|
466
497
|
}
|
|
467
|
-
}
|
|
468
|
-
}
|
|
498
|
+
});
|
|
499
|
+
}
|
|
469
500
|
} // }}}
|
|
470
501
|
|
|
471
502
|
function adaptor_update() { //{{{
|
|
@@ -519,24 +550,24 @@ function adaptor_init(url,theme,dslx) { //{{{
|
|
|
519
550
|
});
|
|
520
551
|
$('#graphgrid').css({
|
|
521
552
|
'grid-template-rows': (shift/2) + 'px repeat(' + max.row + ', 1fr) ' + (shift/2) + 'px',
|
|
522
|
-
'grid-template-columns': 'max-content' + (tcolumns.length > 0 ? ' repeat(' + tcolumns.length.toString() + ',max-content)' : '') +
|
|
553
|
+
'grid-template-columns': 'max-content' + (tcolumns.length > 0 ? ' repeat(' + tcolumns.length.toString() + ',max-content)' : '') + ' auto'
|
|
523
554
|
});
|
|
524
555
|
for (var i = 0; i < max.row; i++) {
|
|
525
|
-
for (var j =0; j < tcolumns.length; j++) {
|
|
556
|
+
for (var j = 0; j < tcolumns.length; j++) {
|
|
526
557
|
if (tlabels[i+1] != undefined && tlabels[i+1][j] != undefined && tlabels[i+1][j].label != undefined && tlabels[i+1][j].label != '') {
|
|
527
558
|
var col = tlabels[i+1][j];
|
|
528
|
-
var ele = $('<div class="graphlabel ' + (i % 2 == 0 ? 'odd' : 'even') + '" element-type="' + col.type + '" element-id="' + col.id + '" style="grid-column: ' + (j+2) + '; grid-row: ' + (i+2) + '"><span>' + col.label + '</span></div>');
|
|
529
|
-
graphrealization.illustrator.draw.bind_event(ele,col.type,false);
|
|
559
|
+
var ele = $('<div element-row="' + i + '" class="graphlabel ' + (i % 2 == 0 ? 'odd' : 'even') + '" element-type="' + col.type + '" element-id="' + col.id + '" style="grid-column: ' + (j+2) + '; grid-row: ' + (i+2) + '"><span>' + col.label + '</span></div>');
|
|
560
|
+
graphrealization.illustrator.draw.bind_event(ele, col.type, false);
|
|
530
561
|
$('#graphgrid').append(ele);
|
|
531
562
|
} else {
|
|
532
563
|
if (tcolumncount[tcolumns[j]] != 0) {
|
|
533
|
-
var ele = $('<div class="graphempty ' + (i % 2 == 0 ? 'odd' : 'even') + '" style="grid-column: ' + (j+2) + '; grid-row: ' + (i+2) + '; padding-bottom: ' + shift + 'px"> </div>');
|
|
564
|
+
var ele = $('<div element-row="' + i + '" class="graphempty ' + (i % 2 == 0 ? 'odd' : 'even') + '" style="grid-column: ' + (j+2) + '; grid-row: ' + (i+2) + '; padding-bottom: ' + shift + 'px"> </div>');
|
|
534
565
|
$('#graphgrid').append(ele);
|
|
535
566
|
}
|
|
536
567
|
}
|
|
537
568
|
}
|
|
538
569
|
var j = tcolumns.length;
|
|
539
|
-
var ele = $('<div class="graphlast ' + (i % 2 == 0 ? 'odd' : 'even') + '" style="grid-column: ' + (j+2) + '; grid-row: ' + (i+2) + '; padding-bottom: ' + shift + 'px"> </div>');
|
|
570
|
+
var ele = $('<div element-row="' + i + '" class="graphlast ' + (i % 2 == 0 ? 'odd' : 'even') + '" style="grid-column: ' + (j+2) + '; grid-row: ' + (i+2) + '; padding-bottom: ' + shift + 'px"> </div>');
|
|
540
571
|
$('#graphgrid').append(ele);
|
|
541
572
|
}
|
|
542
573
|
};
|
|
@@ -658,26 +689,64 @@ function monitor_instance_pos() {// {{{
|
|
|
658
689
|
}// }}}
|
|
659
690
|
|
|
660
691
|
function monitor_instance_running(content,event) {// {{{
|
|
661
|
-
if (save['state'] == "stopping") return;
|
|
662
692
|
if (event == "calling") {
|
|
663
|
-
if (!save['
|
|
664
|
-
save['
|
|
693
|
+
if (!save['activity_red_states'][content['activity-uuid']]) {
|
|
694
|
+
save['activity_red_states'][content['activity-uuid']] = true
|
|
665
695
|
format_visual_add(content.activity,"active")
|
|
666
696
|
}
|
|
667
697
|
} else if (event == "manipulating") {
|
|
668
|
-
if (!save['
|
|
669
|
-
save['
|
|
698
|
+
if (!save['activity_red_states'][content['activity-uuid']]) {
|
|
699
|
+
save['activity_red_states'][content['activity-uuid']] = true
|
|
670
700
|
format_visual_add(content.activity,"active")
|
|
671
701
|
}
|
|
672
702
|
} else if (event == "done") {
|
|
673
|
-
if (save['
|
|
674
|
-
|
|
675
|
-
format_visual_remove(content.activity,"active")
|
|
676
|
-
setTimeout(() => {delete save['activity_states'][content['activity-uuid']]},5000);
|
|
703
|
+
if (save['activity_red_states'][content['activity-uuid']]) {
|
|
704
|
+
format_visual_remove(content.activity,"active");
|
|
677
705
|
}
|
|
706
|
+
save['activity_red_states'][content['activity-uuid']] = true
|
|
707
|
+
setTimeout(() => {delete save['activity_red_states'][content['activity-uuid']]},5000);
|
|
708
|
+
}
|
|
709
|
+
} // }}}
|
|
710
|
+
function monitor_instance_pos_change(content) {// {{{
|
|
711
|
+
if (content['at']) {
|
|
712
|
+
$.each(content['at'],function(a,b){
|
|
713
|
+
if (!save['activity_blue_states'][b.uuid]) {
|
|
714
|
+
save['activity_blue_states'][b.uuid] = true
|
|
715
|
+
format_visual_add(b.position,"passive");
|
|
716
|
+
}
|
|
717
|
+
});
|
|
718
|
+
}
|
|
719
|
+
if (content['after']) {
|
|
720
|
+
$.each(content['after'],function(a,b){
|
|
721
|
+
if (!save['activity_blue_states'][b.uuid]) {
|
|
722
|
+
save['activity_blue_states'][b.uuid] = true
|
|
723
|
+
format_visual_add(b.position,"passive");
|
|
724
|
+
}
|
|
725
|
+
});
|
|
726
|
+
}
|
|
727
|
+
if (content['unmark']) {
|
|
728
|
+
$.each(content['unmark'],function(a,b){
|
|
729
|
+
if (save['activity_blue_states'][b.uuid]) {
|
|
730
|
+
format_visual_remove(b.position,"passive")
|
|
731
|
+
}
|
|
732
|
+
save['activity_blue_states'][b.uuid] = true
|
|
733
|
+
setTimeout(() => {delete save['activity_blue_states'][b.uuid]},5000);
|
|
734
|
+
});
|
|
735
|
+
}
|
|
736
|
+
if (!content['at'] && !content['unmark'] && !content['after'] && !content['wait']) {
|
|
737
|
+
monitor_instance_pos();
|
|
678
738
|
}
|
|
679
739
|
} // }}}
|
|
740
|
+
|
|
741
|
+
|
|
680
742
|
function monitor_instance_state_change(notification) { //{{{
|
|
743
|
+
// sometimes, out of sheer network routingness, stopping comes after stopped, which fucks the UI hard
|
|
744
|
+
// thus, we are having none of it
|
|
745
|
+
if (notification == 'stopping' && save['states']['stopping'] - save['states']['stopped'] < 10)
|
|
746
|
+
notification = 'stopped';
|
|
747
|
+
if (notification == 'stopping' && save['state'] == 'stopped')
|
|
748
|
+
return;
|
|
749
|
+
|
|
681
750
|
if ($('#trackcolumn').length > 0) {
|
|
682
751
|
if (notification == "finished" || notification == "abandoned") {
|
|
683
752
|
parent.closeIFrame(window.location.search);
|
|
@@ -687,19 +756,15 @@ function monitor_instance_state_change(notification) { //{{{
|
|
|
687
756
|
$("#state button").removeAttr('disabled');
|
|
688
757
|
}
|
|
689
758
|
|
|
690
|
-
// sometimes, out of sheer network routingness, stopping comes after stopped, which fucks the UI hard
|
|
691
|
-
// thus, we are having none of it
|
|
692
|
-
if (notification == 'stopping' && save['state'] == 'stopped')
|
|
693
|
-
return;
|
|
694
759
|
if (notification != save['state']) {
|
|
695
760
|
save['state'] = notification;
|
|
696
761
|
|
|
697
762
|
if (notification == "stopped") {
|
|
698
763
|
monitor_instance_pos();
|
|
699
764
|
}
|
|
700
|
-
if (notification == "running") {
|
|
701
|
-
|
|
702
|
-
}
|
|
765
|
+
// if (notification == "running") {
|
|
766
|
+
// format_visual_clear();
|
|
767
|
+
// }
|
|
703
768
|
|
|
704
769
|
var but = "";
|
|
705
770
|
if (notification == "ready" || notification == "stopped") {
|
|
@@ -739,22 +804,6 @@ function monitor_instance_state_change(notification) { //{{{
|
|
|
739
804
|
$("#state_text").text(notification);
|
|
740
805
|
}
|
|
741
806
|
} //}}}
|
|
742
|
-
function monitor_instance_pos_change(content) {// {{{
|
|
743
|
-
if (content['unmark']) {
|
|
744
|
-
$.each(content['unmark'],function(a,b){
|
|
745
|
-
format_visual_remove(b.position,"passive")
|
|
746
|
-
});
|
|
747
|
-
}
|
|
748
|
-
if (content['at']) {
|
|
749
|
-
$.each(content['at'],function(a,b){
|
|
750
|
-
format_visual_add(b.position,"passive");
|
|
751
|
-
});
|
|
752
|
-
}
|
|
753
|
-
if (!content['at'] && !content['unmark'] && !content['after'] && !content['wait']) {
|
|
754
|
-
monitor_instance_pos();
|
|
755
|
-
}
|
|
756
|
-
} // }}}
|
|
757
|
-
|
|
758
807
|
function monitor_instance_vote_add(parts) {// {{{
|
|
759
808
|
var ctv = $("#votes");
|
|
760
809
|
|
|
@@ -1194,9 +1243,10 @@ function format_visual_remove(what,cls) {//{{{
|
|
|
1194
1243
|
}//}}}
|
|
1195
1244
|
|
|
1196
1245
|
function scroll_into_view(what) { //{{{
|
|
1197
|
-
|
|
1246
|
+
if (save['state'] != "running") return;
|
|
1247
|
+
var tcontainer = $('#graphcolumn')[0];
|
|
1198
1248
|
if ($('g[element-id="' + what + '"]').length > 0) {
|
|
1199
|
-
var telement
|
|
1249
|
+
var telement = $('g[element-id="' + what + '"]')[0].getBBox().y;
|
|
1200
1250
|
if (tcontainer.scrollTop > telement) {
|
|
1201
1251
|
tcontainer.scroll( { top: telement - 5, behavior: 'smooth' } );
|
|
1202
1252
|
}
|
|
@@ -1390,12 +1440,12 @@ function ui_pos(e,bl) {
|
|
|
1390
1440
|
var url = $('body').attr('current-instance');
|
|
1391
1441
|
var coll = [];
|
|
1392
1442
|
$('g.element.primitive > g.activities.active, g.element.primitive > g.activities.passive').each(function(a,b){
|
|
1393
|
-
coll.push($(b).parent().attr('element-id'));
|
|
1443
|
+
coll.push([$(b).parent().attr('element-id'), $(b).parent().attr('element-type') == 'stop' ? 'after' : 'at']);
|
|
1394
1444
|
});
|
|
1395
1445
|
coll = bl(coll);
|
|
1396
1446
|
var vals = "";
|
|
1397
1447
|
$(coll).each(function(k,ele){
|
|
1398
|
-
vals += "<" + ele + ">
|
|
1448
|
+
vals += "<" + ele[0] + ">" + ele[1] + "</" + ele[0] + ">";
|
|
1399
1449
|
});
|
|
1400
1450
|
vals = "<positions xmlns='http://cpee.org/ns/properties/2.0'>" + vals + "</positions>";
|
|
1401
1451
|
$.ajax({
|
|
@@ -1413,13 +1463,13 @@ function ui_pos(e,bl) {
|
|
|
1413
1463
|
}
|
|
1414
1464
|
function del_ui_pos(e) {
|
|
1415
1465
|
ui_pos(e,function(coll){
|
|
1416
|
-
coll.splice(coll.
|
|
1466
|
+
coll.splice(coll.findIndex((ele)=>ele[0] == $(e).attr('id')),1);
|
|
1417
1467
|
return coll;
|
|
1418
1468
|
});
|
|
1419
1469
|
}
|
|
1420
1470
|
function add_ui_pos(e) {
|
|
1421
1471
|
ui_pos(e,function(coll){
|
|
1422
|
-
coll.push($(e).attr('id'));
|
|
1472
|
+
coll.push([$(e).attr('id'), e.nodeName == 'stop' ? 'after' : 'at']);
|
|
1423
1473
|
return coll;
|
|
1424
1474
|
});
|
|
1425
1475
|
}
|
data/cockpit/js/wfadaptor.js
CHANGED
|
@@ -217,9 +217,13 @@ function WfIllustrator(wf_adaptor) { // View {{{
|
|
|
217
217
|
} // }}}
|
|
218
218
|
// }}}
|
|
219
219
|
// Helper Functions {{{
|
|
220
|
+
var get_y = this.draw.get_y = function (row) { // {{{
|
|
221
|
+
return { y: row * self.height - self.height, height_shift: self.height_shift};
|
|
222
|
+
} // }}}
|
|
223
|
+
|
|
220
224
|
var draw_stripe = this.draw.draw_stripe = function (row, maxcol) { // {{{
|
|
221
225
|
if (maxcol < 1) maxcol = 1;
|
|
222
|
-
var g = $X('<rect class="stripe ' + (row % 2 == 0 ? 'even' : 'odd') + '" x="0" y="' + String(row*self.height+self.height_shift/2) + '" width="' + (self.width * maxcol + self.width - self.width_shift) + '" height="' + (self.height) + '" xmlns="http://www.w3.org/2000/svg"></rect>');
|
|
226
|
+
var g = $X('<rect element-row="' + row + '" class="stripe ' + (row % 2 == 0 ? 'even' : 'odd') + '" x="0" y="' + String(row*self.height+self.height_shift/2) + '" width="' + (self.width * maxcol + self.width - self.width_shift) + '" height="' + (self.height) + '" xmlns="http://www.w3.org/2000/svg"></rect>');
|
|
223
227
|
self.svg.container.prepend(g);
|
|
224
228
|
return g;
|
|
225
229
|
} // }}}
|
|
@@ -366,16 +370,16 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
|
366
370
|
|
|
367
371
|
// Set Labels //{{{
|
|
368
372
|
this.set_labels = function(graph) {
|
|
369
|
-
if (illustrator.compact == false) {
|
|
370
|
-
adaptor.draw_labels(graph.max,labels,illustrator.height_shift,illustrator.striped == true ? true : false);
|
|
371
|
-
} else {
|
|
372
|
-
adaptor.draw_labels(graph.max,[],illustrator.height_shift,false);
|
|
373
|
-
}
|
|
374
373
|
if (illustrator.striped == true && illustrator.compact == false) {
|
|
375
374
|
for (var i=0; i < graph.max.row; i++) {
|
|
376
375
|
illustrator.draw.draw_stripe(i,graph.max.col);
|
|
377
376
|
}
|
|
378
377
|
}
|
|
378
|
+
if (illustrator.compact == false) {
|
|
379
|
+
adaptor.draw_labels(graph.max,labels,illustrator.height_shift,illustrator.striped == true ? true : false);
|
|
380
|
+
} else {
|
|
381
|
+
adaptor.draw_labels(graph.max,[],illustrator.height_shift,false);
|
|
382
|
+
}
|
|
379
383
|
if (illustrator.compact == false) {
|
|
380
384
|
if (labels.length > 0) {
|
|
381
385
|
_.each(labels,function(a,key) {
|
|
@@ -402,9 +406,9 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
|
402
406
|
labels = [];
|
|
403
407
|
illustrator.clear();
|
|
404
408
|
var graph = parse(description.children('description').get(0), {'row':0,'col':0,final:false,wide:false});
|
|
405
|
-
self.set_labels(graph);
|
|
406
|
-
// set labels
|
|
407
409
|
illustrator.set_svg(graph);
|
|
410
|
+
// set labels
|
|
411
|
+
self.set_labels(graph);
|
|
408
412
|
} // }}}
|
|
409
413
|
var gd = this.get_description = function() { // public {{{
|
|
410
414
|
var serxml = $(description.get(0).documentElement).clone(true);
|
|
@@ -454,9 +458,9 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
|
454
458
|
labels = [];
|
|
455
459
|
illustrator.clear();
|
|
456
460
|
var graph = parse(description.children('description').get(0), {'row':0,'col':0});
|
|
457
|
-
self.set_labels(graph);
|
|
458
|
-
// set labels
|
|
459
461
|
illustrator.set_svg(graph);
|
|
462
|
+
// set labels
|
|
463
|
+
self.set_labels(graph);
|
|
460
464
|
doit(self);
|
|
461
465
|
}
|
|
462
466
|
var update = this.update = function(svgid) { // {{{
|
|
@@ -465,8 +469,8 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
|
465
469
|
labels = [];
|
|
466
470
|
illustrator.clear();
|
|
467
471
|
var graph = parse(description.children('description').get(0), {'row':0,'col':0});
|
|
468
|
-
self.set_labels(graph);
|
|
469
472
|
illustrator.set_svg(graph);
|
|
473
|
+
self.set_labels(graph);
|
|
470
474
|
}
|
|
471
475
|
|
|
472
476
|
var newn = $('*[new=true]',description);
|
|
@@ -563,9 +567,10 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
|
563
567
|
$(root).attr('svg-subtype','description');
|
|
564
568
|
group.attr('element-id','group-description');
|
|
565
569
|
if (illustrator.elements[sname].label) {
|
|
566
|
-
|
|
570
|
+
// javascript object spread syntax is my new weird crush - the JS designers must be serious people
|
|
571
|
+
labels.push({...{row: pos.row, element_id: 'start', tname: 'start', label: illustrator.elements[sname].label(root)},...illustrator.draw.get_y(pos.row)});
|
|
567
572
|
}
|
|
568
|
-
illustrator.draw.draw_symbol(
|
|
573
|
+
illustrator.draw.draw_symbol(sname, 'description', 'START', pos.row, pos.col, group);
|
|
569
574
|
} // }}}
|
|
570
575
|
|
|
571
576
|
$(root).children().filter(function(){ return this.localName[0] != '_'; }).each(function() {
|
|
@@ -658,6 +663,7 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
|
658
663
|
else if(typeof illustrator.elements[tname].resolve_symbol == 'function') {sname = illustrator.elements[tname].resolve_symbol(context,illustrator.elements[tname].col_shift ? illustrator.elements[tname].col_shift(context) : undefined);}
|
|
659
664
|
else if(typeof illustrator.elements[tname].resolve_symbol == 'string') {sname = illustrator.elements[tname].resolve_symbol;}
|
|
660
665
|
else {sname = tname;}
|
|
666
|
+
if (sname == null) {sname = tname;}
|
|
661
667
|
return sname;
|
|
662
668
|
} //}}}
|
|
663
669
|
var set_details = function(tname,sname,pos,context,simple) { //{{{
|
|
@@ -674,7 +680,7 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
|
674
680
|
if (lab && lab[0] && lab[0].value && lab[0].column == 'Label' && lab[0].value != '') {
|
|
675
681
|
$(context).attr('svg-label', lab[0].value);
|
|
676
682
|
}
|
|
677
|
-
labels.push({row: pos.row, element_id: $(context).attr('svg-id'), tname: tname, label: lab});
|
|
683
|
+
labels.push({...{row: pos.row, element_id: $(context).attr('svg-id'), tname: tname, label: lab},...illustrator.draw.get_y(pos.row)});
|
|
678
684
|
}
|
|
679
685
|
} //}}}
|
|
680
686
|
var draw_position = function(tname,pos,prev,block,group,endnodes,context,second) { // private {{{
|
data/cockpit/js_libs.zip
ADDED
|
Binary file
|