cpee 1.5.19 → 1.5.20

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 (243) hide show
  1. checksums.yaml +4 -4
  2. data/cockpit/css/model.css +24 -0
  3. data/cockpit/css/ui.css +25 -0
  4. data/cockpit/index.html +6 -6
  5. data/cockpit/js/details.js +70 -52
  6. data/cockpit/js/instance.js +61 -17
  7. data/cockpit/js/model.js +41 -0
  8. data/cockpit/js/ui.js +3 -0
  9. data/cockpit/model.html +191 -0
  10. data/cockpit/themes/compact/rngs/alternative.rng +1 -0
  11. data/cockpit/themes/compact/rngs/call.rng +111 -0
  12. data/cockpit/themes/compact/rngs/callmanipulate.rng +134 -0
  13. data/cockpit/themes/compact/rngs/choose.rng +1 -0
  14. data/cockpit/themes/compact/rngs/critical.rng +1 -0
  15. data/cockpit/themes/compact/rngs/escape.rng +1 -0
  16. data/cockpit/themes/compact/rngs/group.rng +1 -0
  17. data/cockpit/themes/compact/rngs/loop.rng +1 -0
  18. data/cockpit/themes/compact/rngs/manipulate.rng +1 -0
  19. data/cockpit/themes/compact/rngs/otherwise.rng +1 -0
  20. data/cockpit/themes/compact/rngs/parallel.rng +1 -0
  21. data/cockpit/themes/compact/rngs/parallel_branch.rng +1 -0
  22. data/cockpit/themes/compact/rngs/scripts.rng +24 -0
  23. data/cockpit/themes/compact/rngs/stop.rng +1 -0
  24. data/cockpit/themes/compact/rngs/terminate.rng +1 -0
  25. data/cockpit/themes/compact/symbols/alternative.svg +5 -0
  26. data/cockpit/themes/compact/symbols/arrow.svg +3 -0
  27. data/cockpit/themes/compact/symbols/call.svg +6 -0
  28. data/cockpit/themes/compact/symbols/callmanipulate.svg +8 -0
  29. data/cockpit/themes/compact/symbols/choose.svg +5 -0
  30. data/cockpit/themes/compact/symbols/choose_exclusive.svg +5 -0
  31. data/cockpit/themes/compact/symbols/choose_inclusive.svg +4 -0
  32. data/cockpit/themes/compact/symbols/complex.svg +8 -0
  33. data/cockpit/themes/compact/symbols/critical.svg +4 -0
  34. data/cockpit/themes/compact/symbols/end.svg +3 -0
  35. data/cockpit/themes/compact/symbols/escape.svg +5 -0
  36. data/cockpit/themes/compact/symbols/event_end.svg +3 -0
  37. data/cockpit/themes/compact/symbols/loop.svg +5 -0
  38. data/cockpit/themes/compact/symbols/manipulate.svg +4 -0
  39. data/cockpit/themes/compact/symbols/otherwise.svg +5 -0
  40. data/cockpit/themes/compact/symbols/parallel.svg +5 -0
  41. data/cockpit/themes/compact/symbols/parallel_branch.svg +5 -0
  42. data/cockpit/themes/compact/symbols/parallel_branch_compact.svg +4 -0
  43. data/cockpit/themes/compact/symbols/parallel_branch_event.svg +14 -0
  44. data/cockpit/themes/compact/symbols/parallel_branch_normal.svg +5 -0
  45. data/cockpit/themes/compact/symbols/scripts.svg +4 -0
  46. data/cockpit/themes/compact/symbols/start.svg +3 -0
  47. data/cockpit/themes/compact/symbols/stop.svg +5 -0
  48. data/cockpit/themes/compact/symbols/terminate.svg +4 -0
  49. data/cockpit/themes/compact/theme.js +30 -18
  50. data/cockpit/themes/default/rngs/callmanipulate.rng +5 -0
  51. data/cockpit/themes/default/theme.js +97 -57
  52. data/cockpit/themes/extended/rngs/alternative.rng +1 -0
  53. data/cockpit/themes/extended/rngs/call.rng +111 -0
  54. data/cockpit/themes/extended/rngs/callmanipulate.rng +134 -0
  55. data/cockpit/themes/extended/rngs/choose.rng +1 -0
  56. data/cockpit/themes/extended/rngs/critical.rng +1 -0
  57. data/cockpit/themes/extended/rngs/escape.rng +1 -0
  58. data/cockpit/themes/extended/rngs/group.rng +1 -0
  59. data/cockpit/themes/extended/rngs/loop.rng +1 -0
  60. data/cockpit/themes/extended/rngs/manipulate.rng +1 -0
  61. data/cockpit/themes/extended/rngs/otherwise.rng +1 -0
  62. data/cockpit/themes/extended/rngs/parallel.rng +1 -0
  63. data/cockpit/themes/extended/rngs/parallel_branch.rng +1 -0
  64. data/cockpit/themes/extended/rngs/scripts.rng +24 -0
  65. data/cockpit/themes/extended/rngs/stop.rng +1 -0
  66. data/cockpit/themes/extended/rngs/terminate.rng +1 -0
  67. data/cockpit/themes/extended/symbols/alternative.svg +5 -0
  68. data/cockpit/themes/extended/symbols/arrow.svg +3 -0
  69. data/cockpit/themes/extended/symbols/call.svg +6 -0
  70. data/cockpit/themes/extended/symbols/callmanipulate.svg +8 -0
  71. data/cockpit/themes/extended/symbols/choose.svg +5 -0
  72. data/cockpit/themes/extended/symbols/choose_exclusive.svg +5 -0
  73. data/cockpit/themes/extended/symbols/choose_inclusive.svg +4 -0
  74. data/cockpit/themes/extended/symbols/complex.svg +8 -0
  75. data/cockpit/themes/extended/symbols/critical.svg +4 -0
  76. data/cockpit/themes/extended/symbols/end.svg +3 -0
  77. data/cockpit/themes/extended/symbols/escape.svg +5 -0
  78. data/cockpit/themes/extended/symbols/event_end.svg +3 -0
  79. data/cockpit/themes/extended/symbols/loop.svg +5 -0
  80. data/cockpit/themes/extended/symbols/manipulate.svg +4 -0
  81. data/cockpit/themes/extended/symbols/otherwise.svg +5 -0
  82. data/cockpit/themes/extended/symbols/parallel.svg +5 -0
  83. data/cockpit/themes/extended/symbols/parallel_branch.svg +5 -0
  84. data/cockpit/themes/extended/symbols/parallel_branch_compact.svg +4 -0
  85. data/cockpit/themes/extended/symbols/parallel_branch_event.svg +14 -0
  86. data/cockpit/themes/extended/symbols/parallel_branch_normal.svg +5 -0
  87. data/cockpit/themes/extended/symbols/scripts.svg +4 -0
  88. data/cockpit/themes/extended/symbols/start.svg +3 -0
  89. data/cockpit/themes/extended/symbols/stop.svg +5 -0
  90. data/cockpit/themes/extended/symbols/terminate.svg +4 -0
  91. data/cockpit/themes/extended/theme.js +30 -18
  92. data/cockpit/themes/labels/rngs/alternative.rng +25 -0
  93. data/cockpit/themes/labels/rngs/call.rng +81 -0
  94. data/cockpit/themes/labels/rngs/callmanipulate.rng +101 -0
  95. data/cockpit/themes/labels/rngs/choose.rng +12 -0
  96. data/cockpit/themes/labels/rngs/critical.rng +5 -0
  97. data/cockpit/themes/labels/rngs/escape.rng +1 -0
  98. data/cockpit/themes/labels/rngs/finalize.rng +6 -0
  99. data/cockpit/themes/labels/rngs/group.rng +3 -0
  100. data/cockpit/themes/labels/rngs/loop.rng +22 -0
  101. data/cockpit/themes/labels/rngs/manipulate.rng +9 -0
  102. data/cockpit/themes/labels/rngs/otherwise.rng +22 -0
  103. data/cockpit/themes/labels/rngs/parallel.rng +13 -0
  104. data/cockpit/themes/labels/rngs/parallel_branch.rng +8 -0
  105. data/cockpit/themes/labels/rngs/stop.rng +5 -0
  106. data/cockpit/themes/labels/rngs/terminate.rng +1 -0
  107. data/cockpit/themes/labels/rngs/update.rng +6 -0
  108. data/cockpit/themes/labels/symbols/alternative.svg +5 -0
  109. data/cockpit/themes/labels/symbols/arrow.svg +3 -0
  110. data/cockpit/themes/labels/symbols/call.svg +6 -0
  111. data/cockpit/themes/labels/symbols/callmanipulate.svg +8 -0
  112. data/cockpit/themes/labels/symbols/choose.svg +5 -0
  113. data/cockpit/themes/labels/symbols/choose_exclusive.svg +5 -0
  114. data/cockpit/themes/labels/symbols/choose_inclusive.svg +4 -0
  115. data/cockpit/themes/labels/symbols/complex.svg +8 -0
  116. data/cockpit/themes/labels/symbols/critical.svg +4 -0
  117. data/cockpit/themes/labels/symbols/end.svg +3 -0
  118. data/cockpit/themes/labels/symbols/escape.svg +5 -0
  119. data/cockpit/themes/labels/symbols/event_end.svg +3 -0
  120. data/cockpit/themes/labels/symbols/loop.svg +5 -0
  121. data/cockpit/themes/labels/symbols/manipulate.svg +4 -0
  122. data/cockpit/themes/labels/symbols/otherwise.svg +5 -0
  123. data/cockpit/themes/labels/symbols/parallel.svg +5 -0
  124. data/cockpit/themes/labels/symbols/parallel_branch.svg +5 -0
  125. data/cockpit/themes/labels/symbols/parallel_branch_compact.svg +4 -0
  126. data/cockpit/themes/labels/symbols/parallel_branch_event.svg +14 -0
  127. data/cockpit/themes/labels/symbols/parallel_branch_normal.svg +5 -0
  128. data/cockpit/themes/labels/symbols/scripts.svg +4 -0
  129. data/cockpit/themes/labels/symbols/start.svg +3 -0
  130. data/cockpit/themes/labels/symbols/stop.svg +5 -0
  131. data/cockpit/themes/labels/symbols/terminate.svg +4 -0
  132. data/cockpit/themes/model/rngs/alternative.rng +1 -0
  133. data/cockpit/themes/model/rngs/call.rng +62 -0
  134. data/cockpit/themes/model/rngs/callmanipulate.rng +67 -0
  135. data/cockpit/themes/model/rngs/choose.rng +1 -0
  136. data/cockpit/themes/model/rngs/critical.rng +1 -0
  137. data/cockpit/themes/model/rngs/escape.rng +1 -0
  138. data/cockpit/themes/model/rngs/group.rng +1 -0
  139. data/cockpit/themes/model/rngs/loop.rng +1 -0
  140. data/cockpit/themes/model/rngs/manipulate.rng +1 -0
  141. data/cockpit/themes/model/rngs/otherwise.rng +1 -0
  142. data/cockpit/themes/model/rngs/parallel.rng +1 -0
  143. data/cockpit/themes/model/rngs/parallel_branch.rng +1 -0
  144. data/cockpit/themes/model/rngs/scripts.rng +8 -0
  145. data/cockpit/themes/model/rngs/stop.rng +1 -0
  146. data/cockpit/themes/model/rngs/terminate.rng +1 -0
  147. data/cockpit/themes/model/symbols/alternative.svg +5 -0
  148. data/cockpit/themes/model/symbols/arrow.svg +3 -0
  149. data/cockpit/themes/model/symbols/call.svg +6 -0
  150. data/cockpit/themes/model/symbols/callmanipulate.svg +8 -0
  151. data/cockpit/themes/model/symbols/choose.svg +5 -0
  152. data/cockpit/themes/model/symbols/choose_exclusive.svg +5 -0
  153. data/cockpit/themes/model/symbols/choose_inclusive.svg +4 -0
  154. data/cockpit/themes/model/symbols/complex.svg +8 -0
  155. data/cockpit/themes/model/symbols/critical.svg +4 -0
  156. data/cockpit/themes/model/symbols/end.svg +3 -0
  157. data/cockpit/themes/model/symbols/escape.svg +5 -0
  158. data/cockpit/themes/model/symbols/event_end.svg +3 -0
  159. data/cockpit/themes/model/symbols/loop.svg +5 -0
  160. data/cockpit/themes/model/symbols/manipulate.svg +4 -0
  161. data/cockpit/themes/model/symbols/otherwise.svg +5 -0
  162. data/cockpit/themes/model/symbols/parallel.svg +5 -0
  163. data/cockpit/themes/model/symbols/parallel_branch.svg +5 -0
  164. data/cockpit/themes/model/symbols/parallel_branch_compact.svg +4 -0
  165. data/cockpit/themes/model/symbols/parallel_branch_event.svg +14 -0
  166. data/cockpit/themes/model/symbols/parallel_branch_normal.svg +5 -0
  167. data/cockpit/themes/model/symbols/scripts.svg +4 -0
  168. data/cockpit/themes/model/symbols/start.svg +3 -0
  169. data/cockpit/themes/model/symbols/stop.svg +5 -0
  170. data/cockpit/themes/model/symbols/terminate.svg +4 -0
  171. data/cockpit/themes/model/theme.js +1267 -0
  172. data/cockpit/themes/packed/rngs/alternative.rng +1 -0
  173. data/cockpit/themes/packed/rngs/call.rng +111 -0
  174. data/cockpit/themes/packed/rngs/callmanipulate.rng +134 -0
  175. data/cockpit/themes/packed/rngs/choose.rng +1 -0
  176. data/cockpit/themes/packed/rngs/critical.rng +1 -0
  177. data/cockpit/themes/packed/rngs/escape.rng +1 -0
  178. data/cockpit/themes/packed/rngs/group.rng +1 -0
  179. data/cockpit/themes/packed/rngs/loop.rng +1 -0
  180. data/cockpit/themes/packed/rngs/manipulate.rng +1 -0
  181. data/cockpit/themes/packed/rngs/otherwise.rng +1 -0
  182. data/cockpit/themes/packed/rngs/parallel.rng +1 -0
  183. data/cockpit/themes/packed/rngs/parallel_branch.rng +1 -0
  184. data/cockpit/themes/packed/rngs/scripts.rng +24 -0
  185. data/cockpit/themes/packed/rngs/stop.rng +1 -0
  186. data/cockpit/themes/packed/rngs/terminate.rng +1 -0
  187. data/cockpit/themes/packed/symbols/alternative.svg +5 -0
  188. data/cockpit/themes/packed/symbols/arrow.svg +3 -0
  189. data/cockpit/themes/packed/symbols/call.svg +6 -0
  190. data/cockpit/themes/packed/symbols/callmanipulate.svg +8 -0
  191. data/cockpit/themes/packed/symbols/choose.svg +5 -0
  192. data/cockpit/themes/packed/symbols/choose_exclusive.svg +5 -0
  193. data/cockpit/themes/packed/symbols/choose_inclusive.svg +4 -0
  194. data/cockpit/themes/packed/symbols/complex.svg +8 -0
  195. data/cockpit/themes/packed/symbols/critical.svg +4 -0
  196. data/cockpit/themes/packed/symbols/end.svg +3 -0
  197. data/cockpit/themes/packed/symbols/escape.svg +5 -0
  198. data/cockpit/themes/packed/symbols/event_end.svg +3 -0
  199. data/cockpit/themes/packed/symbols/loop.svg +5 -0
  200. data/cockpit/themes/packed/symbols/manipulate.svg +4 -0
  201. data/cockpit/themes/packed/symbols/otherwise.svg +5 -0
  202. data/cockpit/themes/packed/symbols/parallel.svg +5 -0
  203. data/cockpit/themes/packed/symbols/parallel_branch.svg +5 -0
  204. data/cockpit/themes/packed/symbols/parallel_branch_compact.svg +4 -0
  205. data/cockpit/themes/packed/symbols/parallel_branch_event.svg +14 -0
  206. data/cockpit/themes/packed/symbols/parallel_branch_normal.svg +5 -0
  207. data/cockpit/themes/packed/symbols/scripts.svg +4 -0
  208. data/cockpit/themes/packed/symbols/start.svg +3 -0
  209. data/cockpit/themes/packed/symbols/stop.svg +5 -0
  210. data/cockpit/themes/packed/symbols/terminate.svg +4 -0
  211. data/cockpit/themes/packed/theme.js +30 -18
  212. data/cockpit/themes/preset/rngs/call.rng +0 -10
  213. data/cockpit/themes/preset/rngs/callmanipulate.rng +0 -13
  214. data/cockpit/themes/preset/symbols/alternative.svg +5 -0
  215. data/cockpit/themes/preset/symbols/arrow.svg +3 -0
  216. data/cockpit/themes/preset/symbols/call.svg +6 -0
  217. data/cockpit/themes/preset/symbols/callmanipulate.svg +8 -0
  218. data/cockpit/themes/preset/symbols/choose.svg +5 -0
  219. data/cockpit/themes/preset/symbols/choose_exclusive.svg +5 -0
  220. data/cockpit/themes/preset/symbols/choose_inclusive.svg +4 -0
  221. data/cockpit/themes/preset/symbols/complex.svg +8 -0
  222. data/cockpit/themes/preset/symbols/critical.svg +4 -0
  223. data/cockpit/themes/preset/symbols/end.svg +3 -0
  224. data/cockpit/themes/preset/symbols/escape.svg +5 -0
  225. data/cockpit/themes/preset/symbols/event_end.svg +3 -0
  226. data/cockpit/themes/preset/symbols/loop.svg +5 -0
  227. data/cockpit/themes/preset/symbols/manipulate.svg +4 -0
  228. data/cockpit/themes/preset/symbols/otherwise.svg +5 -0
  229. data/cockpit/themes/preset/symbols/parallel.svg +5 -0
  230. data/cockpit/themes/preset/symbols/parallel_branch.svg +5 -0
  231. data/cockpit/themes/preset/symbols/parallel_branch_compact.svg +4 -0
  232. data/cockpit/themes/preset/symbols/parallel_branch_event.svg +14 -0
  233. data/cockpit/themes/preset/symbols/parallel_branch_normal.svg +5 -0
  234. data/cockpit/themes/preset/symbols/scripts.svg +4 -0
  235. data/cockpit/themes/preset/symbols/start.svg +3 -0
  236. data/cockpit/themes/preset/symbols/stop.svg +5 -0
  237. data/cockpit/themes/preset/symbols/terminate.svg +4 -0
  238. data/cockpit/themes/preset/theme.js +30 -18
  239. data/cpee.gemspec +2 -2
  240. data/lib/cpee/implementation.rb +28 -0
  241. data/lib/engine.xml +4 -0
  242. data/log/azure.rb +1 -1
  243. metadata +227 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 222045518cb8e94915945672b78bbb51e5f082d57fda08167f8bfdbb8cda9b6c
4
- data.tar.gz: 6fa57b087b0b267dcae1ad91eacfbc0e30baf904a03929903da820b2b2d749a4
3
+ metadata.gz: 9d925f0547195410d0843ebd7b0839a02b396562664f8bddd3b964d2f9d0e8e9
4
+ data.tar.gz: d8b82a29324ea705feb7108a660425ad2fa460aed9c4c6f557d6797bedbc93ce
5
5
  SHA512:
6
- metadata.gz: da53812dd836e7932c9e34c4340a5dda0fe854f5cc26c0cf66d08e749215f8bb1e56221ceb6ad93cdf3b8e797fbbf28faaed11a0526cf619a201b4cec52e3a34
7
- data.tar.gz: f7c70ebacb30422df749a9c59d82e2fa9ef45f16ce4d4b13379284c1294d7242e3966af29d1a801f868bc388f695f66ad527a7d647921ed07f59b5b9a395aa0a
6
+ metadata.gz: 3d949f013965d26f6645982410e7a3544313533edda961581cc1c157dd5b09b605502a1de1975afe2ce3c56eaac1b12534bea64cb31b818d3a7e03c21351d9a9
7
+ data.tar.gz: 1c6ed6cece7bde67f3df522c51f3ac65f1080493af071927f136597a81679cf83665e1e8a780273088a611632a72cd7a96e0717ec241fa93c196efb308471be2
@@ -0,0 +1,24 @@
1
+ #areamodel input[type=file] { display: none; }
2
+ #areamodel div.section { display: table-cell; vertical-align: middle; }
3
+ #areamodel div.section:nth-child(1) { padding: 0 0.5em 0 0; white-space: nowrap; }
4
+ #areamodel div.section:nth-child(2) { border-left: 1px solid var(--x-ui-border-color); padding: 0 0.5em; white-space: nowrap; }
5
+ #areamodel div.section:nth-child(3) { border-left: 1px solid var(--x-ui-border-color); padding: 0 0.5em; white-space: nowrap; }
6
+ #areamodel div.section:nth-child(4) { border-left: 1px solid var(--x-ui-border-color); padding: 0 0 0 0.5em; white-space: nowrap; }
7
+
8
+ #areamodel div.section:nth-child(1) button { white-space: normal; vertical-align: middle; margin: 0; padding: 0; }
9
+ #areamodel div.section:nth-child(1) button[name=save] { white-space: normal; width: 10em; height: 5.5em; margin-left: 0.2em; }
10
+
11
+ #areamodel div.section:nth-child(2) div { white-space: normal; vertical-align: middle; margin: 0; padding: 0; }
12
+ #areamodel div.section:nth-child(2) button { white-space: normal; vertical-align: middle; margin: 0; padding: 0; }
13
+ #areamodel div.section:nth-child(2) div:nth-child(2) { white-space: normal; text-align: right; }
14
+ #areamodel div.section:nth-child(2) button[name=loadtestsetfile] { white-space: normal; width: 10em; height: 3.5em; margin-left: 0.2em; }
15
+ #areamodel div.section:nth-child(2) button[name=loadmodelfile] { white-space: normal; width: 10em; height: 2em; margin-top: 0.2em; }
16
+
17
+ #areamodel div.section:nth-child(3) div { white-space: normal; vertical-align: middle; margin: 0; padding: 0; }
18
+ #areamodel div.section:nth-child(3) button { white-space: normal; vertical-align: middle; margin: 0; padding: 0; }
19
+ #areamodel div.section:nth-child(3) div:nth-child(2) { white-space: normal; text-align: right; }
20
+ #areamodel div.section:nth-child(3) button[name=savetestsetfile] { white-space: normal; width: 10em; height: 3.5em; margin-left: 0.2em; }
21
+ #areamodel div.section:nth-child(3) button[name=savesvgfile] { white-space: normal; width: 10em; height: 2em; margin-top: 0.2em; }
22
+
23
+ #areamodel div.section:nth-child(4) div { white-space: normal; vertical-align: middle; margin: 0; padding: 0; }
24
+ #areamodel div.section:nth-child(4) button[name=loadmodeltype] { white-space: normal; width: 10em; height: 2em; }
@@ -7,6 +7,13 @@ body {
7
7
  font-size: 1em;
8
8
  }
9
9
 
10
+ @font-face {
11
+ font-family: 'FontAwesome';
12
+ src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype');
13
+ font-weight: normal;
14
+ font-style: normal;
15
+ }
16
+
10
17
  #graphgrid {
11
18
  display: grid;
12
19
  grid-gap: 0;
@@ -49,6 +56,24 @@ body {
49
56
  color: var(--wfadaptor-selected);
50
57
  }
51
58
 
59
+ #graphgrid .graphlabel.selected a, #graphgrid .graphlabel.hover a {
60
+ color: var(--wfadaptor-selected);
61
+ }
62
+ #graphgrid .graphlabel a {
63
+ color: var(--x-ui-light-text-color);
64
+ }
65
+ #graphgrid .graphlabel a::after {
66
+ font: normal normal normal 14px/1 FontAwesome;
67
+ font-size: 0.8em;
68
+ text-rendering: auto;
69
+ -webkit-font-smoothing: antialiased;
70
+ -moz-osx-font-smoothing: grayscale;
71
+ content: ' ';
72
+ }
73
+ #graphgrid .graphlabel.selected a::after, graphgrid .graphlabel.hover a::after {
74
+ color: var(--wfadaptor-selected);
75
+ }
76
+
52
77
  #instance ui-content { height: 7em; }
53
78
 
54
79
  #areanew td:nth-child(1) { width: 7em; padding-right: 1em; }
@@ -149,23 +149,23 @@
149
149
  <form id='fuckchrome'>
150
150
  <input type='file' name='testsetfile' id='testsetfile'/>
151
151
  </form>
152
- <button title='a testset includes various setting, subscriptions and a model' name="loadtestset">load predefined testset</button><button title='a testset includes various setting, subscriptions and a model' name="loadtestsetfile">load testset file</button>
152
+ <button title='a testset includes various settings, subscriptions and a model' name="loadtestset">load predefined testset</button><button title='a testset includes various settings, subscriptions and a model' name="loadtestsetfile">load testset file</button>
153
153
  </div>
154
154
  <div>
155
155
  <input type='file' name='modelfile' id='modelfile'/>
156
156
  <button title='a standalone process model is only loadable if the currently loaded testset sucessfully prepared the current instance for the type of model' name="loadmodelfile">load model</button>
157
157
  </div>
158
158
  </div><div class='section'>
159
- <a id="savetestset" href="" download=""></a>
160
- <a id="savesvg" href="" download=""></a>
161
- <button title='a testset includes various setting, subscriptions and a model' name="savetestset">save testset</button>
162
- <button title='a testset includes various setting, subscriptions and a model' name="savesvg">save svg graph</button>
159
+ <a id="savetestsetfile" href="" download=""></a>
160
+ <a id="savesvgfile" href="" download=""></a>
161
+ <button title='a testset includes various settings, subscriptions and a model' name="savetestsetfile">save testset</button>
162
+ <button title='a testset includes various settings, subscriptions and a model' name="savesvgfile">save svg graph</button>
163
163
  </div><div class='section'>
164
164
  <div>
165
165
  Current model: <span id='currentmodel'></span>
166
166
  </div>
167
167
  <div>
168
- <button title='a testset includes various setting, subscriptions and a model' name="loadmodeltype">set model type</button>
168
+ <button title='a testset includes various settings, subscriptions and a model' name="loadmodeltype">set model type</button>
169
169
  </div>
170
170
  </div>
171
171
  </ui-area> <!--}}}-->
@@ -29,64 +29,82 @@ $(document).ready(function() {
29
29
  clearTimeout(timer);
30
30
  do_main_save();
31
31
  });
32
+ $(document).on('relaxngui_move', '#dat_details', function(e){
33
+ clearTimeout(timer);
34
+ do_main_save();
35
+ });
32
36
  });
33
37
 
34
38
  function do_main_save() { //{{{
35
39
  if (save['details'].has_changed()) {
36
- var svgid = save['details_target'].svgid;
37
- var desc = save['details_target'].model;
38
- var node = desc.get_node_by_svg_id(svgid);
39
- var orignode = save['graph_adaptor'].illustrator.get_node_by_svg_id(svgid).parents('g.element[element-id]');
40
- var origtype = orignode.attr('element-type') + '_' + orignode.attr('element-endpoint');
41
-
42
-
43
- var url = $('body').attr('current-instance');
44
- $('#main ui-tabbar ui-behind button').removeClass('highlight');
45
- save['details'].set_checkpoint();
46
-
47
- // pull out xml and add XMLNS
48
- // sadly we have to serialze, add in string and then parse again
49
- // as adding namespaces to nodes is not supported
50
- // serialization and reparsing is faster and more robust than xslt option
51
- var nnew = $(save['details'].save().documentElement);
52
- nnew.attr('svg-id',svgid);
53
- nnew.attr('trans-xmlns','http://cpee.org/ns/description/1.0');
54
-
55
- if ($('*[svg-id]',node).length > 0) {
56
- nnew.append(node.children().filter(function(){ return this.attributes['svg-id'] != undefined; }));
40
+ do_main_work();
41
+ }
42
+ } //}}}
43
+
44
+ function do_main_work() { //{{{
45
+ var svgid = save['details_target'].svgid;
46
+ var desc = save['details_target'].model;
47
+ var node = desc.get_node_by_svg_id(svgid);
48
+ var orignode = save['graph_adaptor'].illustrator.get_node_by_svg_id(svgid).parents('g.element[element-id]');
49
+ var origtype = orignode.attr('element-type') + '_' + orignode.attr('element-endpoint');
50
+
51
+
52
+ var url = $('body').attr('current-instance');
53
+ $('#main ui-tabbar ui-behind button').removeClass('highlight');
54
+ save['details'].set_checkpoint();
55
+
56
+ // pull out xml and add XMLNS
57
+ // sadly we have to serialze, add in string and then parse again
58
+ // as adding namespaces to nodes is not supported
59
+ // serialization and reparsing is faster and more robust than xslt option
60
+ var nnew = $(save['details'].save().documentElement);
61
+ nnew.attr('svg-id',svgid);
62
+ nnew.attr('trans-xmlns','http://cpee.org/ns/description/1.0');
63
+
64
+ if ($('*[svg-id]',node).length > 0) {
65
+ nnew.append(node.children().filter(function(){ return this.attributes['svg-id'] != undefined; }));
66
+ }
67
+
68
+ var ntxt = nnew.serializeXML();
69
+ ntxt = ntxt.replace(/trans-xmlns/,'xmlns');
70
+
71
+ node.replaceWith($X(ntxt));
72
+
73
+ var ttarget = manifestation.adaptor.illustrator.get_node_by_svg_id(svgid);
74
+ var tnewnode = ttarget.parents('g.element[element-id]');
75
+ var tnewtype = tnewnode.attr('element-type') + '_' + tnewnode.attr('element-endpoint');
76
+
77
+ desc.refresh(function(graphrealization){
78
+ var vtarget = manifestation.adaptor.illustrator.get_node_by_svg_id(svgid);
79
+ if (vtarget.length > 0) {
80
+ vtarget.parents('g.element[element-id]').addClass('selected');
57
81
  }
82
+ manifestation.adaptor.illustrator.get_label_by_svg_id(svgid).addClass('selected');
83
+
84
+
85
+ var newnode = vtarget.parents('g.element[element-id]');
86
+ var newtype = newnode.attr('element-type') + '_' + newnode.attr('element-endpoint');
87
+ var g = graphrealization.get_description();
88
+ save['graph'] = $X(g);
89
+ save['graph'].find('[xmlns]').removeAttr('xmlns');
58
90
 
59
- var ntxt = nnew.serializeXML();
60
- ntxt = ntxt.replace(/trans-xmlns/,'xmlns');
61
-
62
- node.replaceWith($X(ntxt));
63
- desc.refresh(function(graphrealization){
64
- var vtarget = manifestation.adaptor.illustrator.get_node_by_svg_id(svgid);
65
- if (vtarget.length > 0) {
66
- vtarget.parents('g.element[element-id]').addClass('selected');
67
- }
68
- manifestation.adaptor.illustrator.get_label_by_svg_id(svgid).addClass('selected');
69
-
70
-
71
- var newnode = vtarget.parents('g.element[element-id]');
72
- var newtype = newnode.attr('element-type') + '_' + newnode.attr('element-endpoint');
73
- var g = graphrealization.get_description();
74
- save['graph'] = $X(g);
75
- save['graph'].find('[xmlns]').removeAttr('xmlns');
76
- if (newtype != origtype) {
77
- manifestation.update_details(svgid);
78
- }
91
+ if (newtype != origtype) {
92
+ manifestation.update_details(svgid);
93
+ do_main_work();
94
+ } else {
95
+ $.ajax({
96
+ type: "PUT",
97
+ url: url + "/properties/values/description/",
98
+ headers: {
99
+ "Event-Source": myid
100
+ },
101
+ data: ({'content': '<content>' + desc.get_description() + '</content>'})
102
+ });
79
103
  adaptor_update();
80
104
  format_instance_pos();
81
- });
82
-
83
- $.ajax({
84
- type: "PUT",
85
- url: url + "/properties/values/description/",
86
- headers: {
87
- "Event-Source": myid
88
- },
89
- data: ({'content': '<content>' + desc.get_description() + '</content>'})
90
- });
91
- }
105
+
106
+ document.dispatchEvent(graph_changed);
107
+ }
108
+
109
+ });
92
110
  } //}}}
@@ -5,6 +5,7 @@ var paths = '#dat_details input, #dat_details textarea, #dat_details select, #da
5
5
  var loading = false;
6
6
  var subscription;
7
7
  var subscription_state = 'less';
8
+ var graph_changed = new Event("graph:changed", {"bubbles":true, "cancelable":false});
8
9
  var save = {};
9
10
  save['state']= undefined;
10
11
  save['dsl'] = undefined;
@@ -74,8 +75,8 @@ function cockpit() { //{{{
74
75
  $("button[name=loadtestsetfile]").click(load_testsetfile);
75
76
  $("button[name=loadmodelfile]").click(load_modelfile);
76
77
  $("button[name=loadmodeltype]").click(function(e){new CustomMenu(e).menu($('#modeltypes'),load_modeltype, $("button[name=loadmodeltype]")); });
77
- $("button[name=savetestset]").click(function(){ save_testset(); });
78
- $("button[name=savesvg]").click(function(){ save_svg(); });
78
+ $("button[name=savetestsetfile]").click(function(){ save_testsetfile(); });
79
+ $("button[name=savesvgfile]").click(function(){ save_svgfile(); });
79
80
  $("button[name=state_start]").click(function(){ $(this).attr("disabled","disabled");start_instance(); });
80
81
  $("button[name=state_stop]").click(function(){ $(this).attr("disabled","disabled");stop_instance(); });
81
82
  $("button[name=state_replay]").click(function(){ $(this).attr("disabled","disabled");replay_instance(); });
@@ -117,6 +118,13 @@ function cockpit() { //{{{
117
118
  }
118
119
  ui_activate_tab("#tabexecution");
119
120
  create_instance($("body").attr('current-base'),q.load,true,false);
121
+ } else if (q.instantiate) {
122
+ if (q.instantiate.match(/https?:\/\//)) {
123
+ ui_activate_tab("#tabexecution");
124
+ create_instance_from($("body").attr('current-base'),q.instantiate,false);
125
+ } else {
126
+ alert('Nope. Url!');
127
+ }
120
128
  } else if (q.new || q.new == "") {
121
129
  ui_activate_tab("#tabinstance");
122
130
  create_instance($("body").attr('current-base'),"Plain Instance",false,false);
@@ -187,6 +195,29 @@ function check_subscription() { // {{{
187
195
  }
188
196
  }// }}}
189
197
 
198
+ function create_instance_from(base,url,exec) {// {{{
199
+ $.get({
200
+ url: url,
201
+ dataType: "text",
202
+ success: function(res) {
203
+ $.ajax({
204
+ type: "POST",
205
+ url: base,
206
+ contentType: 'application/xml',
207
+ dataType: "text",
208
+ headers: { 'CONTENT-ID': 'xml' },
209
+ data: res,
210
+ success: function(res){
211
+ var iu = (base + "//" + res + "/").replace(/\/+/g,"/").replace(/:\//,"://");
212
+ monitor_instance(iu,$("body").attr('current-resources'),false,exec);
213
+ },
214
+ error: function(a,b,c) {
215
+ alert("No CPEE running.");
216
+ }
217
+ });
218
+ }
219
+ });
220
+ }// }}}
190
221
  function create_instance(base,name,load,exec) {// {{{
191
222
  var info = name ? name : prompt("Instance info?", "Enter info here");
192
223
  if (info != null) {
@@ -331,8 +362,9 @@ function monitor_instance(cin,rep,load,exec) {// {{{
331
362
  });
332
363
  append_to_log("monitoring", "id", subscription);
333
364
  websocket();
334
- if (load || exec)
365
+ if (load || exec) {
335
366
  load_testset(exec);
367
+ }
336
368
  }
337
369
  });
338
370
  },
@@ -480,6 +512,7 @@ function adaptor_init(url,theme,dslx) { //{{{
480
512
  var g = graphrealization.get_description();
481
513
  save['graph'] = $X(g);
482
514
  save['graph'].find('[xmlns]').removeAttr('xmlns');
515
+ document.dispatchEvent(graph_changed);
483
516
  $.ajax({
484
517
  type: "PUT",
485
518
  url: url + "/properties/values/description/",
@@ -488,6 +521,9 @@ function adaptor_init(url,theme,dslx) { //{{{
488
521
  adaptor_update();
489
522
  manifestation.events.click(svgid);
490
523
  format_instance_pos();
524
+ if (manifestation.selected() == "unknown") { // nothing selected
525
+ $('#dat_details').empty();
526
+ }
491
527
  };
492
528
  adaptor_update();
493
529
  monitor_instance_pos();
@@ -728,7 +764,18 @@ function stop_instance() {// {{{
728
764
  });
729
765
  }// }}}
730
766
 
731
- function save_testset() {// {{{
767
+ function save_testsetfile() {// {{{
768
+ var def = new $.Deferred();
769
+ def.done(function(name,testset) {
770
+ var ct = new Date();
771
+ $('#savetestsetfile').attr('download',name + '_' + ct.strftime("%Y-%m-%dT%H%M%S%z") + '.xml');
772
+ $('#savetestsetfile').attr('href','data:application/xml;charset=utf-8;base64,' + $B64(testset.serializePrettyXML()));
773
+ document.getElementById('savetestsetfile').click();
774
+ });
775
+ get_testset(def);
776
+ }// }}}
777
+
778
+ function get_testset(deferred) {// {{{
732
779
  var url = $('body').attr('current-instance');
733
780
  var testset = $X('<testset/>');
734
781
 
@@ -770,27 +817,24 @@ function save_testset() {// {{{
770
817
  pars.append($(res.documentElement).children());
771
818
  pars.find('uuid').remove();
772
819
  testset.append(pars);
773
- var ct = new Date();
774
- $('#savetestset').attr('download',name + '_' + ct.strftime("%Y-%m-%dT%H%M%S%z") + '.xml');
775
- $('#savetestset').attr('href','data:application/xml;charset=utf-8;base64,' + $B64(testset.serializePrettyXML()));
776
- document.getElementById('savetestset').click();
820
+ deferred.resolve(name,testset);
777
821
  },
778
- error: report_failure
822
+ error: function() { deferred.reject(); report_failure(); }
779
823
  });
780
824
  },
781
- error: report_failure
825
+ error: function() { deferred.reject(); report_failure(); }
782
826
  });
783
827
  },
784
- error: report_failure
828
+ error: function() { deferred.reject(); report_failure(); }
785
829
  });
786
830
  },
787
- error: report_failure
831
+ error: function() { deferred.reject(); report_failure(); }
788
832
  });
789
833
  },
790
- error: report_failure
834
+ error: function() { deferred.reject(); report_failure(); }
791
835
  });
792
836
  }// }}}
793
- function save_svg() {// {{{
837
+ function save_svgfile() {// {{{
794
838
  var url = $('body').attr('current-instance');
795
839
 
796
840
  var gc = $('#graphcanvas').clone();
@@ -830,9 +874,9 @@ function save_svg() {// {{{
830
874
  success: function(res){
831
875
  var name = $(res.documentElement).text();
832
876
 
833
- $('#savesvg').attr('download',name + '.svg');
834
- $('#savesvg').attr('href','data:application/xml;charset=utf-8;base64,' + $B64(gc.serializeXML()));
835
- document.getElementById('savesvg').click();
877
+ $('#savesvgfile').attr('download',name + '.svg');
878
+ $('#savesvgfile').attr('href','data:application/xml;charset=utf-8;base64,' + $B64(gc.serializeXML()));
879
+ document.getElementById('savesvgfile').click();
836
880
  },
837
881
  error: report_failure
838
882
  });
@@ -0,0 +1,41 @@
1
+ document.addEventListener('graph:changed', function (e) {
2
+ $("button[name=save]").prop("disabled",false);
3
+ }, false);
4
+
5
+ $(document).ready(function() {
6
+ $('#tabmodel').click(function(event){
7
+ $('#model ui-behind button:nth-child(1)').addClass('hidden');
8
+ });
9
+ $('#tabdataelements').click(function(event){
10
+ $('#model ui-behind button:nth-child(1)').removeClass('hidden');
11
+ });
12
+
13
+ $('#model ui-behind button:nth-child(1)').click(function(event){
14
+ var but = $(document).find('#model ui-content ui-area:not(.inactive) button');
15
+ but.click();
16
+ var are = $(document).find('#model ui-content ui-area:not(.inactive)');
17
+ var tab = $(document).find('#model ui-content ui-area:not(.inactive) .relaxngui_table');
18
+ are.animate({ scrollTop: tab.height() }, "slow");
19
+ });
20
+
21
+ $("button[name=save]").click(function(){
22
+ var def = new $.Deferred();
23
+ def.done(function(name,testset) {
24
+ $.ajax({
25
+ url: $('body').attr('current-save') + name + '.xml',
26
+ type: 'PUT',
27
+ contentType: 'application/xml',
28
+ data: testset.serializePrettyXML(),
29
+ headers: { 'Content-ID': 'content' },
30
+ success: function() {
31
+ $("button[name=save]").prop("disabled",true);
32
+ $("#lastsavedline").removeClass('hidden');
33
+ var dt = new Date();
34
+ var time = dt.getHours() + ":" + dt.getMinutes() + ":" + dt.getSeconds();
35
+ $("#lastsaved").text(time);
36
+ }
37
+ });
38
+ });
39
+ get_testset(def);
40
+ });
41
+ });
@@ -22,6 +22,7 @@ $(document).ready(function() {
22
22
  $("input[name=base-url]").val(res['base-url']);
23
23
  $("body").attr('current-resources',res['res-url']);
24
24
  $("body").attr('current-base',res['base-url']);
25
+ $("body").attr('current-save',res['save-url']);
25
26
  $("body").attr('current-testsets',res['testsets-url']);
26
27
  cockpit();
27
28
  },
@@ -30,9 +31,11 @@ $(document).ready(function() {
30
31
  if (location.protocol.match(/^file/)) {
31
32
  $("body").attr('current-resources',"http://localhost:" + $('body').data('res-port'));
32
33
  $("body").attr('current-base',"http://localhost:" + $('body').data('base-port'));
34
+ $("body").attr('current-save',"http://localhost:" + $('body').data('base-port') + '/design');
33
35
  } else {
34
36
  $("body").attr('current-resources',location.protocol + "//" + location.hostname + ":" + $('body').data('res-port'));
35
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');
36
39
  }
37
40
  $("input[name=res-url]").val($("body").attr('current-resources'));
38
41
  $("input[name=base-url]").val($("body").attr('current-base'));