cpee 2.0.24 → 2.0.25

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/cockpit/{templates/.CPEE.xml → CPEE.xml} +1 -1
  3. data/cockpit/{templates/.Signavio.xml → Signavio.xml} +1 -1
  4. data/cockpit/css/model.css +1 -1
  5. data/cockpit/css/ui.css +3 -1
  6. data/cockpit/edit.html +260 -0
  7. data/cockpit/index.html +0 -2
  8. data/cockpit/js/edit.js +32 -0
  9. data/cockpit/js/instance.js +28 -19
  10. data/cockpit/js/model.js +0 -25
  11. data/cockpit/js/parameters.js +3 -0
  12. data/cockpit/js/ui.js +7 -0
  13. data/cockpit/model.html +1 -0
  14. data/cockpit/themes/compact/rngs/call.rng +26 -1
  15. data/cockpit/themes/compact/rngs/callmanipulate.rng +32 -2
  16. data/cockpit/themes/compact/theme.js +57 -25
  17. data/cockpit/themes/control/rngs/call.rng +26 -1
  18. data/cockpit/themes/control/rngs/callmanipulate.rng +32 -2
  19. data/cockpit/themes/control/theme.js +50 -19
  20. data/cockpit/themes/default/rngs/call.rng +26 -1
  21. data/cockpit/themes/default/rngs/callmanipulate.rng +32 -2
  22. data/cockpit/themes/default/theme.js +49 -18
  23. data/cockpit/themes/extended/rngs/call.rng +26 -1
  24. data/cockpit/themes/extended/rngs/callmanipulate.rng +32 -2
  25. data/cockpit/themes/extended/theme.js +50 -19
  26. data/cockpit/themes/model/rngs/call.rng +21 -20
  27. data/cockpit/themes/model/rngs/callmanipulate.rng +23 -22
  28. data/cockpit/themes/model/theme.js +51 -20
  29. data/cockpit/themes/packed/rngs/call.rng +26 -1
  30. data/cockpit/themes/packed/rngs/callmanipulate.rng +32 -2
  31. data/cockpit/themes/packed/theme.js +50 -19
  32. data/cockpit/themes/preset/rngs/call.rng +26 -1
  33. data/cockpit/themes/preset/rngs/callmanipulate.rng +32 -2
  34. data/cockpit/themes/preset/theme.js +49 -18
  35. data/cockpit/{templates/.transformations.xml → transformations.xml} +0 -0
  36. data/cpee.gemspec +1 -1
  37. data/lib/callbacks.xml +5 -0
  38. data/lib/cpee/controller.rb +29 -27
  39. data/lib/cpee/implementation_callbacks.rb +53 -0
  40. data/server/handlerwrappers/default.rb +15 -3
  41. data/server/resources/transformation_dslx.xsl +1 -1
  42. data/server/routing/end.pid +1 -1
  43. data/server/routing/forward-events.pid +1 -1
  44. data/server/routing/forward-votes.pid +1 -1
  45. data/server/routing/persist.pid +1 -1
  46. data/server/routing/persist.rb +3 -3
  47. data/server/server.pid +1 -1
  48. metadata +6 -54
  49. data/cockpit/edit.html +0 -1
  50. data/cockpit/templates/.templates.xml +0 -13
  51. data/cockpit/themes/diana/rngs/alternative.rng +0 -25
  52. data/cockpit/themes/diana/rngs/call.rng +0 -149
  53. data/cockpit/themes/diana/rngs/callmanipulate.rng +0 -188
  54. data/cockpit/themes/diana/rngs/choose.rng +0 -14
  55. data/cockpit/themes/diana/rngs/closed_loop.rng +0 -62
  56. data/cockpit/themes/diana/rngs/closed_loop_cancel.rng +0 -5
  57. data/cockpit/themes/diana/rngs/closed_loop_control.rng +0 -31
  58. data/cockpit/themes/diana/rngs/closed_loop_measuring.rng +0 -12
  59. data/cockpit/themes/diana/rngs/critical.rng +0 -5
  60. data/cockpit/themes/diana/rngs/escape.rng +0 -1
  61. data/cockpit/themes/diana/rngs/group.rng +0 -3
  62. data/cockpit/themes/diana/rngs/loop.rng +0 -22
  63. data/cockpit/themes/diana/rngs/manipulate.rng +0 -9
  64. data/cockpit/themes/diana/rngs/otherwise.rng +0 -22
  65. data/cockpit/themes/diana/rngs/parallel.rng +0 -21
  66. data/cockpit/themes/diana/rngs/parallel_branch.rng +0 -8
  67. data/cockpit/themes/diana/rngs/scripts.rng +0 -23
  68. data/cockpit/themes/diana/rngs/stop.rng +0 -5
  69. data/cockpit/themes/diana/rngs/terminate.rng +0 -1
  70. data/cockpit/themes/diana/symbols/alternative.svg +0 -5
  71. data/cockpit/themes/diana/symbols/arrow.svg +0 -3
  72. data/cockpit/themes/diana/symbols/call.svg +0 -6
  73. data/cockpit/themes/diana/symbols/callmanipulate.svg +0 -8
  74. data/cockpit/themes/diana/symbols/choose.svg +0 -5
  75. data/cockpit/themes/diana/symbols/choose_exclusive.svg +0 -5
  76. data/cockpit/themes/diana/symbols/choose_inclusive.svg +0 -4
  77. data/cockpit/themes/diana/symbols/closed_loop.svg +0 -5
  78. data/cockpit/themes/diana/symbols/closed_loop_cancel.svg +0 -5
  79. data/cockpit/themes/diana/symbols/closed_loop_control.svg +0 -5
  80. data/cockpit/themes/diana/symbols/closed_loop_measuring.svg +0 -6
  81. data/cockpit/themes/diana/symbols/complex.svg +0 -8
  82. data/cockpit/themes/diana/symbols/critical.svg +0 -4
  83. data/cockpit/themes/diana/symbols/end.svg +0 -3
  84. data/cockpit/themes/diana/symbols/escape.svg +0 -5
  85. data/cockpit/themes/diana/symbols/event_end.svg +0 -3
  86. data/cockpit/themes/diana/symbols/loop.svg +0 -5
  87. data/cockpit/themes/diana/symbols/manipulate.svg +0 -4
  88. data/cockpit/themes/diana/symbols/otherwise.svg +0 -5
  89. data/cockpit/themes/diana/symbols/parallel.svg +0 -5
  90. data/cockpit/themes/diana/symbols/parallel_branch.svg +0 -5
  91. data/cockpit/themes/diana/symbols/parallel_branch_compact.svg +0 -4
  92. data/cockpit/themes/diana/symbols/parallel_branch_event.svg +0 -14
  93. data/cockpit/themes/diana/symbols/parallel_branch_normal.svg +0 -5
  94. data/cockpit/themes/diana/symbols/scripts.svg +0 -4
  95. data/cockpit/themes/diana/symbols/start.svg +0 -3
  96. data/cockpit/themes/diana/symbols/stop.svg +0 -5
  97. data/cockpit/themes/diana/symbols/terminate.svg +0 -4
  98. data/cockpit/themes/diana/theme.js +0 -1650
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ce85aa02aabbdb513ce56fc7eb7b11878290d2253a4dbad6e4ca0f308c9e4128
4
- data.tar.gz: bb30943c2256495cb8346d2ac7808549748deba62aa33d2f15e8582dba55447a
3
+ metadata.gz: a3830f81020d6eb6b83ac9eba995f7175607f8aee0279b1537e0f5415f3dab21
4
+ data.tar.gz: a3e1ce78c221dae79d973435cc6997c3dc5e8d00ce8e5cd89634b2648b75012d
5
5
  SHA512:
6
- metadata.gz: baf7bd6776dd0be3b9c677cd69ca0ece4705550d81ab5ea4f7465ecd087280d726ee96ba9db8c8df0dc365acce52749ca660f3888f1837f92a596d14437b455f
7
- data.tar.gz: 77adf09dc7471ff19ec4283cbe9296789085eed108e836589f34b18aed50946b32b24d9f7f9380bfd9f7adc19eab33652af4ef022c8785ae88fd19d07903184d
6
+ metadata.gz: 56cb04c53af5f2f7eee0c0dcbb83d339a75985e32d7584294f33f5ec755b0d4db9bd4100e0e9c692d921f7bdfe5f60be0a167f7416484ddb6f67d250bb67a013
7
+ data.tar.gz: de22ffe114afc38010c7650c75e28b067ecec6fec52df16f96f08928a1038634e175636e0cc177d4ecd88ab4de1cc1a99e53a670578041a7f6515ca718c46c7e
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0"?>
2
- <testset>
2
+ <testset xmlns="http://cpee.org/ns/properties/2.0">
3
3
  <transformation>
4
4
  <description type='copy'/>
5
5
  <dataelements type='none'/>
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0"?>
2
- <testset>
2
+ <testset xmlns="http://cpee.org/ns/properties/2.0">
3
3
  <transformation>
4
4
  <description type='rest'>http://localhost:9295/bpmn2/</description>
5
5
  <dataelements type='rest'>http://localhost:9295/bpmn2/</dataelements>
@@ -23,4 +23,4 @@
23
23
  #areamodel div.section:nth-child(4) div { white-space: normal; vertical-align: middle; margin: 0; padding: 0; }
24
24
  #areamodel div.section:nth-child(4) button[name=loadmodeltype] { white-space: normal; width: 10em; height: 2em; }
25
25
 
26
- #model ui-content { height: 6em; }
26
+ #model ui-content { height: 5em; }
data/cockpit/css/ui.css CHANGED
@@ -121,10 +121,12 @@ ui-tabbed ui-tabbar ui-behind button {
121
121
  #areainstance div.section:nth-child(2) { border-left: 1px solid var(--x-ui-border-color); padding: 0 0.5em; white-space: nowrap; }
122
122
  #areainstance div.section:nth-child(3) { border-left: 1px solid var(--x-ui-border-color); padding: 0 0 0 0.5em; white-space: nowrap; }
123
123
 
124
+ #areainstance div.section:nth-child(1) > div:nth-child(2) { white-space: normal; text-align: right; }
125
+
124
126
  #areainstance div.section:nth-child(1) div { white-space: normal; vertical-align: middle; margin: 0; padding: 0; }
125
127
  #areainstance div.section:nth-child(1) button { white-space: normal; vertical-align: middle; margin: 0; padding: 0; }
126
- #areainstance div.section:nth-child(1) div:nth-child(2) { white-space: normal; text-align: right; }
127
128
  #areainstance div.section:nth-child(1) button[name=loadtestset] { white-space: normal; width: 10em; height: 3.5em; }
129
+ #areainstance div.section:nth-child(1) button[name=save] { white-space: normal; width: 10em; height: 3.5em; margin-left: 0.2em; }
128
130
  #areainstance div.section:nth-child(1) button[name=loadtestsetfile] { white-space: normal; width: 10em; height: 3.5em; margin-left: 0.2em; }
129
131
  #areainstance div.section:nth-child(1) button[name=loadmodelfile] { white-space: normal; width: 10em; height: 2em; margin-top: 0.2em; }
130
132
 
data/cockpit/edit.html ADDED
@@ -0,0 +1,260 @@
1
+ <!--
2
+ This file is part of CPEE.
3
+
4
+ CPEE is free software: you can redistribute it and/or modify it under the terms
5
+ of the GNU General Public License as published by the Free Software Foundation,
6
+ either version 3 of the License, or (at your option) any later version.
7
+
8
+ CPEE is distributed in the hope that it will be useful, but WITHOUT ANY
9
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
10
+ PARTICULAR PURPOSE. See the GNU General Public License for more details.
11
+
12
+ You should have received a copy of the GNU General Public License along with
13
+ CPEE (file COPYING in the main directory). If not, see
14
+ <http://www.gnu.org/licenses/>.
15
+ -->
16
+
17
+ <!DOCTYPE html>
18
+ <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
19
+ <head>
20
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
21
+ <title>CPEE Cockpit</title>
22
+
23
+ <!-- libs, do not modify. When local than load local libs. -->
24
+ <script type="text/javascript" src="/js_libs/jquery.min.js"></script>
25
+ <script type="text/javascript" src="/js_libs/jquery.browser.js"></script>
26
+ <script type="text/javascript" src="/js_libs/jquery.svg.min.js"></script>
27
+ <script type="text/javascript" src="/js_libs/jquery.svgdom.min.js"></script>
28
+ <script type="text/javascript" src="/js_libs/vkbeautify.js"></script>
29
+ <script type="text/javascript" src="/js_libs/util.js"></script>
30
+ <script type="text/javascript" src="/js_libs/printf.js"></script>
31
+ <script type="text/javascript" src="/js_libs/strftime.min.js"></script>
32
+ <script type="text/javascript" src="/js_libs/parsequery.js"></script>
33
+ <script type="text/javascript" src="/js_libs/underscore.min.js"></script>
34
+ <script type="text/javascript" src="/js_libs/jquery.caret.min.js"></script>
35
+ <script type="text/javascript" src="/js_libs/jquery.cookie.js"></script>
36
+
37
+ <script type="text/javascript" src="/js_libs/relaxngui.js"></script>
38
+
39
+ <script type="text/javascript" src="/js_libs/ui.js"></script>
40
+ <script type="text/javascript" src="/js_libs/custommenu.js"></script>
41
+
42
+ <link rel="stylesheet" href="/js_libs/custommenu.css" type="text/css"/>
43
+ <link rel="stylesheet" href="/js_libs/ui.css" type="text/css"/>
44
+
45
+ <link rel="stylesheet" href="/js_libs/relaxngui.css" type="text/css"/>
46
+
47
+ <!-- modelling ui -->
48
+ <script type="text/javascript" src="js/wfadaptor.js"></script>
49
+ <link rel="stylesheet" href="css/wfadaptor.css" type="text/css"/>
50
+
51
+ <!-- custom stuff, play arround -->
52
+ <script type="text/javascript" src="js/ui.js"></script>
53
+ <script type="text/javascript" src="js/instance.js"></script>
54
+ <script type="text/javascript" src="js/details.js"></script>
55
+ <script type="text/javascript" src="js/parameters.js"></script>
56
+ <script type="text/javascript" src="js/edit.js"></script>
57
+ <link rel="stylesheet" href="css/ui.css" type="text/css"/>
58
+ <link rel="stylesheet" href="/global_ui/uicpee.css" type="text/css"/>
59
+ <style>
60
+ /* has to be fucking inline, because firefox and chrome disagree how to handle filter urls */
61
+ /* shit balls, no elegance is left in this world */
62
+ </style>
63
+ </head>
64
+ <body data-base-port="8298" data-res-port="9303" data-theme-base="themes" is="x-ui">
65
+ <div id='disclaimer' class='hidden'> <!--{{{-->
66
+ <h1>Disclaimer</h1>
67
+
68
+ <p>
69
+ We use reasonable care in creating and presenting the functionality
70
+ found in this demonstrator. It is provided purely for demonstration purposes
71
+ and you should seek further guidance and make independent enquiries
72
+ before relying upon it.
73
+ </p>
74
+
75
+ <p>
76
+ All functionality included in this demonstrator is subject to change
77
+ without notice. We make no representation or warranty whatsoever
78
+ regarding the completeness, accuracy, adequacy, suitability or
79
+ operation of this demonstrator, or of the results it produces.
80
+ </p>
81
+
82
+ <p>
83
+ We assume no responsibility for process instances created with this
84
+ demonstrator and disclaim all liability arising from negligence or
85
+ otherwise in respect of such process instances. We will not be liable
86
+ for any damages (including, without limitation, damages for any
87
+ consequential loss or loss of business opportunities or projects, or
88
+ loss of profits) howsoever arising from use of or inability to use
89
+ this demonstrator, or from any action or omission taken as a result of
90
+ using this demonstrator.
91
+ </p>
92
+
93
+ <p>
94
+ This demonstrator was created in Austria. All liability is excluded to the extent
95
+ permitted by law including any implied terms. Any interpretation of its
96
+ content, claims or disputes (of whatever nature and not limited to contractual
97
+ issues) shall be subject to the exclusive jurisdiction of the Austrian Courts
98
+ under Austrian law.
99
+ </p>
100
+
101
+
102
+ <p>
103
+ All actions performed while using this demonstrator will be logged, including
104
+ the IP address of the user.
105
+ </p>
106
+
107
+ <p>
108
+ <input id='iagree' type='checkbox'/><label for='iagree'><strong>OK, I Agree with this terms. I will be a happy person, and do no evil.</strong></label>
109
+ </p>
110
+ <p>
111
+ <button id='icontinue' disabled='disabled'>Continue</button>
112
+ </p>
113
+ </div> <!--}}}-->
114
+
115
+ <div class='hidden' id='relaxngworker'></div>
116
+
117
+ <div class='menu' id='templates'></div>
118
+ <div class='menu' id='modeltypes'></div>
119
+
120
+ <ui-tabbed id="instance">
121
+ <ui-tabbar>
122
+ <ui-tab class="switch" ></ui-tab>
123
+ <ui-tab class="" data-tab="new" id="tabnew" >New</ui-tab>
124
+ <ui-tab class="inactive hidden" data-tab="instance" id="tabinstance" >Instance</ui-tab>
125
+ <ui-tab class="inactive hidden" data-tab="execution" id="tabexecution">Execution</ui-tab>
126
+ <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>
127
+ <ui-last ><a class="logo" href=".."></a></ui-last>
128
+ </ui-tabbar>
129
+ <ui-content>
130
+ <ui-area data-belongs-to-tab="new" id="areanew"> <!--{{{-->
131
+ <table class='x-ui-layout'>
132
+ <tr>
133
+ <td>Resources:</td>
134
+ <td><input name="res-url" type="text" value=""/></td>
135
+ <td></td>
136
+ </tr>
137
+ <tr>
138
+ <td>Engine:</td>
139
+ <td><input name="base-url" type="text" value=""/></td>
140
+ <td><button name="base">create new instance</button></td>
141
+ </tr>
142
+ <tr>
143
+ <td>Instance:</td>
144
+ <td><input name="instance-url" type="text" value=""/></td>
145
+ <td><button name="instance">monitor instance</button></td>
146
+ </tr>
147
+ </table>
148
+ </ui-area> <!--}}}-->
149
+ <ui-area data-belongs-to-tab="instance" id="areainstance" class="inactive"> <!--{{{-->
150
+ <div class='section'>
151
+ <div>
152
+ <form id='fuckchrome'>
153
+ <input type='file' name='testsetfile' id='testsetfile'/>
154
+ </form>
155
+ <button title='save a testset includes various settings, subscriptions and a model' name="save" disabled=""><div>save</div><div class="hidden" id='lastsavedline'>(last: <span id="lastsaved"></span>)</div></button>
156
+ <button title='a testset includes various settings, subscriptions or a model' name="loadtestsetfile">load testset</button>
157
+ </div>
158
+ <div>
159
+ <input type='file' name='modelfile' id='modelfile'/>
160
+ <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>
161
+ </div>
162
+ </div><div class='section'>
163
+ <a id="savetestsetfile" href="" download=""></a>
164
+ <a id="savesvgfile" href="" download=""></a>
165
+ <button title='a testset includes various settings, subscriptions and a model' name="savetestsetfile">save testset</button>
166
+ <button title='a testset includes various settings, subscriptions and a model' name="savesvgfile">save svg graph</button>
167
+ </div><div class='section'>
168
+ <div>
169
+ Current model: <span id='currentmodel'></span>
170
+ </div>
171
+ <div>
172
+ <button title='a testset includes various settings, subscriptions and a model' name="loadmodeltype">set model type</button>
173
+ </div>
174
+ </div>
175
+ </ui-area> <!--}}}-->
176
+ <ui-area data-belongs-to-tab="execution" id="areaexecution" class='inactive'> <!--{{{-->
177
+ <table class='x-ui-compact'>
178
+ <tbody class='debug'>
179
+ <tr>
180
+ <td>Debugging:</td>
181
+ <td><input type="checkbox" name="votecontinue"/></td>
182
+ </tr>
183
+ </tbody>
184
+ <tbody class='exe'>
185
+ <tr>
186
+ <td>State:</td>
187
+ <td id='state'>
188
+ <span id="state_text"></span>
189
+ <span id="state_any" style='display:none'>
190
+ <span> ⇒ </span>
191
+ <button name="state_start" title='start' style='display:none'>Start</button>
192
+ <button name="state_stop" title='stop' style='display:none'>Stop</button>
193
+ <span id="state_extended" style='display:none'>
194
+ <span> / </span>
195
+ <button name="state_abandon" title='abandon' style='display:none'>Abandon</button>
196
+ </span>
197
+ </span>
198
+ </td>
199
+ </tr>
200
+ <tr>
201
+ <td>Continue:</td>
202
+ <td id='votes'></td>
203
+ </tr>
204
+ </tbody>
205
+ </table>
206
+ </ui-area> <!--}}}-->
207
+ </ui-content>
208
+ </ui-tabbed>
209
+
210
+ <ui-tabbed class="hidden" id='parameters'>
211
+ <ui-tabbar>
212
+ <ui-tab class="switch" ></ui-tab>
213
+ <ui-tab class="" data-tab="dataelements" id="tabdataelements">Data Elements</ui-tab>
214
+ <ui-tab class="inactive" data-tab="endpoints" id="tabendpoints" >Endpoints</ui-tab>
215
+ <ui-tab class="inactive" data-tab="attributes" id="tabattributes" >Attributes</ui-tab>
216
+ <ui-behind ><button title='add entry'>New</button></ui-behind>
217
+ </ui-tabbar>
218
+ <ui-content>
219
+ <ui-area data-belongs-to-tab="dataelements" id="areadataelements"> <!--{{{-->
220
+ <div id="dat_dataelements"></div>
221
+ </ui-area> <!--}}}-->
222
+ <ui-area data-belongs-to-tab="endpoints" id="areaendpoints" class="inactive"> <!--{{{-->
223
+ <table id="dat_endpoints"></table>
224
+ </ui-area> <!--}}}-->
225
+ <ui-area data-belongs-to-tab="attributes" id="areaattributes" class="inactive"> <!--{{{-->
226
+ <table id="dat_attributes"></table>
227
+ </ui-area> <!--}}}-->
228
+ </ui-content>
229
+ </ui-tabbed>
230
+
231
+ <ui-resizehandle class="hidden">drag to resize</ui-resizehandle>
232
+
233
+ <ui-rest id="main" class="hidden">
234
+ <ui-tabbar>
235
+ <ui-before ></ui-before>
236
+ <ui-tab class="" data-tab="details" id="tabdetails">Graph</ui-tab>
237
+ <ui-tab class="inactive" data-tab="dsl" id="tabdsl" >Description</ui-tab>
238
+ <ui-tab class="inactive" data-tab="log" id="tablog" >Log</ui-tab>
239
+ <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>
240
+ </ui-tabbar>
241
+ <ui-content>
242
+ <ui-area data-belongs-to-tab="details" id='graphcolumn'>
243
+ <div id='graphgrid'>
244
+ <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>
245
+ </div>
246
+ </ui-area>
247
+ <ui-resizehandle data-belongs-to-tab="details" data-label="drag to resize"></ui-resizehandle>
248
+ <ui-area data-belongs-to-tab="details" id="detailcolumn">
249
+ <div id="dat_details" class='x-ui-layout'></div>
250
+ </ui-area>
251
+ <ui-area data-belongs-to-tab="dsl" id="areadsl" class="inactive"></ui-area>
252
+ <ui-area data-belongs-to-tab="log" id="arealog" class="inactive"> <!--{{{-->
253
+ <div>Persistent Log: <a style='display:none' target='_blank' id='current-log'></a></div>
254
+ <table id="dat_log" class="x-ui-layout"></table>
255
+ </ui-area> <!--}}}-->
256
+ </ui-content>
257
+ </ui-rest>
258
+
259
+ </body>
260
+ </html>
data/cockpit/index.html CHANGED
@@ -189,8 +189,6 @@
189
189
  <button name="state_start" title='start' style='display:none'>Start</button>
190
190
  <button name="state_stop" title='stop' style='display:none'>Stop</button>
191
191
  <span id="state_extended" style='display:none'>
192
- <span> / </span>
193
- <button name="state_replay" title='replay' style='display:none'>Replay</button>
194
192
  <span> / </span>
195
193
  <button name="state_abandon" title='abandon' style='display:none'>Abandon</button>
196
194
  </span>
@@ -0,0 +1,32 @@
1
+ document.addEventListener('graph:changed', function (e) {
2
+ $("button[name=save]").prop("disabled",false);
3
+ }, false);
4
+ document.addEventListener('parameters:changed', function (e) {
5
+ $("button[name=save]").prop("disabled",false);
6
+ }, false);
7
+
8
+ $(document).ready(function() {
9
+ $("button[name=save]").click(function(){
10
+ var def = new $.Deferred();
11
+ def.done(function(name,testset) {
12
+ $.ajax({
13
+ url: $('body').attr('current-save') + ($('body').attr('current-save-dir') ? ($('body').attr('current-save-dir') + '/').replace(/\/+/,'/') : '') + name + '.xml',
14
+ type: 'PUT',
15
+ contentType: 'application/xml',
16
+ data: testset.serializePrettyXML(),
17
+ headers: { 'Content-ID': 'content' },
18
+ success: function() {
19
+ $("button[name=save]").prop("disabled",true);
20
+ $("#lastsavedline").removeClass('hidden');
21
+ var dt = new Date();
22
+ var time = dt.getHours() + ":" + dt.getMinutes() + ":" + dt.getSeconds();
23
+ $("#lastsaved").text(time);
24
+ },
25
+ error: function() {
26
+ alert('File was moved or deleted. Save testset to disk.');
27
+ }
28
+ });
29
+ });
30
+ get_testset(def);
31
+ });
32
+ });
@@ -97,12 +97,13 @@ function cockpit() { //{{{
97
97
  $("input[name=modelfile]").change(load_modelfile_after);
98
98
 
99
99
  $.ajax({
100
- url: $('body').attr('current-templates') + ".templates.xml",
101
- dataType: 'xml',
100
+ url: $('body').attr('current-templates'),
101
+ dataType: 'json',
102
102
  success: function(res){
103
- $('testset',res).each(function(){
104
- var ts = $(this).text();
105
- $('#templates').append($("<div class='menuitem'></div>").text(ts));
103
+ $(res).each(function(){
104
+ if (this.type == 'file') {
105
+ $('#templates').append($("<div class='menuitem'></div>").text(this.name.replace(/\.xml/,'')));
106
+ }
106
107
  });
107
108
  var q = $.parseQuerySimple();
108
109
  if (q.min || q.min == "") {
@@ -156,7 +157,7 @@ function cockpit() { //{{{
156
157
  }
157
158
  });
158
159
  $.ajax({
159
- url: $('body').attr('current-templates') + ".transformations.xml",
160
+ url: "transformations.xml",
160
161
  dataType: 'xml',
161
162
  success: function(res){
162
163
  $('transformation',res).each(function(){
@@ -628,8 +629,6 @@ function monitor_instance_state() {// {{{
628
629
  }// }}}
629
630
  function monitor_instance_transformation() {// {{{
630
631
  var url = $('body').attr('current-instance');
631
- console.log('hallo');
632
- console.log(url);
633
632
  $.ajax({
634
633
  type: "GET",
635
634
  url: url + "/properties/attributes/modeltype/",
@@ -658,17 +657,21 @@ function monitor_instance_pos() {// {{{
658
657
  function monitor_instance_running(content,event) {// {{{
659
658
  if (save['state'] == "stopping") return;
660
659
  if (event == "calling") {
661
- save['activity_states'][content.activity_uuid] = true
662
- format_visual_add(content.activity,"active")
663
- }
664
- if (event == "manipulating") {
665
- if (!save['activity_states'][content.activity_uuid]) {
660
+ if (!save['activity_states'][content['activity-uuid']]) {
661
+ save['activity_states'][content['activity-uuid']] = true
666
662
  format_visual_add(content.activity,"active")
667
663
  }
668
- }
669
- if (event == "done") {
670
- delete save['activity_states'][content.activity_uuid];
671
- format_visual_remove(content.activity,"active")
664
+ } else if (event == "manipulating") {
665
+ if (!save['activity_states'][content['activity-uuid']]) {
666
+ save['activity_states'][content['activity-uuid']] = true
667
+ format_visual_add(content.activity,"active")
668
+ }
669
+ } else if (event == "done") {
670
+ if (save['activity_states'][content['activity-uuid']]) {
671
+ save['activity_states'][content['activity-uuid']] = true
672
+ format_visual_remove(content.activity,"active")
673
+ setTimeout(() => {delete save['activity_states'][content['activity-uuid']]},5000);
674
+ }
672
675
  }
673
676
  } // }}}
674
677
  function monitor_instance_state_change(notification) { //{{{
@@ -718,6 +721,8 @@ function monitor_instance_state_change(notification) { //{{{
718
721
  // remove all markings with state change
719
722
  if (save['graph_adaptor'] && save['graph_adaptor'].illustrator) {
720
723
  save['graph_adaptor'].illustrator.get_elements().removeClass('marked');
724
+ localStorage.removeItem('marked');
725
+ localStorage.removeItem('marked_from');
721
726
  }
722
727
 
723
728
  if (notification != "ready" && notification != "stopped" && notification != "running") {
@@ -1004,7 +1009,11 @@ function load_testset(exec) {// {{{
1004
1009
  var name = $("#templates div.menuitem[data-selected=selected]").text();
1005
1010
  var url;
1006
1011
  if (name) {
1007
- url = $('body').attr('current-templates') + name + ".xml";
1012
+ if ($('body').attr('current-templates').match(/\?/)) {
1013
+ url = $('body').attr('current-templates').replace(/\?/,name + '.xml?');
1014
+ } else {
1015
+ url = $('body').attr('current-templates') + name + ".xml";
1016
+ }
1008
1017
  } else {
1009
1018
  if ($('body').attr('load-testset').length > 0) {
1010
1019
  url = $('body').attr('load-testset');
@@ -1038,7 +1047,7 @@ function load_modeltype() {// {{{
1038
1047
  $.ajax({
1039
1048
  cache: false,
1040
1049
  dataType: 'xml',
1041
- url: $('body').attr('current-templates') + "." + name + ".xml",
1050
+ url: name + ".xml",
1042
1051
  success: function(res){
1043
1052
  $.ajax({
1044
1053
  type: "PUT",