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
data/cockpit/js/wfadaptor.js
CHANGED
@@ -48,13 +48,13 @@ function WfAdaptor(theme_base,doit) { // Controller {{{
|
|
48
48
|
} // }}}
|
49
49
|
this.notify = function() { // public {{{
|
50
50
|
} // }}}
|
51
|
-
this.draw_labels = function(max,labels){ // public {{{
|
51
|
+
this.draw_labels = function(max,labels,height_shift,striped){ // public {{{
|
52
52
|
} // }}}
|
53
53
|
this.set_svg_container = function (container) { // {{{
|
54
54
|
illustrator.set_svg_container(container); // TODO: shadowing the container element
|
55
55
|
} // }}}
|
56
|
-
this.
|
57
|
-
illustrator.
|
56
|
+
this.set_label_container = function(container) { // {{{
|
57
|
+
illustrator.set_label_container(container);
|
58
58
|
} // }}}
|
59
59
|
|
60
60
|
// initialize
|
@@ -66,6 +66,7 @@ function WfAdaptor(theme_base,doit) { // Controller {{{
|
|
66
66
|
$.getScript(theme_base, function() {
|
67
67
|
manifestation = new WFAdaptorManifestation(self);
|
68
68
|
illustrator.compact = manifestation.compact == true ? true : false;
|
69
|
+
illustrator.striped = manifestation.striped == true ? true : false;
|
69
70
|
description.source = manifestation.source;
|
70
71
|
var deferreds = [];
|
71
72
|
// copy parent stuff
|
@@ -158,18 +159,20 @@ function WfIllustrator(wf_adaptor) { // View {{{
|
|
158
159
|
// public
|
159
160
|
this.height = 40;
|
160
161
|
this.width = 40;
|
161
|
-
this.
|
162
|
+
this.height_shift = this.height * 0.26;
|
163
|
+
this.width_shift = this.width * 0.39;
|
162
164
|
this.elements = {}; // the svgs
|
163
165
|
this.svg = {};
|
164
166
|
this.draw = {};
|
165
167
|
this.compact = true;
|
168
|
+
this.striped = true;
|
166
169
|
// private
|
167
170
|
var self = this;
|
168
171
|
var adaptor = null;
|
169
172
|
// }}}
|
170
173
|
// Generic Functions {{{
|
171
|
-
this.
|
172
|
-
self.svg.
|
174
|
+
this.set_label_container = function(con) { // {{{
|
175
|
+
self.svg.label_container = con;
|
173
176
|
} // }}}
|
174
177
|
this.set_svg_container = function(con) { // {{{
|
175
178
|
self.svg.container = con;
|
@@ -196,20 +199,33 @@ function WfIllustrator(wf_adaptor) { // View {{{
|
|
196
199
|
this.set_svg = function(graph) { // {{{
|
197
200
|
if(graph.max.row < 1) graph.max.row = 1;
|
198
201
|
if(graph.max.col < 1) graph.max.col = 1;
|
199
|
-
self.svg.container.attr('height', (graph.max.row) * self.height + self.
|
202
|
+
self.svg.container.attr('height', (graph.max.row) * self.height + self.height_shift);
|
200
203
|
self.svg.container.attr('width', (graph.max.col+0.55) * self.width );
|
201
204
|
self.svg.container.append(graph.svg);
|
202
205
|
} // }}}
|
203
206
|
this.get_node_by_svg_id = function(svg_id) { // {{{
|
204
207
|
return $('[element-id = \'' + svg_id + '\'] g.activities', self.svg.container);
|
205
208
|
} // }}}
|
209
|
+
this.get_label_by_svg_id = function(svg_id) { // {{{
|
210
|
+
return $('[element-id = \'' + svg_id + '\']', self.svg.label_container);
|
211
|
+
} // }}}
|
206
212
|
this.get_elements = function() { // {{{
|
207
213
|
return $('g.element', self.svg.container);
|
208
214
|
} // }}}
|
215
|
+
this.get_labels = function() { // {{{
|
216
|
+
return $('[element-id]', self.svg.label_container);
|
217
|
+
} // }}}
|
209
218
|
// }}}
|
210
219
|
// Helper Functions {{{
|
220
|
+
var draw_stripe = this.draw.draw_stripe = function (row, maxcol) { // {{{
|
221
|
+
if (maxcol < 1) maxcol = 1;
|
222
|
+
var g = $X('<rect class="stripe ' + (row % 2 == 0 ? 'even' : 'odd') + '" x="0" y="' + String(row*self.height+self.height_shift/2) + '" width="' + (self.width * maxcol + self.width - self.width_shift) + '" height="' + (self.height) + '" xmlns="http://www.w3.org/2000/svg"></rect>');
|
223
|
+
self.svg.container.prepend(g);
|
224
|
+
return g;
|
225
|
+
} // }}}
|
226
|
+
|
211
227
|
var draw_label = this.draw.draw_label = function (tname, id, label, row, col, group) { // {{{
|
212
|
-
var g = $X('<text class="label" transform="translate(' + String(
|
228
|
+
var g = $X('<text class="label" transform="translate(' + String(col*self.width-self.width_shift) + ',' + String(row*self.height+20-(self.height-self.height_shift)) + ')" xmlns="http://www.w3.org/2000/svg"></text>');
|
213
229
|
var spli = $(label.split(/\n/));
|
214
230
|
spli.each(function(k,v) {
|
215
231
|
var tspan = $X('<tspan x="0" dy="' + (spli.length > 1 ? '-7' : '0') + '" xmlns="http://www.w3.org/2000/svg"></tspan>');
|
@@ -222,20 +238,19 @@ function WfIllustrator(wf_adaptor) { // View {{{
|
|
222
238
|
}
|
223
239
|
g.append(tspan);
|
224
240
|
});
|
225
|
-
bind_event(g,tname);
|
226
241
|
if(group) { group.find('g.element[element-id=' + id + ']').append(g); }
|
227
|
-
else {self.svg.container.
|
242
|
+
else {self.svg.container.append(g);}
|
228
243
|
return g;
|
229
244
|
} // }}}
|
230
245
|
var draw_symbol = this.draw.draw_symbol = function (sname, id, title, row, col, group, addition) { // {{{
|
231
246
|
if(self.elements[sname] == undefined || self.elements[sname].svg == undefined) sname = 'unknown';
|
232
247
|
if (addition) {
|
233
248
|
var g = $X('<g class="element" element-type="' + sname + '" element-id="' + id + '" xmlns="http://www.w3.org/2000/svg">' +
|
234
|
-
'<g transform="translate(' + String(
|
249
|
+
'<g transform="translate(' + String(col*self.width-self.width_shift) + ',' + String(row*self.height-(self.height-self.height_shift)) + ')"></g>' +
|
235
250
|
'</g>');
|
236
251
|
} else {
|
237
252
|
var g = $X('<g class="element" element-type="' + sname + '" element-id="' + id + '" xmlns="http://www.w3.org/2000/svg">' +
|
238
|
-
'<g transform="translate(' + String(
|
253
|
+
'<g transform="translate(' + String(col*self.width-self.width_shift) + ',' + String(row*self.height-(self.height-self.height_shift)) + ')">' +
|
239
254
|
'<text class="super" transform="translate(30,8.4)">' +
|
240
255
|
'<tspan class="active">0</tspan>' +
|
241
256
|
'<tspan class="colon">,</tspan>' +
|
@@ -252,15 +267,15 @@ function WfIllustrator(wf_adaptor) { // View {{{
|
|
252
267
|
$(g[0].childNodes[0]).append(sym);
|
253
268
|
|
254
269
|
// Binding events for symbol
|
255
|
-
bind_event(
|
270
|
+
bind_event(g,sname,true);
|
256
271
|
|
257
272
|
if(group) {group.append(g);}
|
258
273
|
else {self.svg.container.children('g:first').append(g);}
|
259
274
|
return g;
|
260
275
|
} // }}}
|
261
|
-
var bind_event = this.draw.bind_event = function(sym,tname) { //{{{
|
276
|
+
var bind_event = this.draw.bind_event = function(sym,tname,context) { //{{{
|
262
277
|
for(event_name in adaptor.elements[tname]) {
|
263
|
-
sym.bind(event_name, {'function_call':adaptor.elements[tname][event_name]}, function(e) { e.data.function_call($(this).
|
278
|
+
sym.bind(event_name, {'function_call':adaptor.elements[tname][event_name]}, function(e) { e.data.function_call($(this).attr('element-id'),e)});
|
264
279
|
if(event_name == 'mousedown') sym.bind('contextmenu', false);
|
265
280
|
}
|
266
281
|
} //}}}
|
@@ -272,10 +287,10 @@ function WfIllustrator(wf_adaptor) { // View {{{
|
|
272
287
|
'class="block" rx="15" ry="15" xmlns="http://www.w3.org/2000/svg"/>'));
|
273
288
|
} // }}}
|
274
289
|
var draw_tile = this.draw.draw_tile = function(id, p1, p2, group) { // {{{
|
275
|
-
group.prepend($X('<rect element-id="' + id + '" x="' + (p1.col-
|
276
|
-
'y="' + (p1.row-
|
277
|
-
'width="' + ((p2.col+1
|
278
|
-
'height="' + ((p2.row+1
|
290
|
+
group.prepend($X('<rect element-id="' + id + '" x="' + ((p1.col-1)*self.width + 1.3 * self.width_shift) + '" ' +
|
291
|
+
'y="' + ((p1.row-1)*self.height+self.height_shift/2) + '" ' +
|
292
|
+
'width="' + ((p2.col+1)-p1.col)*self.width + '" ' +
|
293
|
+
'height="' + ((p2.row+1)-p1.row)*self.height +'" ' +
|
279
294
|
'class="tile" rx="15" ry="15" xmlns="http://www.w3.org/2000/svg"/>'));
|
280
295
|
} // }}}
|
281
296
|
var draw_connection = this.draw.draw_connection = function(group, start, end, max_line, num_lines, arrow) { // {{{
|
@@ -352,16 +367,24 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
352
367
|
// Set Labels //{{{
|
353
368
|
this.set_labels = function(graph) {
|
354
369
|
if (illustrator.compact == false) {
|
355
|
-
adaptor.draw_labels(graph.max,labels,illustrator.
|
370
|
+
adaptor.draw_labels(graph.max,labels,illustrator.height_shift,illustrator.striped == true ? true : false);
|
371
|
+
} else {
|
372
|
+
adaptor.draw_labels(graph.max,[],illustrator.height_shift,false);
|
373
|
+
}
|
374
|
+
if (illustrator.striped == true && illustrator.compact == false) {
|
375
|
+
for (var i=0; i < graph.max.row; i++) {
|
376
|
+
illustrator.draw.draw_stripe(i,graph.max.col);
|
377
|
+
}
|
378
|
+
}
|
379
|
+
if (illustrator.compact == false) {
|
380
|
+
if (labels.length > 0) {
|
381
|
+
_.each(labels,function(a,key) {
|
382
|
+
if (a.label && a.label[0] && a.label[0].column == 'Label' && a.label[0].value) {
|
383
|
+
illustrator.draw.draw_label(a.tname, a.element_id, a.label[0].value, a.row, graph.max.col + 1, graph.svg);
|
384
|
+
}
|
385
|
+
});
|
386
|
+
}
|
356
387
|
}
|
357
|
-
// if (illustrator.compact == false) {
|
358
|
-
// if (labels.length > 0) {
|
359
|
-
// var csscol = 0;
|
360
|
-
// _.each(labels,function(a,key) {
|
361
|
-
// // illustrator.draw.draw_label(a.tname, a.element_id, a.label, a.row, graph.max.col + 1, graph.svg);
|
362
|
-
// });
|
363
|
-
// }
|
364
|
-
// }
|
365
388
|
} //}}}
|
366
389
|
|
367
390
|
// Generic Functions {{{
|
@@ -537,6 +560,9 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
537
560
|
pos.row++;
|
538
561
|
$(root).attr('svg-id','description');
|
539
562
|
group.attr('element-id','group-description');
|
563
|
+
if (illustrator.elements[sname].label) {
|
564
|
+
labels.push({row: pos.row, element_id: 'start', tname: 'start', label: illustrator.elements[sname].label(root)});
|
565
|
+
}
|
540
566
|
illustrator.draw.draw_symbol('start', 'description', 'START', pos.row, pos.col, group);
|
541
567
|
} // }}}
|
542
568
|
|
@@ -574,22 +600,9 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
574
600
|
}
|
575
601
|
}
|
576
602
|
// }}}
|
577
|
-
// Set SVG-ID and labels {{{
|
578
|
-
if($(context).attr('id') == undefined) {
|
579
|
-
if(id_counter[tname] == undefined) id_counter[tname] = -1;
|
580
|
-
$(context).attr('svg-id', tname + '_' + (++id_counter[tname]));
|
581
|
-
} else {
|
582
|
-
$(context).attr('svg-id', $(context).attr('id'));
|
583
|
-
}
|
584
|
-
if (illustrator.elements[sname].label) {
|
585
|
-
var lab = illustrator.elements[sname].label(context);
|
586
|
-
$(context).attr('svg-label', lab);
|
587
|
-
labels.push({row: pos.row, element_id: $(context).attr('svg-id'), tname: tname, label: lab});
|
588
|
-
} else {
|
589
|
-
$(context).attr('svg-label', '');
|
590
|
-
} // }}}
|
591
603
|
|
592
604
|
var g;
|
605
|
+
set_details(tname,sname,pos,context);
|
593
606
|
[g, endnodes] = draw_position(tname,pos,prev,block,group,endnodes,context);
|
594
607
|
|
595
608
|
// Prepare next iteration {{{
|
@@ -642,6 +655,21 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
642
655
|
else {sname = tname;}
|
643
656
|
return sname;
|
644
657
|
} //}}}
|
658
|
+
var set_details = function(tname,sname,pos,context) { //{{{
|
659
|
+
if($(context).attr('id') == undefined) {
|
660
|
+
if(id_counter[tname] == undefined) id_counter[tname] = -1;
|
661
|
+
$(context).attr('svg-id', tname + '_' + (++id_counter[tname]));
|
662
|
+
} else {
|
663
|
+
$(context).attr('svg-id', $(context).attr('id'));
|
664
|
+
}
|
665
|
+
if (illustrator.elements[sname].label) {
|
666
|
+
var lab = illustrator.elements[sname].label(context);
|
667
|
+
if (lab && lab[0] && lab[0].value && lab[0].column == 'Label' && lab[0].value != '') {
|
668
|
+
$(context).attr('svg-label', lab[0].value);
|
669
|
+
}
|
670
|
+
labels.push({row: pos.row, element_id: $(context).attr('svg-id'), tname: tname, label: lab});
|
671
|
+
}
|
672
|
+
} //}}}
|
645
673
|
var draw_position = function(tname,pos,prev,block,group,endnodes,context,second) { // private {{{
|
646
674
|
var sname = sym_name(tname,context);
|
647
675
|
// Draw Symbol {{{
|
@@ -5,7 +5,8 @@ function WFAdaptorManifestation(adaptor) {
|
|
5
5
|
this.resources = {};
|
6
6
|
this.elements = {};
|
7
7
|
this.events = {};
|
8
|
-
this.compact =
|
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
|
@@ -32,11 +33,11 @@ function WFAdaptorManifestation(adaptor) {
|
|
32
33
|
return base;
|
33
34
|
}
|
34
35
|
}; //}}}
|
35
|
-
//{{{ Return the svgid for the
|
36
|
-
this.
|
36
|
+
//{{{ Return the svgid for the selected task
|
37
|
+
this.selected = function(){
|
37
38
|
var svgid = 'unknown';
|
38
39
|
_.each(self.adaptor.illustrator.get_elements(),function(value,key) {
|
39
|
-
if ($(value).hasClass('
|
40
|
+
if ($(value).hasClass('selected')) {
|
40
41
|
svgid = $(value).attr('element-id');
|
41
42
|
}
|
42
43
|
});
|
@@ -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();
|
@@ -195,7 +199,8 @@ function WFAdaptorManifestation(adaptor) {
|
|
195
199
|
return;
|
196
200
|
}
|
197
201
|
|
198
|
-
self.adaptor.illustrator.get_elements().removeClass('
|
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; }
|
@@ -210,8 +215,9 @@ function WFAdaptorManifestation(adaptor) {
|
|
210
215
|
|
211
216
|
var vtarget = self.adaptor.illustrator.get_node_by_svg_id(svgid);
|
212
217
|
if (vtarget.length > 0) {
|
213
|
-
vtarget.parents('g.element[element-id]').addClass('
|
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,20 +248,8 @@ function WFAdaptorManifestation(adaptor) {
|
|
238
248
|
'illustrator': {//{{{
|
239
249
|
'endnodes': 'this',
|
240
250
|
'label': function(node){
|
241
|
-
var
|
242
|
-
|
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
|
-
return $('> label',$(node).children('parameters')).text().replace(/^['"]/,'').replace(/['"]$/,'') + (lnd == '' ? '' : ' (Resource ' + lnd + (eplen > 1 ? ' - ' + (eplen) + ' Alternatives': ' - 1 Alternative') + ')') + (avg == '' ? '' : ' (Avg. Duration ' + avg + ' Min)');
|
251
|
+
var ret = [ { column: 'Label', value: $('> label',$(node).children('parameters')).text().replace(/^['"]/,'').replace(/['"]$/,'') } ];
|
252
|
+
return ret;
|
255
253
|
},
|
256
254
|
'info': function(node){ return { 'element-endpoint': $(node).attr('endpoint') }; },
|
257
255
|
'resolve_symbol': function(node) {
|
@@ -275,11 +273,13 @@ function WFAdaptorManifestation(adaptor) {
|
|
275
273
|
];
|
276
274
|
return [];
|
277
275
|
}, //}}}
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
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
|
+
}//}}}
|
283
283
|
}; /*}}}*/
|
284
284
|
this.elements.manipulate = { /*{{{*/
|
285
285
|
'type': 'primitive',
|
@@ -288,9 +288,9 @@ function WFAdaptorManifestation(adaptor) {
|
|
288
288
|
'label': function(node){
|
289
289
|
var lab = $(node).attr('label');
|
290
290
|
if (lab) {
|
291
|
-
return lab.replace(/^['"]/,'').replace(/['"]$/,'');
|
291
|
+
return [ { column: 'Label', value: lab.replace(/^['"]/,'').replace(/['"]$/,'') } ];
|
292
292
|
} else {
|
293
|
-
return
|
293
|
+
return [];
|
294
294
|
}
|
295
295
|
},
|
296
296
|
'svg': self.adaptor.theme_dir + 'symbols/manipulate.svg'
|
@@ -299,10 +299,12 @@ function WFAdaptorManifestation(adaptor) {
|
|
299
299
|
'permissible_children': function(node,mode) { //{{{
|
300
300
|
return [];
|
301
301
|
}, //}}}
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
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
|
+
}//}}}
|
306
308
|
}; /*}}}*/
|
307
309
|
this.elements.escape = { /*{{{*/
|
308
310
|
'type': 'primitive',
|
@@ -317,6 +319,8 @@ function WFAdaptorManifestation(adaptor) {
|
|
317
319
|
'adaptor': {//{{{
|
318
320
|
'mousedown': function (node,e) { self.events.mousedown(node,e,false,true); },
|
319
321
|
'click': self.events.click,
|
322
|
+
'mouseover': self.events.mouseover,
|
323
|
+
'mouseout': self.events.mouseout
|
320
324
|
}//}}}
|
321
325
|
}; /*}}}*/
|
322
326
|
this.elements.stop = { /*{{{*/
|
@@ -332,6 +336,8 @@ function WFAdaptorManifestation(adaptor) {
|
|
332
336
|
'adaptor': {//{{{
|
333
337
|
'mousedown': function (node,e) { self.events.mousedown(node,e,false,true); },
|
334
338
|
'click': self.events.click,
|
339
|
+
'mouseover': self.events.mouseover,
|
340
|
+
'mouseout': self.events.mouseout
|
335
341
|
}//}}}
|
336
342
|
}; /*}}}*/
|
337
343
|
this.elements.terminate = { /*{{{*/
|
@@ -347,6 +353,8 @@ function WFAdaptorManifestation(adaptor) {
|
|
347
353
|
}, //}}}
|
348
354
|
'adaptor': {//{{{
|
349
355
|
'mousedown': function (node,e) { self.events.mousedown(node,e,false,false); },
|
356
|
+
'mouseover': self.events.mouseover,
|
357
|
+
'mouseout': self.events.mouseout
|
350
358
|
}//}}}
|
351
359
|
}; /*}}}*/
|
352
360
|
this.elements.end = { /*{{{*/
|
@@ -428,10 +436,9 @@ function WFAdaptorManifestation(adaptor) {
|
|
428
436
|
this.elements.choose = { /*{{{*/
|
429
437
|
'type': 'complex',
|
430
438
|
'illustrator': {//{{{
|
431
|
-
'label': function(node){return $(node).attr('mode') == 'exclusive' ? 'exclusive' : 'inclusive' },
|
439
|
+
'label': function(node){ return [ { column: 'Label', value: $(node).attr('mode') == 'exclusive' ? 'exclusive' : 'inclusive' } ]; },
|
432
440
|
'endnodes': 'aggregate',
|
433
441
|
'closeblock': false,
|
434
|
-
'closing_symbol': 'choose_finish',
|
435
442
|
'expansion': function(node) {
|
436
443
|
return 'horizontal';
|
437
444
|
},
|
@@ -485,16 +492,12 @@ function WFAdaptorManifestation(adaptor) {
|
|
485
492
|
'click': self.events.click,
|
486
493
|
'dblclick': self.events.dblclick,
|
487
494
|
'mouseover': self.events.mouseover,
|
488
|
-
'mouseout': self.events.mouseout
|
495
|
+
'mouseout': self.events.mouseout
|
489
496
|
}//}}}
|
490
497
|
}; /*}}}*/
|
491
498
|
this.elements.otherwise = { /*{{{*/
|
492
499
|
'type': 'complex',
|
493
500
|
'illustrator': {//{{{
|
494
|
-
'label': function(node){
|
495
|
-
var avg = $('> _probability_avg',$(node).children('_probability')).text();
|
496
|
-
return (avg == '' ? '' : ' (Avg. Probability ' + avg + '%)');
|
497
|
-
},
|
498
501
|
'endnodes': 'passthrough',
|
499
502
|
'closeblock': false,
|
500
503
|
'noarrow': true,
|
@@ -575,8 +578,8 @@ function WFAdaptorManifestation(adaptor) {
|
|
575
578
|
'type': 'complex',
|
576
579
|
'illustrator': {//{{{
|
577
580
|
'label': function(node){
|
578
|
-
var
|
579
|
-
return
|
581
|
+
var ret = [ { column: 'Label', value: $(node).attr('condition') } ];
|
582
|
+
return ret;
|
580
583
|
},
|
581
584
|
'endnodes': 'passthrough',
|
582
585
|
'noarrow': true,
|
@@ -662,8 +665,8 @@ function WFAdaptorManifestation(adaptor) {
|
|
662
665
|
'type': 'complex',
|
663
666
|
'illustrator': {//{{{
|
664
667
|
'label': function(node){
|
665
|
-
var
|
666
|
-
return
|
668
|
+
var ret = [ { column: 'Label', value: $(node).attr('condition') + ($(node).attr('mode') == 'pre_test' ? ' (⭱)' : ' (⭳)') } ];
|
669
|
+
return ret;
|
667
670
|
},
|
668
671
|
'endnodes': 'this',
|
669
672
|
'closeblock': true,
|
@@ -831,7 +834,7 @@ function WFAdaptorManifestation(adaptor) {
|
|
831
834
|
},
|
832
835
|
'resolve_symbol': function(node,shift) {
|
833
836
|
if(shift == true) {
|
834
|
-
return '
|
837
|
+
return 'parallel_branch_compact';
|
835
838
|
} else {
|
836
839
|
return 'parallel_branch_normal';
|
837
840
|
}
|
@@ -1115,7 +1118,6 @@ function WFAdaptorManifestation(adaptor) {
|
|
1115
1118
|
'parent': 'call',
|
1116
1119
|
'description': self.adaptor.theme_dir + 'rngs/callmanipulate.rng',
|
1117
1120
|
'illustrator': {//{{{
|
1118
|
-
'label': function(node){return $('> label',$(node).children('parameters')).text().replace(/^['"]/,'').replace(/['"]$/,'')},
|
1119
1121
|
'info': function(node){ return { 'element-endpoint': $(node).attr('endpoint') }; },
|
1120
1122
|
'svg': self.adaptor.theme_dir + 'symbols/callmanipulate.svg'
|
1121
1123
|
},//}}}
|
@@ -1173,6 +1175,13 @@ function WFAdaptorManifestation(adaptor) {
|
|
1173
1175
|
'svg': self.adaptor.theme_dir + 'symbols/parallel_branch_event.svg'
|
1174
1176
|
}//}}}
|
1175
1177
|
}; /*}}}*/
|
1178
|
+
this.elements.parallel_branch_compact = { /*{{{*/
|
1179
|
+
'parent': 'parallel_branch',
|
1180
|
+
'illustrator': {//{{{
|
1181
|
+
'endnodes': 'this',
|
1182
|
+
'svg': self.adaptor.theme_dir + 'symbols/parallel_branch_compact.svg'
|
1183
|
+
}//}}}
|
1184
|
+
}; /*}}}*/
|
1176
1185
|
this.elements.scripts = { /*{{{*/
|
1177
1186
|
'description': [self.adaptor.theme_dir + 'rngs/update.rng',self.adaptor.theme_dir + 'rngs/finalize.rng']
|
1178
1187
|
}; /*}}}*/
|