cpee 1.4.31 → 1.4.32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cockpit/css/ui.css +25 -6
- data/cockpit/css/wfadaptor.css +20 -10
- data/cockpit/graph.html +7 -2
- data/cockpit/index.html +2 -3
- data/cockpit/js/details.js +3 -0
- data/cockpit/js/instance.js +70 -20
- data/cockpit/js/ui.js +32 -5
- data/cockpit/js/wfadaptor.js +70 -42
- data/cockpit/themes/compact/theme.js +55 -46
- data/cockpit/themes/default/symbols/otherwise.svg +2 -1
- data/cockpit/themes/{promise/symbols/choose.svg → default/symbols/parallel_branch_compact.svg} +2 -2
- data/cockpit/themes/default/theme.js +39 -44
- data/cockpit/themes/extended/theme.js +252 -60
- data/cockpit/themes/{lego → packed}/theme.js +492 -105
- data/cockpit/track.html +39 -32
- data/cpee.gemspec +1 -1
- data/lib/cpee/controller.rb +2 -0
- data/lib/cpee/instantiation.rb +22 -5
- data/lib/cpee/value_helper.rb +1 -1
- data/lib/instantiation.xml +3 -0
- data/log/elasticsearch_logging.rb +189 -50
- data/server/handlerwrappers/default.rb +3 -3
- data/server/server.pid +1 -0
- metadata +5 -53
- data/cockpit/themes/lego/rngs/alternative.rng +0 -5
- data/cockpit/themes/lego/rngs/call.rng +0 -41
- data/cockpit/themes/lego/rngs/choose.rng +0 -8
- data/cockpit/themes/lego/rngs/critical.rng +0 -5
- data/cockpit/themes/lego/rngs/loop.rng +0 -11
- data/cockpit/themes/lego/rngs/manipulate.rng +0 -6
- data/cockpit/themes/lego/rngs/parallel.rng +0 -5
- data/cockpit/themes/lego/rngs/parallel_branch.rng +0 -8
- data/cockpit/themes/lego/symbols/alternative.svg +0 -4
- data/cockpit/themes/lego/symbols/call.svg +0 -4
- data/cockpit/themes/lego/symbols/callmanipulate.svg +0 -6
- data/cockpit/themes/lego/symbols/callori.svg +0 -4
- data/cockpit/themes/lego/symbols/choose.svg +0 -4
- data/cockpit/themes/lego/symbols/choose_exclusive.svg +0 -5
- data/cockpit/themes/lego/symbols/choose_inclusive.svg +0 -4
- data/cockpit/themes/lego/symbols/critical.svg +0 -4
- data/cockpit/themes/lego/symbols/escape.svg +0 -5
- data/cockpit/themes/lego/symbols/lego.svg +0 -72
- data/cockpit/themes/lego/symbols/loop.svg +0 -5
- data/cockpit/themes/lego/symbols/manipulate.svg +0 -4
- data/cockpit/themes/lego/symbols/otherwise.svg +0 -4
- data/cockpit/themes/lego/symbols/parallel.svg +0 -6
- data/cockpit/themes/lego/symbols/parallel_branch.svg +0 -4
- data/cockpit/themes/lego/symbols/scripts.svg +0 -4
- data/cockpit/themes/lego/symbols/start.svg +0 -3
- data/cockpit/themes/promise/rngs/alternative.rng +0 -5
- data/cockpit/themes/promise/rngs/call.rng +0 -41
- data/cockpit/themes/promise/rngs/choose.rng +0 -8
- data/cockpit/themes/promise/rngs/critical.rng +0 -5
- data/cockpit/themes/promise/rngs/loop.rng +0 -11
- data/cockpit/themes/promise/rngs/manipulate.rng +0 -6
- data/cockpit/themes/promise/rngs/parallel.rng +0 -5
- data/cockpit/themes/promise/rngs/parallel_branch.rng +0 -8
- data/cockpit/themes/promise/symbols/alternative.svg +0 -4
- data/cockpit/themes/promise/symbols/call.svg +0 -4
- data/cockpit/themes/promise/symbols/callmanipulate.svg +0 -6
- data/cockpit/themes/promise/symbols/choose_exclusive.svg +0 -5
- data/cockpit/themes/promise/symbols/choose_inclusive.svg +0 -4
- data/cockpit/themes/promise/symbols/critical.svg +0 -4
- data/cockpit/themes/promise/symbols/escape.svg +0 -5
- data/cockpit/themes/promise/symbols/loop.svg +0 -5
- data/cockpit/themes/promise/symbols/manipulate.svg +0 -4
- data/cockpit/themes/promise/symbols/otherwise.svg +0 -4
- data/cockpit/themes/promise/symbols/parallel.svg +0 -6
- data/cockpit/themes/promise/symbols/parallel_branch.svg +0 -4
- data/cockpit/themes/promise/symbols/preminder.svg +0 -6
- data/cockpit/themes/promise/symbols/scripts.svg +0 -4
- data/cockpit/themes/promise/symbols/start.svg +0 -3
- data/cockpit/themes/promise/theme.js +0 -801
@@ -1,4 +1,5 @@
|
|
1
1
|
<svg class="clickable" xmlns="http://www.w3.org/2000/svg">
|
2
|
-
<circle cx="15" cy="15" r="
|
2
|
+
<circle cx="15" cy="15" r="11" class="hfill standtrans"/>
|
3
3
|
<line x1="9" y1="21" x2="21" y2="9" class="stand cline hline"/>
|
4
|
+
<line x1="15.6" y1="4" x2="15.6" y2="27" class="ourline"/>
|
4
5
|
</svg>
|
data/cockpit/themes/{promise/symbols/choose.svg → default/symbols/parallel_branch_compact.svg}
RENAMED
@@ -1,4 +1,4 @@
|
|
1
1
|
<svg class="clickable" xmlns="http://www.w3.org/2000/svg">
|
2
|
-
<rect transform="rotate(45,14,12)" x="7" y="3" width="21" height="21" class="stand"/>
|
3
|
-
<
|
2
|
+
<rect transform="rotate(45,14,12)" x="7" y="3" width="21" height="21" class="cline hfill stand"/>
|
3
|
+
<text transform="translate(15,20)" class="small">|||</text>
|
4
4
|
</svg>
|
@@ -6,6 +6,7 @@ function WFAdaptorManifestation(adaptor) {
|
|
6
6
|
this.elements = {};
|
7
7
|
this.events = {};
|
8
8
|
this.compact = false;
|
9
|
+
this.striped = false;
|
9
10
|
this.endpoints = {};
|
10
11
|
|
11
12
|
//{{{ transform the details data to description parts based on rng
|
@@ -64,6 +65,9 @@ function WFAdaptorManifestation(adaptor) {
|
|
64
65
|
var schema = save['endpoints_cache'][$(node).attr('endpoint')].schema.documentElement;
|
65
66
|
$(rng).find(' > element[name="parameters"] > element[name="arguments"]').replaceWith($(schema).clone());
|
66
67
|
}
|
68
|
+
if (save['endpoints_list'][$(node).attr('endpoint')] && !save['endpoints_list'][$(node).attr('endpoint')].startsWith('http')) {
|
69
|
+
$(rng).find(' > element[name="parameters"] > element[name="method"]').remove();
|
70
|
+
}
|
67
71
|
save['details'] = new RelaxNGui(rng,tab,self.adaptor.description.context_eval,true);
|
68
72
|
save['details'].content(node);
|
69
73
|
format_visual_forms();
|
@@ -196,6 +200,7 @@ function WFAdaptorManifestation(adaptor) {
|
|
196
200
|
}
|
197
201
|
|
198
202
|
self.adaptor.illustrator.get_elements().removeClass('selected');
|
203
|
+
self.adaptor.illustrator.get_labels().removeClass('selected');
|
199
204
|
|
200
205
|
if (e && e.ctrlKey) {
|
201
206
|
if (save['state'] != "ready" && save['state'] != "stopped") { return false; }
|
@@ -212,6 +217,7 @@ function WFAdaptorManifestation(adaptor) {
|
|
212
217
|
if (vtarget.length > 0) {
|
213
218
|
vtarget.parents('g.element[element-id]').addClass('selected');
|
214
219
|
}
|
220
|
+
self.adaptor.illustrator.get_label_by_svg_id(svgid).addClass('selected');
|
215
221
|
|
216
222
|
self.update_details(svgid);
|
217
223
|
}
|
@@ -219,11 +225,15 @@ function WFAdaptorManifestation(adaptor) {
|
|
219
225
|
this.events.dblclick = function(svgid, e) { // {{{
|
220
226
|
} // }}}
|
221
227
|
this.events.mouseover = function(svgid, e) { // {{{
|
222
|
-
|
228
|
+
self.adaptor.illustrator.svg.container.find('.tile[element-id = "' + svgid + '"]').css('display','block');
|
229
|
+
self.adaptor.illustrator.svg.container.find('[element-id = "' + svgid + '"]').addClass('hover');
|
230
|
+
self.adaptor.illustrator.svg.label_container.find('[element-id = "' + svgid + '"]').addClass('hover');
|
223
231
|
return false;
|
224
232
|
} // }}}
|
225
233
|
this.events.mouseout = function(svgid, e) { // {{{
|
226
|
-
|
234
|
+
self.adaptor.illustrator.svg.container.find('.tile[element-id = "' + svgid + '"]').css('display','none');
|
235
|
+
self.adaptor.illustrator.svg.container.find('[element-id = "' + svgid + '"]').removeClass('hover');
|
236
|
+
self.adaptor.illustrator.svg.label_container.find('[element-id = "' + svgid + '"]').removeClass('hover');
|
227
237
|
return false;
|
228
238
|
} // }}}
|
229
239
|
this.events.dragstart = function (svgid, e) { //{{{
|
@@ -238,27 +248,7 @@ function WFAdaptorManifestation(adaptor) {
|
|
238
248
|
'illustrator': {//{{{
|
239
249
|
'endnodes': 'this',
|
240
250
|
'label': function(node){
|
241
|
-
var ep = self.endpoints[$(node).attr('endpoint')];
|
242
|
-
var eplen = 1;
|
243
|
-
if (ep != undefined && ep[0] == '[') {
|
244
|
-
try {
|
245
|
-
eplen = JSON.parse(ep).length;
|
246
|
-
} catch(e) {
|
247
|
-
eplen = 1;
|
248
|
-
}
|
249
|
-
} else {
|
250
|
-
eplen = 1;
|
251
|
-
}
|
252
|
-
var avg = $('> _timing_avg',$(node).children('_timing')).text();
|
253
|
-
var lnd = $(node).attr('endpoint');
|
254
251
|
var ret = [ { column: 'Label', value: $('> label',$(node).children('parameters')).text().replace(/^['"]/,'').replace(/['"]$/,'') } ];
|
255
|
-
if (lnd != '') {
|
256
|
-
ret.push({ column: 'Resource', value: lnd });
|
257
|
-
ret.push({ column: 'R#', value: eplen });
|
258
|
-
}
|
259
|
-
if (avg != '') {
|
260
|
-
ret.push({ column: 'Average', value: avg + 'min' });
|
261
|
-
}
|
262
252
|
return ret;
|
263
253
|
},
|
264
254
|
'info': function(node){ return { 'element-endpoint': $(node).attr('endpoint') }; },
|
@@ -283,11 +273,13 @@ function WFAdaptorManifestation(adaptor) {
|
|
283
273
|
];
|
284
274
|
return [];
|
285
275
|
}, //}}}
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
276
|
+
'adaptor': {//{{{
|
277
|
+
'mousedown': function (node,e) { self.events.mousedown(node,e,true,true); },
|
278
|
+
'click': self.events.click,
|
279
|
+
'dragstart': self.events.dragstart,
|
280
|
+
'mouseover': self.events.mouseover,
|
281
|
+
'mouseout': self.events.mouseout
|
282
|
+
}//}}}
|
291
283
|
}; /*}}}*/
|
292
284
|
this.elements.manipulate = { /*{{{*/
|
293
285
|
'type': 'primitive',
|
@@ -307,10 +299,12 @@ function WFAdaptorManifestation(adaptor) {
|
|
307
299
|
'permissible_children': function(node,mode) { //{{{
|
308
300
|
return [];
|
309
301
|
}, //}}}
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
302
|
+
'adaptor': {//{{{
|
303
|
+
'mousedown': function (node,e) { self.events.mousedown(node,e,false,true); },
|
304
|
+
'click': self.events.click,
|
305
|
+
'mouseover': self.events.mouseover,
|
306
|
+
'mouseout': self.events.mouseout
|
307
|
+
}//}}}
|
314
308
|
}; /*}}}*/
|
315
309
|
this.elements.escape = { /*{{{*/
|
316
310
|
'type': 'primitive',
|
@@ -325,6 +319,8 @@ function WFAdaptorManifestation(adaptor) {
|
|
325
319
|
'adaptor': {//{{{
|
326
320
|
'mousedown': function (node,e) { self.events.mousedown(node,e,false,true); },
|
327
321
|
'click': self.events.click,
|
322
|
+
'mouseover': self.events.mouseover,
|
323
|
+
'mouseout': self.events.mouseout
|
328
324
|
}//}}}
|
329
325
|
}; /*}}}*/
|
330
326
|
this.elements.stop = { /*{{{*/
|
@@ -340,6 +336,8 @@ function WFAdaptorManifestation(adaptor) {
|
|
340
336
|
'adaptor': {//{{{
|
341
337
|
'mousedown': function (node,e) { self.events.mousedown(node,e,false,true); },
|
342
338
|
'click': self.events.click,
|
339
|
+
'mouseover': self.events.mouseover,
|
340
|
+
'mouseout': self.events.mouseout
|
343
341
|
}//}}}
|
344
342
|
}; /*}}}*/
|
345
343
|
this.elements.terminate = { /*{{{*/
|
@@ -355,6 +353,8 @@ function WFAdaptorManifestation(adaptor) {
|
|
355
353
|
}, //}}}
|
356
354
|
'adaptor': {//{{{
|
357
355
|
'mousedown': function (node,e) { self.events.mousedown(node,e,false,false); },
|
356
|
+
'mouseover': self.events.mouseover,
|
357
|
+
'mouseout': self.events.mouseout
|
358
358
|
}//}}}
|
359
359
|
}; /*}}}*/
|
360
360
|
this.elements.end = { /*{{{*/
|
@@ -493,16 +493,12 @@ function WFAdaptorManifestation(adaptor) {
|
|
493
493
|
'click': self.events.click,
|
494
494
|
'dblclick': self.events.dblclick,
|
495
495
|
'mouseover': self.events.mouseover,
|
496
|
-
'mouseout': self.events.mouseout
|
496
|
+
'mouseout': self.events.mouseout
|
497
497
|
}//}}}
|
498
498
|
}; /*}}}*/
|
499
499
|
this.elements.otherwise = { /*{{{*/
|
500
500
|
'type': 'complex',
|
501
501
|
'illustrator': {//{{{
|
502
|
-
'label': function(node){
|
503
|
-
var avg = $('> _probability_avg',$(node).children('_probability')).text();
|
504
|
-
return (avg == '' ? [] : [ {}, {}, {}, {}, { column: 'Average', value: avg + '%' } ]);
|
505
|
-
},
|
506
502
|
'endnodes': 'passthrough',
|
507
503
|
'closeblock': false,
|
508
504
|
'noarrow': true,
|
@@ -583,11 +579,7 @@ function WFAdaptorManifestation(adaptor) {
|
|
583
579
|
'type': 'complex',
|
584
580
|
'illustrator': {//{{{
|
585
581
|
'label': function(node){
|
586
|
-
var avg = $('> _probability_avg',$(node).children('_probability')).text();
|
587
582
|
var ret = [ { column: 'Label', value: $(node).attr('condition') } ];
|
588
|
-
if (avg != '') {
|
589
|
-
ret.push({}, {}, {}, {},{ column: 'Average', value: avg + '%' });
|
590
|
-
}
|
591
583
|
return ret;
|
592
584
|
},
|
593
585
|
'endnodes': 'passthrough',
|
@@ -674,11 +666,7 @@ function WFAdaptorManifestation(adaptor) {
|
|
674
666
|
'type': 'complex',
|
675
667
|
'illustrator': {//{{{
|
676
668
|
'label': function(node){
|
677
|
-
var avg = $('> _probability_avg',$(node).children('_probability')).text();
|
678
669
|
var ret = [ { column: 'Label', value: $(node).attr('condition') + ($(node).attr('mode') == 'pre_test' ? ' (⭱)' : ' (⭳)') } ];
|
679
|
-
if (avg != '') {
|
680
|
-
ret.push({ column: 'Average', value: avg + '⨉' });
|
681
|
-
}
|
682
670
|
return ret;
|
683
671
|
},
|
684
672
|
'endnodes': 'this',
|
@@ -1188,6 +1176,13 @@ function WFAdaptorManifestation(adaptor) {
|
|
1188
1176
|
'svg': self.adaptor.theme_dir + 'symbols/parallel_branch_event.svg'
|
1189
1177
|
}//}}}
|
1190
1178
|
}; /*}}}*/
|
1179
|
+
this.elements.parallel_branch_compact = { /*{{{*/
|
1180
|
+
'parent': 'parallel_branch',
|
1181
|
+
'illustrator': {//{{{
|
1182
|
+
'endnodes': 'this',
|
1183
|
+
'svg': self.adaptor.theme_dir + 'symbols/parallel_branch_compact.svg'
|
1184
|
+
}//}}}
|
1185
|
+
}; /*}}}*/
|
1191
1186
|
this.elements.scripts = { /*{{{*/
|
1192
1187
|
'description': [self.adaptor.theme_dir + 'rngs/update.rng',self.adaptor.theme_dir + 'rngs/finalize.rng']
|
1193
1188
|
}; /*}}}*/
|
@@ -6,10 +6,9 @@ function WFAdaptorManifestation(adaptor) {
|
|
6
6
|
this.elements = {};
|
7
7
|
this.events = {};
|
8
8
|
this.compact = false;
|
9
|
+
this.striped = true;
|
9
10
|
this.endpoints = {};
|
10
11
|
|
11
|
-
this.noarrow = ['alternative', 'otherwise'];
|
12
|
-
|
13
12
|
//{{{ transform the details data to description parts based on rng
|
14
13
|
this.source = function(base,opts) {
|
15
14
|
if (base[0].namespaceURI == "http://relaxng.org/ns/structure/1.0") {
|
@@ -34,11 +33,11 @@ function WFAdaptorManifestation(adaptor) {
|
|
34
33
|
return base;
|
35
34
|
}
|
36
35
|
}; //}}}
|
37
|
-
//{{{ Return the svgid for the
|
38
|
-
this.
|
36
|
+
//{{{ Return the svgid for the selected task
|
37
|
+
this.selected = function(){
|
39
38
|
var svgid = 'unknown';
|
40
39
|
_.each(self.adaptor.illustrator.get_elements(),function(value,key) {
|
41
|
-
if ($(value).hasClass('
|
40
|
+
if ($(value).hasClass('selected')) {
|
42
41
|
svgid = $(value).attr('element-id');
|
43
42
|
}
|
44
43
|
});
|
@@ -66,6 +65,9 @@ function WFAdaptorManifestation(adaptor) {
|
|
66
65
|
var schema = save['endpoints_cache'][$(node).attr('endpoint')].schema.documentElement;
|
67
66
|
$(rng).find(' > element[name="parameters"] > element[name="arguments"]').replaceWith($(schema).clone());
|
68
67
|
}
|
68
|
+
if (save['endpoints_list'][$(node).attr('endpoint')] && !save['endpoints_list'][$(node).attr('endpoint')].startsWith('http')) {
|
69
|
+
$(rng).find(' > element[name="parameters"] > element[name="method"]').remove();
|
70
|
+
}
|
69
71
|
save['details'] = new RelaxNGui(rng,tab,self.adaptor.description.context_eval,true);
|
70
72
|
save['details'].content(node);
|
71
73
|
format_visual_forms();
|
@@ -189,12 +191,16 @@ function WFAdaptorManifestation(adaptor) {
|
|
189
191
|
}
|
190
192
|
return false;
|
191
193
|
} // }}}
|
194
|
+
this.events.suppress = function(svgid, e, child, sibling) { // {{{
|
195
|
+
return false;
|
196
|
+
} // }}}
|
192
197
|
this.events.click = function(svgid, e) { // {{{
|
193
198
|
if (self.adaptor.description.get_node_by_svg_id(svgid).length == 0) {
|
194
199
|
return;
|
195
200
|
}
|
196
201
|
|
197
|
-
self.adaptor.illustrator.get_elements().removeClass('
|
202
|
+
self.adaptor.illustrator.get_elements().removeClass('selected');
|
203
|
+
self.adaptor.illustrator.get_labels().removeClass('selected');
|
198
204
|
|
199
205
|
if (e && e.ctrlKey) {
|
200
206
|
if (save['state'] != "ready" && save['state'] != "stopped") { return false; }
|
@@ -209,8 +215,9 @@ function WFAdaptorManifestation(adaptor) {
|
|
209
215
|
|
210
216
|
var vtarget = self.adaptor.illustrator.get_node_by_svg_id(svgid);
|
211
217
|
if (vtarget.length > 0) {
|
212
|
-
vtarget.parents('g.element[element-id]').addClass('
|
218
|
+
vtarget.parents('g.element[element-id]').addClass('selected');
|
213
219
|
}
|
220
|
+
self.adaptor.illustrator.get_label_by_svg_id(svgid).addClass('selected');
|
214
221
|
|
215
222
|
self.update_details(svgid);
|
216
223
|
}
|
@@ -218,11 +225,15 @@ function WFAdaptorManifestation(adaptor) {
|
|
218
225
|
this.events.dblclick = function(svgid, e) { // {{{
|
219
226
|
} // }}}
|
220
227
|
this.events.mouseover = function(svgid, e) { // {{{
|
221
|
-
|
228
|
+
self.adaptor.illustrator.svg.container.find('.tile[element-id = "' + svgid + '"]').css('display','block');
|
229
|
+
self.adaptor.illustrator.svg.container.find('[element-id = "' + svgid + '"]').addClass('hover');
|
230
|
+
self.adaptor.illustrator.svg.label_container.find('[element-id = "' + svgid + '"]').addClass('hover');
|
222
231
|
return false;
|
223
232
|
} // }}}
|
224
233
|
this.events.mouseout = function(svgid, e) { // {{{
|
225
|
-
|
234
|
+
self.adaptor.illustrator.svg.container.find('.tile[element-id = "' + svgid + '"]').css('display','none');
|
235
|
+
self.adaptor.illustrator.svg.container.find('[element-id = "' + svgid + '"]').removeClass('hover');
|
236
|
+
self.adaptor.illustrator.svg.label_container.find('[element-id = "' + svgid + '"]').removeClass('hover');
|
226
237
|
return false;
|
227
238
|
} // }}}
|
228
239
|
this.events.dragstart = function (svgid, e) { //{{{
|
@@ -237,9 +248,37 @@ function WFAdaptorManifestation(adaptor) {
|
|
237
248
|
'illustrator': {//{{{
|
238
249
|
'endnodes': 'this',
|
239
250
|
'label': function(node){
|
240
|
-
var
|
241
|
-
var
|
242
|
-
|
251
|
+
var rep = $('body').attr('current-resources');
|
252
|
+
var ep = self.endpoints[$(node).attr('endpoint')];
|
253
|
+
var avg = $('> _timing_avg',$(node).children('_timing')).text();
|
254
|
+
var lab = $('> label',$(node).children('parameters')).text().replace(/^['"]/,'').replace(/['"]$/,'');
|
255
|
+
var ret = [ { column: 'ID', value: $(node).attr('id') } ];
|
256
|
+
if (lab != '') {
|
257
|
+
ret.unshift( { column: 'Label', value: lab } );
|
258
|
+
}
|
259
|
+
if (ep != undefined) {
|
260
|
+
var lnd = $(node).attr('endpoint');
|
261
|
+
ret.push({ column: 'Resource', value: lnd });
|
262
|
+
if (save['endpoints_cache'][lnd] && save['endpoints_cache'][lnd].properties) {
|
263
|
+
var prop = save['endpoints_cache'][lnd].properties;
|
264
|
+
if (prop.resource) {
|
265
|
+
if (prop.resource == 'exclusive' && prop.lock) {
|
266
|
+
ret.push({ column: 'RP', value: prop.resource + ' (' + prop.lock + ')' });
|
267
|
+
} else {
|
268
|
+
ret.push({ column: 'RP', value: prop.resource });
|
269
|
+
}
|
270
|
+
}
|
271
|
+
if (prop.alternatives) {
|
272
|
+
ret.push({ column: 'R#', value: prop.alternatives.length + 1});
|
273
|
+
} else {
|
274
|
+
ret.push({ column: 'R#', value: '1' });
|
275
|
+
}
|
276
|
+
}
|
277
|
+
}
|
278
|
+
if (avg != '') {
|
279
|
+
ret.push({ column: 'Average', value: avg + 'min' });
|
280
|
+
}
|
281
|
+
return ret;
|
243
282
|
},
|
244
283
|
'info': function(node){ return { 'element-endpoint': $(node).attr('endpoint') }; },
|
245
284
|
'resolve_symbol': function(node) {
|
@@ -263,23 +302,24 @@ function WFAdaptorManifestation(adaptor) {
|
|
263
302
|
];
|
264
303
|
return [];
|
265
304
|
}, //}}}
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
305
|
+
'adaptor': {//{{{
|
306
|
+
'mousedown': function (node,e) { self.events.mousedown(node,e,true,true); },
|
307
|
+
'click': self.events.click,
|
308
|
+
'dragstart': self.events.dragstart,
|
309
|
+
'mouseover': self.events.mouseover,
|
310
|
+
'mouseout': self.events.mouseout
|
311
|
+
}//}}}
|
271
312
|
}; /*}}}*/
|
272
313
|
this.elements.manipulate = { /*{{{*/
|
273
314
|
'type': 'primitive',
|
274
315
|
'illustrator': {//{{{
|
275
316
|
'endnodes': 'this',
|
276
317
|
'label': function(node){
|
277
|
-
var lid = $(node).attr('id');
|
278
318
|
var lab = $(node).attr('label');
|
279
319
|
if (lab) {
|
280
|
-
return
|
320
|
+
return [ { column: 'Label', value: lab.replace(/^['"]/,'').replace(/['"]$/,'') }, { column: 'ID', value: $(node).attr('id') } ];
|
281
321
|
} else {
|
282
|
-
return
|
322
|
+
return [ { column: 'ID', value: $(node).attr('id') } ];
|
283
323
|
}
|
284
324
|
},
|
285
325
|
'svg': self.adaptor.theme_dir + 'symbols/manipulate.svg'
|
@@ -288,10 +328,12 @@ function WFAdaptorManifestation(adaptor) {
|
|
288
328
|
'permissible_children': function(node,mode) { //{{{
|
289
329
|
return [];
|
290
330
|
}, //}}}
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
331
|
+
'adaptor': {//{{{
|
332
|
+
'mousedown': function (node,e) { self.events.mousedown(node,e,false,true); },
|
333
|
+
'click': self.events.click,
|
334
|
+
'mouseover': self.events.mouseover,
|
335
|
+
'mouseout': self.events.mouseout
|
336
|
+
}//}}}
|
295
337
|
}; /*}}}*/
|
296
338
|
this.elements.escape = { /*{{{*/
|
297
339
|
'type': 'primitive',
|
@@ -306,12 +348,17 @@ function WFAdaptorManifestation(adaptor) {
|
|
306
348
|
'adaptor': {//{{{
|
307
349
|
'mousedown': function (node,e) { self.events.mousedown(node,e,false,true); },
|
308
350
|
'click': self.events.click,
|
351
|
+
'mouseover': self.events.mouseover,
|
352
|
+
'mouseout': self.events.mouseout
|
309
353
|
}//}}}
|
310
354
|
}; /*}}}*/
|
311
355
|
this.elements.stop = { /*{{{*/
|
312
356
|
'type': 'primitive',
|
313
357
|
'illustrator': {//{{{
|
314
358
|
'endnodes': 'this',
|
359
|
+
'label': function(node){
|
360
|
+
return [ { column: 'ID', value: $(node).attr('id') } ];
|
361
|
+
},
|
315
362
|
'svg': self.adaptor.theme_dir + 'symbols/stop.svg'
|
316
363
|
},//}}}
|
317
364
|
'description': self.adaptor.theme_dir + 'rngs/stop.rng',
|
@@ -321,6 +368,8 @@ function WFAdaptorManifestation(adaptor) {
|
|
321
368
|
'adaptor': {//{{{
|
322
369
|
'mousedown': function (node,e) { self.events.mousedown(node,e,false,true); },
|
323
370
|
'click': self.events.click,
|
371
|
+
'mouseover': self.events.mouseover,
|
372
|
+
'mouseout': self.events.mouseout
|
324
373
|
}//}}}
|
325
374
|
}; /*}}}*/
|
326
375
|
this.elements.terminate = { /*{{{*/
|
@@ -335,8 +384,83 @@ function WFAdaptorManifestation(adaptor) {
|
|
335
384
|
return [];
|
336
385
|
}, //}}}
|
337
386
|
'adaptor': {//{{{
|
338
|
-
'mousedown': function (node,e) { self.events.mousedown(node,e,false,
|
387
|
+
'mousedown': function (node,e) { self.events.mousedown(node,e,false,false); },
|
388
|
+
'mouseover': self.events.mouseover,
|
389
|
+
'mouseout': self.events.mouseout
|
390
|
+
}//}}}
|
391
|
+
}; /*}}}*/
|
392
|
+
this.elements.end = { /*{{{*/
|
393
|
+
'type': 'primitive',
|
394
|
+
'illustrator': {//{{{
|
395
|
+
'endnodes': 'this',
|
396
|
+
'svg': self.adaptor.theme_dir + 'symbols/end.svg'
|
397
|
+
}, //}}}
|
398
|
+
'adaptor': {//{{{
|
399
|
+
'mousedown': function (node,e) {
|
400
|
+
self.events.suppress();
|
401
|
+
}
|
402
|
+
}//}}}
|
403
|
+
}; /*}}}*/
|
404
|
+
this.elements.event_end = { /*{{{*/
|
405
|
+
'type': 'primitive',
|
406
|
+
'illustrator': {//{{{
|
407
|
+
'endnodes': 'this',
|
408
|
+
'svg': self.adaptor.theme_dir + 'symbols/event_end.svg'
|
409
|
+
}, //}}}
|
410
|
+
'adaptor': {//{{{
|
411
|
+
'mousedown': function (node,e) {
|
412
|
+
self.events.suppress();
|
413
|
+
},
|
339
414
|
'click': self.events.click,
|
415
|
+
'dblclick': self.events.dblclick,
|
416
|
+
'mouseover': self.events.mouseover,
|
417
|
+
'mouseout': self.events.mouseout
|
418
|
+
}//}}}
|
419
|
+
}; /*}}}*/
|
420
|
+
this.elements.choose_finish = { /*{{{*/
|
421
|
+
'type': 'primitive',
|
422
|
+
'illustrator': {//{{{
|
423
|
+
'endnodes': 'this',
|
424
|
+
'svg': self.adaptor.theme_dir + 'symbols/choose_inclusive.svg',
|
425
|
+
'resolve_symbol': function(node) {
|
426
|
+
if($(node).attr('mode') == 'exclusive') {
|
427
|
+
return 'choose_exclusive_finish';
|
428
|
+
} else {
|
429
|
+
return 'choose_inclusive_finish';
|
430
|
+
}
|
431
|
+
},
|
432
|
+
}, //}}}
|
433
|
+
'adaptor': {//{{{
|
434
|
+
'mousedown': function (node,e) {
|
435
|
+
self.events.mousedown(node,e,true,true);
|
436
|
+
},
|
437
|
+
'click': self.events.click,
|
438
|
+
'dblclick': self.events.dblclick,
|
439
|
+
'mouseover': self.events.mouseover,
|
440
|
+
'mouseout': self.events.mouseout
|
441
|
+
}//}}}
|
442
|
+
}; /*}}}*/
|
443
|
+
this.elements.parallel_finish = { /*{{{*/
|
444
|
+
'type': 'primitive',
|
445
|
+
'illustrator': {//{{{
|
446
|
+
'endnodes': 'this',
|
447
|
+
'svg': self.adaptor.theme_dir + 'symbols/parallel.svg',
|
448
|
+
'resolve_symbol': function(node) {
|
449
|
+
if($(node).attr('wait') == '-1') {
|
450
|
+
return 'parallel_simple';
|
451
|
+
} else {
|
452
|
+
return 'parallel_complex';
|
453
|
+
}
|
454
|
+
},
|
455
|
+
}, //}}}
|
456
|
+
'adaptor': {//{{{
|
457
|
+
'mousedown': function (node,e) {
|
458
|
+
self.events.mousedown(node,e,true,true);
|
459
|
+
},
|
460
|
+
'click': self.events.click,
|
461
|
+
'dblclick': self.events.dblclick,
|
462
|
+
'mouseover': self.events.mouseover,
|
463
|
+
'mouseout': self.events.mouseout
|
340
464
|
}//}}}
|
341
465
|
}; /*}}}*/
|
342
466
|
|
@@ -344,9 +468,10 @@ function WFAdaptorManifestation(adaptor) {
|
|
344
468
|
this.elements.choose = { /*{{{*/
|
345
469
|
'type': 'complex',
|
346
470
|
'illustrator': {//{{{
|
347
|
-
'label': function(node){return $(node).attr('mode') == 'exclusive' ? 'exclusive' : 'inclusive' },
|
471
|
+
'label': function(node){ return [ { column: 'Label', value: $(node).attr('mode') == 'exclusive' ? 'exclusive' : 'inclusive' } ]; },
|
348
472
|
'endnodes': 'aggregate',
|
349
473
|
'closeblock': false,
|
474
|
+
'closing_symbol': 'choose_finish',
|
350
475
|
'expansion': function(node) {
|
351
476
|
return 'horizontal';
|
352
477
|
},
|
@@ -400,14 +525,19 @@ function WFAdaptorManifestation(adaptor) {
|
|
400
525
|
'click': self.events.click,
|
401
526
|
'dblclick': self.events.dblclick,
|
402
527
|
'mouseover': self.events.mouseover,
|
403
|
-
'mouseout': self.events.mouseout
|
528
|
+
'mouseout': self.events.mouseout
|
404
529
|
}//}}}
|
405
530
|
}; /*}}}*/
|
406
531
|
this.elements.otherwise = { /*{{{*/
|
407
532
|
'type': 'complex',
|
408
533
|
'illustrator': {//{{{
|
534
|
+
'label': function(node){
|
535
|
+
var avg = $('> _probability_avg',$(node).children('_probability')).text();
|
536
|
+
return (avg == '' ? [] : [ { column: 'Average', value: avg + '%' } ]);
|
537
|
+
},
|
409
538
|
'endnodes': 'passthrough',
|
410
539
|
'closeblock': false,
|
540
|
+
'noarrow': true,
|
411
541
|
'expansion': function(node) {
|
412
542
|
return 'vertical';
|
413
543
|
},
|
@@ -484,8 +614,16 @@ function WFAdaptorManifestation(adaptor) {
|
|
484
614
|
this.elements.alternative = { /*{{{*/
|
485
615
|
'type': 'complex',
|
486
616
|
'illustrator': {//{{{
|
487
|
-
'label': function(node){
|
617
|
+
'label': function(node){
|
618
|
+
var avg = $('> _probability_avg',$(node).children('_probability')).text();
|
619
|
+
var ret = [ { column: 'Label', value: $(node).attr('condition') } ];
|
620
|
+
if (avg != '') {
|
621
|
+
ret.push({ column: 'Average', value: avg + '%' });
|
622
|
+
}
|
623
|
+
return ret;
|
624
|
+
},
|
488
625
|
'endnodes': 'passthrough',
|
626
|
+
'noarrow': true,
|
489
627
|
'closeblock':false,
|
490
628
|
'expansion': function(node) {
|
491
629
|
return 'vertical';
|
@@ -567,7 +705,14 @@ function WFAdaptorManifestation(adaptor) {
|
|
567
705
|
this.elements.loop = { /*{{{*/
|
568
706
|
'type': 'complex',
|
569
707
|
'illustrator': {//{{{
|
570
|
-
'label': function(node){
|
708
|
+
'label': function(node){
|
709
|
+
var avg = $('> _probability_avg',$(node).children('_probability')).text();
|
710
|
+
var ret = [ { column: 'Label', value: $(node).attr('condition') + ($(node).attr('mode') == 'pre_test' ? ' (⭱)' : ' (⭳)') } ];
|
711
|
+
if (avg != '') {
|
712
|
+
ret.push({ column: 'Average', value: avg + 'x' });
|
713
|
+
}
|
714
|
+
return ret;
|
715
|
+
},
|
571
716
|
'endnodes': 'this',
|
572
717
|
'closeblock': true,
|
573
718
|
'expansion': function(node) {
|
@@ -655,9 +800,9 @@ function WFAdaptorManifestation(adaptor) {
|
|
655
800
|
this.elements.parallel = { /*{{{*/
|
656
801
|
'type': 'complex',
|
657
802
|
'illustrator': {//{{{
|
658
|
-
'endnodes': '
|
803
|
+
'endnodes': 'aggregate',
|
659
804
|
'closeblock': false,
|
660
|
-
'
|
805
|
+
'closing_symbol': 'parallel_finish',
|
661
806
|
'expansion': function(node) {
|
662
807
|
// check if any sibling other than 'parallel_branch' is present
|
663
808
|
if($(node).children(':not(parallel_branch)').length > 0) return 'vertical';
|
@@ -670,49 +815,37 @@ function WFAdaptorManifestation(adaptor) {
|
|
670
815
|
},//}}}
|
671
816
|
'description': self.adaptor.theme_dir + 'rngs/parallel.rng',
|
672
817
|
'permissible_children': function(node,mode) { //{{{
|
818
|
+
var func = null;
|
819
|
+
if (mode == 'into') { func = self.adaptor.description.insert_first_into }
|
820
|
+
else { func = self.adaptor.description.insert_after }
|
673
821
|
var childs = [
|
674
822
|
{'label': 'Service Call with Scripts',
|
675
|
-
'function_call':
|
823
|
+
'function_call': func,
|
676
824
|
'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
|
677
825
|
'type': 'callmanipulate',
|
678
826
|
'params': [self.adaptor.description.elements.callmanipulate, node]},
|
679
827
|
{'label': 'Service Call',
|
680
|
-
'function_call':
|
828
|
+
'function_call': func,
|
681
829
|
'menu_icon': self.elements.call.illustrator.svg.clone(),
|
682
830
|
'type': 'call',
|
683
831
|
'params': [self.adaptor.description.elements.call, node]},
|
684
832
|
{'label': 'Manipulate',
|
685
|
-
'function_call':
|
833
|
+
'function_call': func,
|
686
834
|
'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
|
687
835
|
'type': 'manipulate',
|
688
836
|
'params': [self.adaptor.description.elements.manipulate, node]},
|
689
837
|
{'label': 'Decision',
|
690
|
-
'function_call':
|
838
|
+
'function_call': func,
|
691
839
|
'menu_icon': self.elements.choose.illustrator.svg.clone(),
|
692
840
|
'type': 'choose',
|
693
841
|
'params': [self.adaptor.description.elements.choose, node]},
|
694
842
|
{'label': 'Loop',
|
695
|
-
'function_call':
|
843
|
+
'function_call': func,
|
696
844
|
'menu_icon': self.elements.loop.illustrator.svg.clone(),
|
697
845
|
'type': 'loop',
|
698
846
|
'params': [self.adaptor.description.elements.loop, node]},
|
699
|
-
{'label': 'Terminate',
|
700
|
-
'function_call': self.adaptor.description.insert_last_into,
|
701
|
-
'menu_icon': self.elements.terminate.illustrator.svg.clone(),
|
702
|
-
'type': 'terminate',
|
703
|
-
'params': [self.adaptor.description.elements.terminate, node]},
|
704
|
-
{'label': 'Stop',
|
705
|
-
'function_call': self.adaptor.description.insert_last_into,
|
706
|
-
'menu_icon': self.elements.stop.illustrator.svg.clone(),
|
707
|
-
'type': 'stop',
|
708
|
-
'params': [self.adaptor.description.elements.stop, node]},
|
709
|
-
{'label': 'Critical',
|
710
|
-
'function_call': self.adaptor.description.insert_last_into,
|
711
|
-
'menu_icon': self.elements.critical.illustrator.svg.clone(),
|
712
|
-
'type': 'critical',
|
713
|
-
'params': [self.adaptor.description.elements.critical, node]},
|
714
847
|
{'label': 'Parallel Branch',
|
715
|
-
'function_call':
|
848
|
+
'function_call': func,
|
716
849
|
'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
|
717
850
|
'type': 'parallel_branch',
|
718
851
|
'params': [self.adaptor.description.elements.parallel_branch, node]}
|
@@ -738,11 +871,19 @@ function WFAdaptorManifestation(adaptor) {
|
|
738
871
|
this.elements.parallel_branch = { /*{{{*/
|
739
872
|
'type': 'complex',
|
740
873
|
'illustrator': {//{{{
|
741
|
-
'endnodes': '
|
874
|
+
'endnodes': 'passthrough',
|
742
875
|
'closeblock': false,
|
876
|
+
'noarrow': true,
|
743
877
|
'expansion': function(node) {
|
744
878
|
return 'vertical';
|
745
879
|
},
|
880
|
+
'resolve_symbol': function(node,shift) {
|
881
|
+
if(shift == true) {
|
882
|
+
return 'parallel_branch_event';
|
883
|
+
} else {
|
884
|
+
return 'parallel_branch_normal';
|
885
|
+
}
|
886
|
+
},
|
746
887
|
'col_shift': function(node) {
|
747
888
|
if(node.parentNode.tagName == 'choose') return false;
|
748
889
|
if($(node).parents('parallel').first().children(':not(parallel_branch)').length > 0) return true;
|
@@ -814,7 +955,12 @@ function WFAdaptorManifestation(adaptor) {
|
|
814
955
|
}, //}}}
|
815
956
|
'adaptor': {//{{{
|
816
957
|
'mousedown': function (node,e) {
|
817
|
-
self.
|
958
|
+
var xml_node = self.adaptor.description.get_node_by_svg_id(node);
|
959
|
+
if(xml_node.get(0).parentNode.tagName == 'parallel') {
|
960
|
+
self.events.mousedown(node,e,true,false);
|
961
|
+
} else {
|
962
|
+
self.events.mousedown(node,e,true,true);
|
963
|
+
}
|
818
964
|
},
|
819
965
|
'click': self.events.click,
|
820
966
|
'dblclick': self.events.dblclick,
|
@@ -935,10 +1081,13 @@ function WFAdaptorManifestation(adaptor) {
|
|
935
1081
|
'type': 'description',
|
936
1082
|
'illustrator': {//{{{
|
937
1083
|
'endnodes': 'passthrough',
|
1084
|
+
'label': function(node){ return [ { column: 'Label'}, { column: 'ID' }, { column: 'Resource' }, { column: 'RP' }, { column: 'R#' } ]; },
|
938
1085
|
'closeblock': false,
|
1086
|
+
'balance': true,
|
939
1087
|
'expansion': function(node) {
|
940
1088
|
return 'vertical';
|
941
1089
|
},
|
1090
|
+
'closing_symbol': 'end',
|
942
1091
|
'col_shift': function(node) {
|
943
1092
|
return true;
|
944
1093
|
},
|
@@ -1012,31 +1161,74 @@ function WFAdaptorManifestation(adaptor) {
|
|
1012
1161
|
// * they may only have an illustrator (or other parts)
|
1013
1162
|
// * they HAVE TO have a parent
|
1014
1163
|
this.elements.callmanipulate = { /*{{{*/
|
1015
|
-
'type': 'abstract',
|
1016
1164
|
'parent': 'call',
|
1017
1165
|
'description': self.adaptor.theme_dir + 'rngs/callmanipulate.rng',
|
1018
1166
|
'illustrator': {//{{{
|
1019
|
-
'label': function(node){return $('> label',$(node).children('parameters')).text().replace(/^['"]/,'').replace(/['"]$/,'')},
|
1020
1167
|
'info': function(node){ return { 'element-endpoint': $(node).attr('endpoint') }; },
|
1021
1168
|
'svg': self.adaptor.theme_dir + 'symbols/callmanipulate.svg'
|
1022
1169
|
},//}}}
|
1023
1170
|
}; /*}}}*/
|
1024
1171
|
this.elements.choose_inclusive = { /*{{{*/
|
1025
|
-
'type': 'abstract',
|
1026
1172
|
'parent': 'choose',
|
1027
1173
|
'illustrator': {//{{{
|
1028
1174
|
'svg': self.adaptor.theme_dir + 'symbols/choose_inclusive.svg'
|
1029
|
-
}
|
1175
|
+
}//}}}
|
1030
1176
|
}; /*}}}*/
|
1031
1177
|
this.elements.choose_exclusive = { /*{{{*/
|
1032
|
-
'type': 'abstract',
|
1033
1178
|
'parent': 'choose',
|
1034
1179
|
'illustrator': {//{{{
|
1035
1180
|
'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg'
|
1036
1181
|
},//}}}
|
1037
1182
|
}; /*}}}*/
|
1183
|
+
this.elements.choose_inclusive_finish = { /*{{{*/
|
1184
|
+
'parent': 'choose_finish',
|
1185
|
+
'illustrator': {//{{{
|
1186
|
+
'svg': self.adaptor.theme_dir + 'symbols/choose_inclusive.svg'
|
1187
|
+
}//}}}
|
1188
|
+
}; /*}}}*/
|
1189
|
+
this.elements.choose_exclusive_finish = { /*{{{*/
|
1190
|
+
'parent': 'choose_finish',
|
1191
|
+
'illustrator': {//{{{
|
1192
|
+
'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg'
|
1193
|
+
},//}}}
|
1194
|
+
}; /*}}}*/
|
1195
|
+
this.elements.parallel_simple = { /*{{{*/
|
1196
|
+
'parent': 'parallel_finish',
|
1197
|
+
'illustrator': {//{{{
|
1198
|
+
'svg': self.adaptor.theme_dir + 'symbols/parallel.svg'
|
1199
|
+
}//}}}
|
1200
|
+
}; /*}}}*/
|
1201
|
+
this.elements.parallel_complex = { /*{{{*/
|
1202
|
+
'parent': 'parallel_finish',
|
1203
|
+
'illustrator': {//{{{
|
1204
|
+
'svg': self.adaptor.theme_dir + 'symbols/complex.svg'
|
1205
|
+
},//}}}
|
1206
|
+
}; /*}}}*/
|
1207
|
+
this.elements.parallel_branch_normal = { /*{{{*/
|
1208
|
+
'parent': 'parallel_branch',
|
1209
|
+
'illustrator': {//{{{
|
1210
|
+
'svg': self.adaptor.theme_dir + 'symbols/parallel_branch_normal.svg'
|
1211
|
+
}//}}}
|
1212
|
+
}; /*}}}*/
|
1213
|
+
this.elements.parallel_branch_event = { /*{{{*/
|
1214
|
+
'parent': 'parallel_branch',
|
1215
|
+
'illustrator': {//{{{
|
1216
|
+
'endnodes': 'this',
|
1217
|
+
'noarrow': false,
|
1218
|
+
'border': true,
|
1219
|
+
'wide': true,
|
1220
|
+
'closing_symbol': 'event_end',
|
1221
|
+
'svg': self.adaptor.theme_dir + 'symbols/parallel_branch_event.svg'
|
1222
|
+
}//}}}
|
1223
|
+
}; /*}}}*/
|
1224
|
+
this.elements.parallel_branch_compact = { /*{{{*/
|
1225
|
+
'parent': 'parallel_branch',
|
1226
|
+
'illustrator': {//{{{
|
1227
|
+
'endnodes': 'this',
|
1228
|
+
'svg': self.adaptor.theme_dir + 'symbols/parallel_branch_compact.svg'
|
1229
|
+
}//}}}
|
1230
|
+
}; /*}}}*/
|
1038
1231
|
this.elements.scripts = { /*{{{*/
|
1039
|
-
'type': 'abstract',
|
1040
1232
|
'description': [self.adaptor.theme_dir + 'rngs/update.rng',self.adaptor.theme_dir + 'rngs/finalize.rng']
|
1041
1233
|
}; /*}}}*/
|
1042
1234
|
}
|