cpee 2.0.9 → 2.0.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (152) hide show
  1. checksums.yaml +4 -4
  2. data/cockpit/config.json +3 -0
  3. data/cockpit/css/track.css +24 -6
  4. data/cockpit/css/ui.css +5 -2
  5. data/cockpit/css/wfadaptor.css +1 -1
  6. data/cockpit/edit.html +1 -0
  7. data/cockpit/index.html +3 -2
  8. data/cockpit/js/instance.js +82 -55
  9. data/cockpit/js/model.js +1 -1
  10. data/cockpit/js/track.js +10 -0
  11. data/cockpit/js/ui.js +47 -16
  12. data/cockpit/templates/Track Test Local.xml +82 -0
  13. data/cockpit/templates/Track Test.xml +82 -0
  14. data/cockpit/templates/{BPM 2020 Manual Adjust.xml → UR-VUE 2020 Manual Adjust.xml } +1 -1
  15. data/cockpit/templates/{BPM 2020 Solution Baseline.xml → UR-VUE 2020 Solution Baseline.xml } +10 -3
  16. data/cockpit/templates/{BPM 2020 Solution NN.xml → UR-VUE 2020 Solution NN.xml } +1 -1
  17. data/cockpit/templates/{BPM 2020 Solution View.xml → UR-VUE 2020 Solution View.xml } +8 -1
  18. data/cockpit/templates/UR-VUE 2020.xml +26 -0
  19. data/cockpit/templates/instantiate.local/Take_Sub.xml +59 -0
  20. data/cockpit/templates/instantiate/Take_Perf.xml +46 -0
  21. data/cockpit/templates/instantiate/Take_Sub.xml +58 -0
  22. data/cockpit/templates/instantiate/Take_X.xml +48 -0
  23. data/cockpit/themes/compact/rngs/call.rng +5 -0
  24. data/cockpit/themes/compact/rngs/callmanipulate.rng +6 -1
  25. data/cockpit/themes/compact/rngs/closed_loop.rng +59 -0
  26. data/cockpit/themes/compact/rngs/closed_loop_cancel.rng +5 -0
  27. data/cockpit/themes/compact/rngs/closed_loop_control.rng +28 -0
  28. data/cockpit/themes/compact/rngs/closed_loop_measuring.rng +9 -0
  29. data/cockpit/themes/compact/rngs/loop.rng +1 -1
  30. data/cockpit/themes/compact/rngs/parallel.rng +1 -1
  31. data/cockpit/themes/compact/symbols/closed_loop.svg +5 -0
  32. data/cockpit/themes/compact/symbols/closed_loop_cancel.svg +5 -0
  33. data/cockpit/themes/compact/symbols/closed_loop_control.svg +5 -0
  34. data/cockpit/themes/compact/symbols/closed_loop_measuring.svg +6 -0
  35. data/cockpit/themes/default/rngs/call.rng +5 -0
  36. data/cockpit/themes/default/rngs/callmanipulate.rng +6 -1
  37. data/cockpit/themes/default/rngs/closed_loop.rng +59 -0
  38. data/cockpit/themes/default/rngs/closed_loop_cancel.rng +5 -0
  39. data/cockpit/themes/default/rngs/closed_loop_control.rng +28 -0
  40. data/cockpit/themes/default/rngs/closed_loop_measuring.rng +9 -0
  41. data/cockpit/themes/default/rngs/loop.rng +1 -1
  42. data/cockpit/themes/default/rngs/parallel.rng +1 -1
  43. data/cockpit/themes/default/symbols/closed_loop.svg +5 -0
  44. data/cockpit/themes/default/symbols/closed_loop_cancel.svg +5 -0
  45. data/cockpit/themes/default/symbols/closed_loop_control.svg +5 -0
  46. data/cockpit/themes/default/symbols/closed_loop_measuring.svg +6 -0
  47. data/cockpit/themes/diana/rngs/alternative.rng +25 -0
  48. data/cockpit/themes/diana/rngs/call.rng +122 -0
  49. data/cockpit/themes/diana/rngs/callmanipulate.rng +145 -0
  50. data/cockpit/themes/diana/rngs/choose.rng +14 -0
  51. data/cockpit/themes/diana/rngs/closed_loop.rng +59 -0
  52. data/cockpit/themes/diana/rngs/closed_loop_cancel.rng +5 -0
  53. data/cockpit/themes/diana/rngs/closed_loop_control.rng +28 -0
  54. data/cockpit/themes/diana/rngs/closed_loop_measuring.rng +9 -0
  55. data/cockpit/themes/diana/rngs/critical.rng +5 -0
  56. data/cockpit/themes/diana/rngs/escape.rng +1 -0
  57. data/cockpit/themes/diana/rngs/group.rng +3 -0
  58. data/cockpit/themes/diana/rngs/loop.rng +22 -0
  59. data/cockpit/themes/diana/rngs/manipulate.rng +9 -0
  60. data/cockpit/themes/diana/rngs/otherwise.rng +22 -0
  61. data/cockpit/themes/diana/rngs/parallel.rng +21 -0
  62. data/cockpit/themes/diana/rngs/parallel_branch.rng +8 -0
  63. data/cockpit/themes/diana/rngs/scripts.rng +23 -0
  64. data/cockpit/themes/diana/rngs/stop.rng +5 -0
  65. data/cockpit/themes/diana/rngs/terminate.rng +1 -0
  66. data/cockpit/themes/diana/symbols/alternative.svg +5 -0
  67. data/cockpit/themes/diana/symbols/arrow.svg +3 -0
  68. data/cockpit/themes/diana/symbols/call.svg +6 -0
  69. data/cockpit/themes/diana/symbols/callmanipulate.svg +8 -0
  70. data/cockpit/themes/diana/symbols/choose.svg +5 -0
  71. data/cockpit/themes/diana/symbols/choose_exclusive.svg +5 -0
  72. data/cockpit/themes/diana/symbols/choose_inclusive.svg +4 -0
  73. data/cockpit/themes/diana/symbols/closed_loop.svg +5 -0
  74. data/cockpit/themes/diana/symbols/closed_loop_cancel.svg +5 -0
  75. data/cockpit/themes/diana/symbols/closed_loop_control.svg +5 -0
  76. data/cockpit/themes/diana/symbols/closed_loop_measuring.svg +6 -0
  77. data/cockpit/themes/diana/symbols/complex.svg +8 -0
  78. data/cockpit/themes/diana/symbols/critical.svg +4 -0
  79. data/cockpit/themes/diana/symbols/end.svg +3 -0
  80. data/cockpit/themes/diana/symbols/escape.svg +5 -0
  81. data/cockpit/themes/diana/symbols/event_end.svg +3 -0
  82. data/cockpit/themes/diana/symbols/loop.svg +5 -0
  83. data/cockpit/themes/diana/symbols/manipulate.svg +4 -0
  84. data/cockpit/themes/diana/symbols/otherwise.svg +5 -0
  85. data/cockpit/themes/diana/symbols/parallel.svg +5 -0
  86. data/cockpit/themes/diana/symbols/parallel_branch.svg +5 -0
  87. data/cockpit/themes/diana/symbols/parallel_branch_compact.svg +4 -0
  88. data/cockpit/themes/diana/symbols/parallel_branch_event.svg +14 -0
  89. data/cockpit/themes/diana/symbols/parallel_branch_normal.svg +5 -0
  90. data/cockpit/themes/diana/symbols/scripts.svg +4 -0
  91. data/cockpit/themes/diana/symbols/start.svg +3 -0
  92. data/cockpit/themes/diana/symbols/stop.svg +5 -0
  93. data/cockpit/themes/diana/symbols/terminate.svg +4 -0
  94. data/cockpit/themes/diana/theme.js +1650 -0
  95. data/cockpit/themes/extended/rngs/call.rng +5 -0
  96. data/cockpit/themes/extended/rngs/callmanipulate.rng +6 -1
  97. data/cockpit/themes/extended/rngs/closed_loop.rng +59 -0
  98. data/cockpit/themes/extended/rngs/closed_loop_cancel.rng +5 -0
  99. data/cockpit/themes/extended/rngs/closed_loop_control.rng +28 -0
  100. data/cockpit/themes/extended/rngs/closed_loop_measuring.rng +9 -0
  101. data/cockpit/themes/extended/rngs/loop.rng +1 -1
  102. data/cockpit/themes/extended/rngs/parallel.rng +1 -1
  103. data/cockpit/themes/extended/symbols/closed_loop.svg +5 -0
  104. data/cockpit/themes/extended/symbols/closed_loop_cancel.svg +5 -0
  105. data/cockpit/themes/extended/symbols/closed_loop_control.svg +5 -0
  106. data/cockpit/themes/extended/symbols/closed_loop_measuring.svg +6 -0
  107. data/cockpit/themes/extended/theme.js +4 -0
  108. data/cockpit/themes/model/symbols/closed_loop.svg +5 -0
  109. data/cockpit/themes/model/symbols/closed_loop_cancel.svg +5 -0
  110. data/cockpit/themes/model/symbols/closed_loop_control.svg +5 -0
  111. data/cockpit/themes/model/symbols/closed_loop_measuring.svg +6 -0
  112. data/cockpit/themes/packed/rngs/call.rng +5 -0
  113. data/cockpit/themes/packed/rngs/callmanipulate.rng +6 -1
  114. data/cockpit/themes/packed/rngs/closed_loop.rng +59 -0
  115. data/cockpit/themes/packed/rngs/closed_loop_cancel.rng +5 -0
  116. data/cockpit/themes/packed/rngs/closed_loop_control.rng +28 -0
  117. data/cockpit/themes/packed/rngs/closed_loop_measuring.rng +9 -0
  118. data/cockpit/themes/packed/rngs/loop.rng +1 -1
  119. data/cockpit/themes/packed/rngs/parallel.rng +1 -1
  120. data/cockpit/themes/packed/symbols/closed_loop.svg +5 -0
  121. data/cockpit/themes/packed/symbols/closed_loop_cancel.svg +5 -0
  122. data/cockpit/themes/packed/symbols/closed_loop_control.svg +5 -0
  123. data/cockpit/themes/packed/symbols/closed_loop_measuring.svg +6 -0
  124. data/cockpit/themes/preset/rngs/call.rng +5 -0
  125. data/cockpit/themes/preset/rngs/callmanipulate.rng +6 -1
  126. data/cockpit/themes/preset/rngs/closed_loop.rng +59 -0
  127. data/cockpit/themes/preset/rngs/closed_loop_cancel.rng +5 -0
  128. data/cockpit/themes/preset/rngs/closed_loop_control.rng +28 -0
  129. data/cockpit/themes/preset/rngs/closed_loop_measuring.rng +9 -0
  130. data/cockpit/themes/preset/rngs/loop.rng +1 -1
  131. data/cockpit/themes/preset/rngs/parallel.rng +1 -1
  132. data/cockpit/themes/preset/symbols/closed_loop.svg +5 -0
  133. data/cockpit/themes/preset/symbols/closed_loop_cancel.svg +5 -0
  134. data/cockpit/themes/preset/symbols/closed_loop_control.svg +5 -0
  135. data/cockpit/themes/preset/symbols/closed_loop_measuring.svg +6 -0
  136. data/cockpit/track.html +37 -8
  137. data/cpee.gemspec +2 -2
  138. data/lib/cpee/controller.rb +3 -2
  139. data/lib/cpee/implementation.rb +14 -5
  140. data/lib/cpee/implementation_notifications.rb +80 -51
  141. data/lib/cpee/implementation_properties.rb +5 -2
  142. data/lib/cpee/persistence.rb +3 -0
  143. data/server/handlerwrappers/default.rb +4 -5
  144. data/server/routing/forward-events.rb +2 -1
  145. data/server/routing/forward-votes.rb +6 -2
  146. data/server/server.conf +4 -0
  147. data/tools/cpee +7 -8
  148. data/tools/server/server.rb +1 -0
  149. metadata +110 -11
  150. data/cockpit/templates/BPM 2020.xml +0 -26
  151. data/cockpit/templates/convert_cpee2.rb +0 -15
  152. data/cockpit/themes/convert_cpee2.rb +0 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 811f6ba4e6ef11aa5de45fb30c400e05b061413912dfe2395d3e49f54e1bb0e8
4
- data.tar.gz: 18d970c9e70317eb063d60e35fb9df8714e1692f5b374a3b1ad9fa7ba8750993
3
+ metadata.gz: bcc2914034c068617935d34e6fbef9702d4707465e1b5643be0d94ed9a6ff81d
4
+ data.tar.gz: 569ac606a86cac5d9cc1026c79362f61125c3938a821ac2dab19263b21cb0291
5
5
  SHA512:
6
- metadata.gz: 151b7914bc3823b202df188d8f444a76bfcd1fa175e6fde33dbb4e0b33cddfe094bf72929f9b9b460523a50195fe573b610a38b1b4e9a87cb8c2e0bb6efb44d1
7
- data.tar.gz: 8cec770c49dcbdd614bde9d4d5c5aa788d24660d5ca1ed09af87957abd320512313dbe2b0afae14646ebf316695be4094ca902ed0da64385eb78c5aaaf3c9dfb
6
+ metadata.gz: deee6aa33e4038728143d3f120d418327220f741ef2c0bd1fc87b80a7b2e75d430a075605f386b3af7747e2af0852993d24027cd4702a0b679534c2809befd45
7
+ data.tar.gz: a5bb1384576ee78ac6074e192bc989fb1166185c95fc1bcaac506ae597db6576ebc68586c8b2614cf282049f7b2701a974079c56d2d5ff1c10d8b4c826a36b17
@@ -0,0 +1,3 @@
1
+ {
2
+ "res-url": "https://cpee.org/flow/resources/"
3
+ }
@@ -5,11 +5,16 @@
5
5
  height: 100vh;
6
6
  }
7
7
  #graphcolumn {
8
- flex: 0 0 auto;
9
- overflow: auto;
10
- min-width: 35em;
8
+ flex: 0 1 auto;
9
+ width: 35em;
10
+ min-width: 15em;
11
11
  border-right: 0 none;
12
+ overflow: auto;
13
+ }
14
+ #graphcolumn.resize {
15
+ resize: horizontal;
12
16
  }
17
+
13
18
  #trackcolumn {
14
19
  flex: 1 1 auto;
15
20
  display: flex;
@@ -24,19 +29,32 @@
24
29
  margin: 0;
25
30
  border-left: 0.1em solid var(--x-ui-border-color);
26
31
  border-bottom: 0.1em solid var(--x-ui-border-color);
32
+ overflow: scroll;
27
33
  }
28
34
 
29
- #usage {
35
+ #trackusage {
30
36
  line-height: 2em;
31
37
  margin-top: 0.5em;
32
38
  margin-left: 2em;
33
39
  margin-right: 1em;
34
40
  }
35
- #usage button{
41
+ #trackusage button {
36
42
  width: 2em;
37
43
  height: 2em;
38
- vertical-align: center;
44
+ vertical-align: middle;
39
45
  }
40
46
  #current-instance[href]:after {
41
47
  content: "";
42
48
  }
49
+
50
+ #tracktitle {
51
+ white-space: nowrap;
52
+ margin-bottom: 0.1em;
53
+ }
54
+
55
+ #current-log[href]:before {
56
+ content: "[";
57
+ }
58
+ #current-log[href]:after {
59
+ content: "]";
60
+ }
@@ -66,8 +66,6 @@ body {
66
66
  font: normal normal normal 14px/1 FontAwesome;
67
67
  font-size: 0.8em;
68
68
  text-rendering: auto;
69
- -webkit-font-smoothing: antialiased;
70
- -moz-osx-font-smoothing: grayscale;
71
69
  content: ' ';
72
70
  }
73
71
  #graphgrid .graphlabel.selected a::after, graphgrid .graphlabel.hover a::after {
@@ -104,6 +102,9 @@ ui-tabbed ui-tabbar ui-behind button {
104
102
  #current-instance-subscriptions[href]:after {
105
103
  content: "|";
106
104
  }
105
+ #current-graph[href]:before {
106
+ content: "|";
107
+ }
107
108
 
108
109
  #parameters ui-content { height: 8.5em; min-height: 1.7em; }
109
110
 
@@ -142,6 +143,8 @@ ui-tabbed ui-tabbar ui-behind button {
142
143
 
143
144
  #areaexecution table.x-ui-compact tbody.exe td { height: 2.2em; }
144
145
 
146
+ #arealog > div { padding-left: 1em; padding-top: 1em; }
147
+
145
148
  #dat_endpoints {
146
149
  border-collapse:collapse;
147
150
  border-spacing:0;
@@ -338,7 +338,7 @@ svg text.label {
338
338
  text-align:center;
339
339
  line-height:125%;
340
340
  writing-mode:horizontal-tb;
341
- text-anchor:left;
341
+ text-anchor:start;
342
342
  color: var(--wfadaptor-base);
343
343
  fill: var(--wfadaptor-base);
344
344
  fill-opacity:1;
@@ -0,0 +1 @@
1
+ cockpit/index.html
@@ -121,7 +121,7 @@
121
121
  <ui-tab class="" data-tab="new" id="tabnew" >New</ui-tab>
122
122
  <ui-tab class="inactive hidden" data-tab="instance" id="tabinstance" >Instance</ui-tab>
123
123
  <ui-tab class="inactive hidden" data-tab="execution" id="tabexecution">Execution</ui-tab>
124
- <ui-behind ><a id='current-instance'></a><a id='current-instance-properties'></a><a id='current-instance-subscriptions'></a><a id='current-instance-callbacks'></a></ui-behind>
124
+ <ui-behind ><a style='display:none' target='_blank' id='current-instance'></a><a style='display:none' target='_blank' id='current-instance-properties'>P</a><a style='display:none' target='_blank' id='current-instance-subscriptions'>S</a><a style='display:none' target='_blank' id='current-instance-callbacks'>C</a></ui-behind>
125
125
  </ui-tabbar>
126
126
  <ui-content>
127
127
  <ui-area data-belongs-to-tab="new" id="areanew"> <!--{{{-->
@@ -234,7 +234,7 @@
234
234
  <ui-tab class="" data-tab="details" id="tabdetails">Graph</ui-tab>
235
235
  <ui-tab class="inactive" data-tab="dsl" id="tabdsl" >Description</ui-tab>
236
236
  <ui-tab class="inactive" data-tab="log" id="tablog" >Log</ui-tab>
237
- <ui-behind ></ui-behind>
237
+ <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>
238
238
  </ui-tabbar>
239
239
  <ui-content>
240
240
  <ui-area data-belongs-to-tab="details" id='graphcolumn'>
@@ -248,6 +248,7 @@
248
248
  </ui-area>
249
249
  <ui-area data-belongs-to-tab="dsl" id="areadsl" class="inactive"></ui-area>
250
250
  <ui-area data-belongs-to-tab="log" id="arealog" class="inactive"> <!--{{{-->
251
+ <div>Persistent Log: <a style='display:none' target='_blank' id='current-log'></a></div>
251
252
  <table id="dat_log" class="x-ui-layout"></table>
252
253
  </ui-area> <!--}}}-->
253
254
  </ui-content>
@@ -251,56 +251,60 @@ function create_instance(base,name,load,exec) {// {{{
251
251
 
252
252
  function sse() { //{{{
253
253
  var url = $('body').attr('current-instance');
254
- es = new EventSource(url + "/notifications/subscriptions/" + subscription + "/sse/");
255
- es.onopen = function() {
256
- append_to_log("monitoring", "opened", "");
257
- };
258
- es.onmessage = function(e) {
259
- data = JSON.parse(e.data);
260
- if (data['type'] == 'event') {
261
- switch(data['topic']) {
262
- case 'dataelements':
263
- monitor_instance_values("dataelements");
264
- break;
265
- case 'description':
266
- monitor_instance_dsl();
267
- break;
268
- case 'endpoints':
269
- monitor_instance_values("endpoints");
270
- break;
271
- case 'attributes':
272
- monitor_instance_values("attributes");
273
- monitor_instance_transformation();
274
- if (!suspended_monitoring) { // or else it would load twice, because dsl changes also trigger
275
- monitor_graph_change(true);
276
- }
277
- break;
278
- case 'task':
279
- if ($('#trackcolumn').length > 0) {
280
- $('#trackcolumn').append($('<iframe src="track.html?monitor=' + data.content.received['CPEE-INSTANCE-URL'].replace(/\/*$/,'/') + '"></iframe>'));
281
- }
282
- break;
283
- case 'state':
284
- monitor_instance_state_change(data['content']['state']);
285
- break;
286
- case 'position':
287
- monitor_instance_pos_change(data['content']);
288
- break;
289
- case 'activity':
290
- monitor_instance_running(data['content'],data['name']);
291
- break;
254
+ if (subscription) {
255
+ es = new EventSource(url + "/notifications/subscriptions/" + subscription + "/sse/");
256
+ es.onopen = function() {
257
+ append_to_log("monitoring", "opened", "nice.");
258
+ };
259
+ es.onmessage = function(e) {
260
+ data = JSON.parse(e.data);
261
+ if (data['type'] == 'event') {
262
+ switch(data['topic']) {
263
+ case 'dataelements':
264
+ monitor_instance_values("dataelements");
265
+ break;
266
+ case 'description':
267
+ monitor_instance_dsl();
268
+ break;
269
+ case 'endpoints':
270
+ monitor_instance_values("endpoints");
271
+ break;
272
+ case 'attributes':
273
+ monitor_instance_values("attributes");
274
+ monitor_instance_transformation();
275
+ if (!suspended_monitoring) { // or else it would load twice, because dsl changes also trigger
276
+ if (save['graph_theme'] != data.content.values.theme) {
277
+ monitor_graph_change(true);
278
+ }
279
+ }
280
+ break;
281
+ case 'task':
282
+ if ($('#trackcolumn').length > 0) {
283
+ $('#trackcolumn').append($('<iframe src="track.html?monitor=' + data.content.received['CPEE-INSTANCE-URL'].replace(/\/*$/,'/') + '"></iframe>'));
284
+ $('#graphcolumn').addClass('resize');
285
+ }
286
+ break;
287
+ case 'state':
288
+ monitor_instance_state_change(data['content']['state']);
289
+ break;
290
+ case 'position':
291
+ monitor_instance_pos_change(data['content']);
292
+ break;
293
+ case 'activity':
294
+ monitor_instance_running(data['content'],data['name']);
295
+ break;
296
+ }
292
297
  }
293
- }
294
- if (data['type'] == 'vote') {
295
- monitor_instance_vote_add(data['content']);
296
- }
297
- append_to_log(data['type'], data['topic'] + '/' + data['name'], JSON.stringify(data['content']));
298
- };
299
- es.onerror = function() {
300
- append_to_log("monitoring", "closed", "server down i assume.");
301
- // setTimeout(sse,10000);
302
- };
303
-
298
+ if (data['type'] == 'vote') {
299
+ monitor_instance_vote_add(data['content']);
300
+ }
301
+ append_to_log(data['type'], data['topic'] + '/' + data['name'], JSON.stringify(data['content']));
302
+ };
303
+ es.onerror = function() {
304
+ append_to_log("monitoring", "closed", "finished or abandoned or not existing or server down. one of these, i assume.");
305
+ // setTimeout(sse,10000);
306
+ };
307
+ }
304
308
  monitor_instance_values("dataelements");
305
309
  monitor_instance_values("endpoints");
306
310
  monitor_instance_values("attributes");
@@ -334,14 +338,21 @@ function monitor_instance(cin,rep,load,exec) {// {{{
334
338
  $("ui-tabbed ui-tab.hidden, ui-rest ui-tab.hidden").removeClass("hidden");
335
339
 
336
340
  // Change url to return to current instance when reloading
337
- $("#current-instance").text(url);
341
+ $("#current-instance").show();
342
+ $("#current-instance").text(url.match(/(\d+)\/?$/)[1]);
338
343
  $("#current-instance").attr('href',url);
344
+ $("#current-instance-properties").show();
339
345
  $("#current-instance-properties").attr('href',url + 'properties/');
340
- $("#current-instance-properties").text('P');
346
+ $("#current-instance-subscriptions").show();
341
347
  $("#current-instance-subscriptions").attr('href',url + 'notifications/subscriptions/');
342
- $("#current-instance-subscriptions").text('S');
348
+ $("#current-instance-callbacks").show();
343
349
  $("#current-instance-callbacks").attr('href',url + 'callbacks/');
344
- $("#current-instance-callbacks").text('C');
350
+ $("#current-monitor").show();
351
+ $("#current-monitor").attr('href','edit.html?monitor=' + url);
352
+ $("#current-graph").show();
353
+ $("#current-graph").attr('href','graph.html?monitor=' + url);
354
+ $("#current-track").show();
355
+ $("#current-track").attr('href','track.html?monitor=' + url);
345
356
  var q = $.parseQuerySimple();
346
357
  history.replaceState({}, '', '?' + (q.min || q.min=="" ? "min&" : "") + 'monitor='+url);
347
358
 
@@ -359,6 +370,11 @@ function monitor_instance(cin,rep,load,exec) {// {{{
359
370
  if (load || exec) {
360
371
  load_testset(exec);
361
372
  }
373
+ },
374
+ error: function() {
375
+ subscription = undefined;
376
+ append_to_log("monitoring", "closed", "For Good.");
377
+ sse();
362
378
  }
363
379
  });
364
380
  },
@@ -426,6 +442,17 @@ function monitor_instance_values(val) {// {{{
426
442
  var text = $(" > attributes > info",res).text() + " (" + url.replace(/\/$/,'').split(/[\\/]/).pop() + ")";
427
443
  $('#title').text(text);
428
444
  document.title = text;
445
+ if ($('body').attr('current-save')) {
446
+ $('body').attr('current-save-dir',$(" > attributes > design_dir",res).text());
447
+ }
448
+ if ($('body').attr('current-logs')) {
449
+ var uuid = $(" > attributes > uuid",res).text();
450
+ $("#current-log").show();
451
+ $("#current-log").attr('href',$('body').attr('current-logs') + uuid + '.xes.yaml');
452
+ if ($("#current-log").text() == '') {
453
+ $("#current-log").text(uuid + '.xes.yaml');
454
+ }
455
+ }
429
456
  }
430
457
  }
431
458
  });
@@ -541,6 +568,7 @@ function adaptor_init(url,theme,dslx) { //{{{
541
568
  format_instance_pos();
542
569
  });
543
570
  }
571
+ suspended_monitoring = false;
544
572
  } //}}}
545
573
 
546
574
  function monitor_graph_change(force) { //{{{
@@ -644,7 +672,7 @@ function monitor_instance_running(content,event) {// {{{
644
672
  } // }}}
645
673
  function monitor_instance_state_change(notification) { //{{{
646
674
  if ($('#trackcolumn').length > 0) {
647
- if (notification == "finished") {
675
+ if (notification == "finished" || notification == "abandoned") {
648
676
  parent.closeIFrame(window.location.search);
649
677
  }
650
678
  }
@@ -915,7 +943,6 @@ async function set_testset(testset,exec) {// {{{
915
943
  );
916
944
 
917
945
  await Promise.all(promises);
918
- suspended_monitoring = false;
919
946
 
920
947
  $.ajax({
921
948
  type: "GET",
@@ -22,7 +22,7 @@ $(document).ready(function() {
22
22
  var def = new $.Deferred();
23
23
  def.done(function(name,testset) {
24
24
  $.ajax({
25
- url: $('body').attr('current-save') + name + '.xml',
25
+ url: $('body').attr('current-save') + ($('body').attr('current-save-dir') ? ($('body').attr('current-save-dir') + '/').replace(/\/+/,'/') : '') + name + '.xml',
26
26
  type: 'PUT',
27
27
  contentType: 'application/xml',
28
28
  data: testset.serializePrettyXML(),
@@ -1,8 +1,18 @@
1
1
  function closeIFrame(srch) {
2
+ var count = 0;
2
3
  $('iframe').each(function(i,val){
3
4
  if ($(val).attr('src') == 'track.html' + srch) {
4
5
  $(val).remove();
5
6
  }
7
+ count += 1;
6
8
  });
9
+ if (count == 1) {
10
+ $('#graphcolumn').removeClass('resize');
11
+ }
7
12
  }
8
13
 
14
+ $(document).ready(function() {
15
+ $("a[name=glob_unshow]").click(e => {
16
+ parent.closeIFrame(window.location.search);
17
+ });
18
+ });
@@ -1,3 +1,19 @@
1
+ function config_defaults(){
2
+ var default_values = {};
3
+ // logs is missing, so that the button is not shown, when there is no info
4
+ if (location.protocol.match(/^file/)) {
5
+ default_values['res-url'] = 'http://localhost:' + $('body').data('res-port');
6
+ default_values['base-url'] = 'http://localhost:' + $('body').data('base-port');
7
+ default_values['save-url'] = 'http://localhost:' + $('body').data('base-port') + '/design';
8
+ } else {
9
+ default_values['res-url'] = location.protocol + "//" + location.hostname + ":" + $('body').data('res-port');
10
+ default_values['base-url'] = location.protocol + "//" + location.hostname + ":" + $('body').data('base-port');
11
+ default_values['save-url'] = location.protocol + "//" + location.hostname + ":" + $('body').data('base-port') + '/design';
12
+ }
13
+ default_values['templates-url'] = 'templates/';
14
+ return default_values;
15
+ }
16
+
1
17
  $(document).ready(function() {
2
18
  if (!($.cookie('cpee_iagree')) && $("body > div[id='disclaimer']").length > 0) {
3
19
  $("body > :not([id='disclaimer'])").remove();
@@ -18,25 +34,40 @@ $(document).ready(function() {
18
34
  $.ajax({
19
35
  url: "config.json",
20
36
  success: function(res){
21
- $("input[name=res-url]").val(res['res-url']);
22
- $("input[name=base-url]").val(res['base-url']);
23
- $("body").attr('current-resources',res['res-url']);
24
- $("body").attr('current-base',res['base-url']);
25
- $("body").attr('current-save',res['save-url']);
26
- $("body").attr('current-templates',res['testsets-url']);
37
+ var res_def = config_defaults();
38
+ if (res['log-url']) { // just leave it out when it is not configured
39
+ $("body").attr('current-logs',res['log-url']);
40
+ }
41
+ if (res['res-url']) {
42
+ $("body").attr('current-resources',res['res-url']);
43
+ } else {
44
+ $("body").attr('current-resources',res_def['res-url']);
45
+ }
46
+ if (res['base-url']) {
47
+ $("body").attr('current-base',res['base-url']);
48
+ } else {
49
+ $("body").attr('current-base',res_def['base-url']);
50
+ }
51
+ if (res['save-url']) {
52
+ $("body").attr('current-save',res['save-url']);
53
+ } else {
54
+ $("body").attr('current-save',res_def['save-url']);
55
+ }
56
+ if (res['templates-url']) {
57
+ $("body").attr('current-templates',res['templates-url']);
58
+ } else {
59
+ $("body").attr('current-templates',res_def['templates-url']);
60
+ }
61
+ $("input[name=res-url]").val($("body").attr('current-resources'));
62
+ $("input[name=base-url]").val($("body").attr('current-base'));
27
63
  cockpit();
28
64
  },
29
65
  error: function(){
30
- $("body").attr('current-templates','templates/');
31
- if (location.protocol.match(/^file/)) {
32
- $("body").attr('current-resources',"http://localhost:" + $('body').data('res-port'));
33
- $("body").attr('current-base',"http://localhost:" + $('body').data('base-port'));
34
- $("body").attr('current-save',"http://localhost:" + $('body').data('base-port') + '/design');
35
- } else {
36
- $("body").attr('current-resources',location.protocol + "//" + location.hostname + ":" + $('body').data('res-port'));
37
- $("body").attr('current-base',location.protocol + "//" + location.hostname + ":" + $('body').data('base-port'));
38
- $("body").attr('current-save',location.protocol + "//" + location.hostname + ":" + $('body').data('base-port') + '/design');
39
- }
66
+ var res = config_defaults();
67
+ $("body").attr('current-resources',res['res-url']);
68
+ $("body").attr('current-base',res['base-url']);
69
+ $("body").attr('current-save',res['save-url']);
70
+ $("body").attr('current-templates',res['templates-url']);
40
71
  $("input[name=res-url]").val($("body").attr('current-resources'));
41
72
  $("input[name=base-url]").val($("body").attr('current-base'));
42
73
  cockpit();
@@ -0,0 +1,82 @@
1
+ <testset xmlns="http://cpee.org/ns/properties/2.0">
2
+ <dataelements>
3
+ <i>0</i>
4
+ </dataelements>
5
+ <handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
6
+ <endpoints>
7
+ <start_url>http://localhost:9296/url/</start_url>
8
+ </endpoints>
9
+ <positions/>
10
+ <description>
11
+ <description xmlns="http://cpee.org/ns/description/1.0">
12
+ <loop mode="pre_test" condition="true">
13
+ <parallel wait="-1">
14
+ <loop mode="pre_test" condition="data.i &lt; 4">
15
+ <_probability>
16
+ <_probability_min/>
17
+ <_probability_max/>
18
+ <_probability_avg/>
19
+ </_probability>
20
+ <parallel_branch pass="" local="">
21
+ <call id="a1" endpoint="start_url">
22
+ <parameters>
23
+ <label>Start</label>
24
+ <method>:post</method>
25
+ <arguments>
26
+ <behavior>wait_running</behavior>
27
+ <url>http://localhost/flow/templates/instantiate.local/Take_Sub.xml</url>
28
+ <init>
29
+ <time>4</time>
30
+ </init>
31
+ <endpoints/>
32
+ <stream/>
33
+ </arguments>
34
+ <stream>
35
+ <sensors/>
36
+ <aggregators/>
37
+ <costs/>
38
+ </stream>
39
+ <report>
40
+ <url/>
41
+ </report>
42
+ </parameters>
43
+ <annotations>
44
+ <_timing>
45
+ <_timing_wait/>
46
+ <_timing_threshold/>
47
+ <_timing_min/>
48
+ <_timing_max/>
49
+ <_timing_avg/>
50
+ </_timing>
51
+ <_notes>
52
+ <_notes_general/>
53
+ </_notes>
54
+ </annotations>
55
+ </call>
56
+ </parallel_branch>
57
+ <manipulate id="a4" label="">data.i += 1</manipulate>
58
+ </loop>
59
+ </parallel>
60
+ <manipulate id="a3" label="">data.i = 0</manipulate>
61
+ <_probability>
62
+ <_probability_min/>
63
+ <_probability_max/>
64
+ <_probability_avg/>
65
+ </_probability>
66
+ <stop id="a2"/>
67
+ </loop>
68
+ </description>
69
+ </description>
70
+ <transformation>
71
+ <description type="copy"/>
72
+ <dataelements type="none"/>
73
+ <endpoints type="none"/>
74
+ </transformation>
75
+ <attributes>
76
+ <info>Track Test</info>
77
+ <modeltype>CPEE</modeltype>
78
+ <theme>default</theme>
79
+ <customer>pilotfabrik</customer>
80
+ <status>development</status>
81
+ </attributes>
82
+ </testset>