cpee 1.3.227 → 1.3.228
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cockpit/graph.html +20 -68
- data/cockpit/index.html +8 -3
- data/cockpit/js/details.js +10 -6
- data/cockpit/js/instance.js +96 -32
- data/cockpit/js/parameters.js +1 -1
- data/cockpit/js/ui.js +5 -2
- data/cockpit/js/wfadaptor.js +7 -1
- data/cockpit/themes/default/symbols/call.svg +4 -2
- data/cockpit/themes/default/symbols/callmanipulate.svg +4 -2
- data/cockpit/themes/default/theme.js +12 -71
- data/cpee.gemspec +1 -1
- data/lib/cpee/instantiation.rb +43 -7
- data/lib/instantiation.xml +4 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbc00d4cc392c45741226693aa58715be500b4a0
|
4
|
+
data.tar.gz: 5f79a14e4dfdf827a711c05f048a1d4f321a479e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b5840bf68f2cfc6d8a27506693494ae81a5d9d426377f3e8adb06e28bb74c02e5c798e9d97164b739a68be0c3b241c43bb3d942916b2a36d2d66842fb02740e
|
7
|
+
data.tar.gz: a04c39ef3d00e65fb722f3cef9241ac3682b3680a847e2d57dee5130a518f61559c9f707e7a9b51b023ac4e22fcf8e4274f67fd238e559431847543d2b5701b3
|
data/cockpit/graph.html
CHANGED
@@ -21,76 +21,28 @@
|
|
21
21
|
<title>CPEE Cockpit</title>
|
22
22
|
|
23
23
|
<!-- libs, do not modify. When local than load local libs. -->
|
24
|
-
<script type="text/javascript">
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
document.write('<script type="text/javascript" src="http://localhost/js_libs/jquery.caret.min.js">\x3C/script>');
|
37
|
-
document.write('<script type="text/javascript" src="http://localhost/js_libs/jquery.cookie.js">\x3C/script>');
|
38
|
-
document.write('<script type="text/javascript" src="http://localhost/js_libs/relaxngui.js">\x3C/script>');
|
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>
|
39
36
|
|
40
|
-
|
41
|
-
document.write('<script type="text/javascript" src="http://localhost/js_libs/custommenu.js">\x3C/script>');
|
37
|
+
<script type="text/javascript" src="/js_libs/relaxngui.js"></script>
|
42
38
|
|
43
|
-
|
44
|
-
|
39
|
+
<script type="text/javascript" src="/js_libs/ui.js"></script>
|
40
|
+
<script type="text/javascript" src="/js_libs/custommenu.js"></script>
|
45
41
|
|
46
|
-
|
47
|
-
|
48
|
-
document.write('<script type="text/javascript" src="https://localhost/js_libs/jquery.min.js">\x3C/script>');
|
49
|
-
document.write('<script type="text/javascript" src="https://localhost/js_libs/jquery.browser.js">\x3C/script>');
|
50
|
-
document.write('<script type="text/javascript" src="https://localhost/js_libs/jquery.svg.min.js">\x3C/script>');
|
51
|
-
document.write('<script type="text/javascript" src="https://localhost/js_libs/jquery.svgdom.min.js">\x3C/script>');
|
52
|
-
document.write('<script type="text/javascript" src="https://localhost/js_libs/vkbeautify.js">\x3C/script>');
|
53
|
-
document.write('<script type="text/javascript" src="https://localhost/js_libs/util.js">\x3C/script>');
|
54
|
-
document.write('<script type="text/javascript" src="https://localhost/js_libs/printf.js">\x3C/script>');
|
55
|
-
document.write('<script type="text/javascript" src="https://localhost/js_libs/strftime.min.js">\x3C/script>');
|
56
|
-
document.write('<script type="text/javascript" src="https://localhost/js_libs/parsequery.js">\x3C/script>');
|
57
|
-
document.write('<script type="text/javascript" src="https://localhost/js_libs/underscore.min.js">\x3C/script>');
|
58
|
-
document.write('<script type="text/javascript" src="https://localhost/js_libs/jquery.caret.min.js">\x3C/script>');
|
59
|
-
document.write('<script type="text/javascript" src="https://localhost/js_libs/jquery.cookie.js">\x3C/script>');
|
60
|
-
document.write('<script type="text/javascript" src="https://localhost/js_libs/relaxngui.js">\x3C/script>');
|
42
|
+
<link rel="stylesheet" href="/js_libs/custommenu.css" type="text/css"/>
|
43
|
+
<link rel="stylesheet" href="/js_libs/ui.css" type="text/css"/>
|
61
44
|
|
62
|
-
|
63
|
-
document.write('<script type="text/javascript" src="https://localhost/js_libs/custommenu.js">\x3C/script>');
|
64
|
-
|
65
|
-
document.write('<link rel="stylesheet" href="https://localhost/js_libs/custommenu.css" type="text/css"/>');
|
66
|
-
document.write('<link rel="stylesheet" href="https://localhost/js_libs/ui.css" type="text/css"/>');
|
67
|
-
|
68
|
-
document.write('<link rel="stylesheet" href="https://localhost/js_libs/relaxngui.css" type="text/css"/>');
|
69
|
-
} else {
|
70
|
-
document.write('<script type="text/javascript" src="http://gruppe.wst.univie.ac.at/js_libs/jquery.min.js">\x3C/script>');
|
71
|
-
document.write('<script type="text/javascript" src="http://gruppe.wst.univie.ac.at/js_libs/jquery.browser.js">\x3C/script>');
|
72
|
-
document.write('<script type="text/javascript" src="http://gruppe.wst.univie.ac.at/js_libs/jquery.svg.min.js">\x3C/script>');
|
73
|
-
document.write('<script type="text/javascript" src="http://gruppe.wst.univie.ac.at/js_libs/jquery.svgdom.min.js">\x3C/script>');
|
74
|
-
document.write('<script type="text/javascript" src="http://gruppe.wst.univie.ac.at/js_libs/vkbeautify.js">\x3C/script>');
|
75
|
-
document.write('<script type="text/javascript" src="http://gruppe.wst.univie.ac.at/js_libs/util.js">\x3C/script>');
|
76
|
-
document.write('<script type="text/javascript" src="http://gruppe.wst.univie.ac.at/js_libs/printf.js">\x3C/script>');
|
77
|
-
document.write('<script type="text/javascript" src="http://gruppe.wst.univie.ac.at/js_libs/strftime.min.js">\x3C/script>');
|
78
|
-
document.write('<script type="text/javascript" src="http://gruppe.wst.univie.ac.at/js_libs/parsequery.js">\x3C/script>');
|
79
|
-
document.write('<script type="text/javascript" src="http://gruppe.wst.univie.ac.at/js_libs/underscore.min.js">\x3C/script>');
|
80
|
-
document.write('<script type="text/javascript" src="http://gruppe.wst.univie.ac.at/js_libs/jquery.caret.min.js">\x3C/script>');
|
81
|
-
document.write('<script type="text/javascript" src="http://gruppe.wst.univie.ac.at/js_libs/jquery.cookie.js">\x3C/script>');
|
82
|
-
|
83
|
-
document.write('<script type="text/javascript" src="http://gruppe.wst.univie.ac.at/js_libs/relaxngui.js">\x3C/script>');
|
84
|
-
|
85
|
-
document.write('<script type="text/javascript" src="http://gruppe.wst.univie.ac.at/js_libs/ui.js">\x3C/script>');
|
86
|
-
document.write('<script type="text/javascript" src="http://gruppe.wst.univie.ac.at/js_libs/custommenu.js">\x3C/script>');
|
87
|
-
|
88
|
-
document.write('<link rel="stylesheet" href="http://gruppe.wst.univie.ac.at/js_libs/custommenu.css" type="text/css"/>');
|
89
|
-
document.write('<link rel="stylesheet" href="http://gruppe.wst.univie.ac.at/js_libs/ui.css" type="text/css"/>');
|
90
|
-
|
91
|
-
document.write('<link rel="stylesheet" href="http://gruppe.wst.univie.ac.at/js_libs/relaxngui.css" type="text/css"/>');
|
92
|
-
}
|
93
|
-
</script>
|
45
|
+
<link rel="stylesheet" href="/js_libs/relaxngui.css" type="text/css"/>
|
94
46
|
|
95
47
|
<!-- modelling ui -->
|
96
48
|
<script type="text/javascript" src="js/wfadaptor.js"></script>
|
@@ -103,11 +55,11 @@
|
|
103
55
|
<script type="text/javascript" src="js/parameters.js"></script>
|
104
56
|
<link rel="stylesheet" href="css/ui.css" type="text/css"/>
|
105
57
|
</head>
|
106
|
-
<body data-
|
58
|
+
<body data-base-port="9298" data-res-port="9303" data-theme-base="themes" is="x-ui">
|
107
59
|
<div class='hidden'>
|
60
|
+
<input name="repo-url" type="text" value=""/>
|
108
61
|
<input name="base-url" type="text" value=""/>
|
109
62
|
<input name="instance-url" type="text" value=""/>
|
110
|
-
<a id='current-instance' href=''></a>
|
111
63
|
</div>
|
112
64
|
<div id='graphcolumn' style='overflow: auto'>
|
113
65
|
<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>
|
data/cockpit/index.html
CHANGED
@@ -59,7 +59,7 @@
|
|
59
59
|
/* shit balls, no elegance is left in this world */
|
60
60
|
</style>
|
61
61
|
</head>
|
62
|
-
<body data-
|
62
|
+
<body data-base-port="9298" data-res-port="9303" data-theme-base="themes" is="x-ui">
|
63
63
|
<div id='disclaimer' class='hidden'> <!--{{{-->
|
64
64
|
<h1>Disclaimer</h1>
|
65
65
|
|
@@ -127,12 +127,17 @@
|
|
127
127
|
<ui-area data-belongs-to-tab="new" id="areanew"> <!--{{{-->
|
128
128
|
<table class='layout'>
|
129
129
|
<tr>
|
130
|
-
<td>
|
130
|
+
<td>Repository:</td>
|
131
|
+
<td><input name="repo-url" type="text" value=""/></td>
|
132
|
+
<td></td>
|
133
|
+
</tr>
|
134
|
+
<tr>
|
135
|
+
<td>Engine:</td>
|
131
136
|
<td><input name="base-url" type="text" value=""/></td>
|
132
137
|
<td><button name="base">create new instance</button></td>
|
133
138
|
</tr>
|
134
139
|
<tr>
|
135
|
-
<td>Instance
|
140
|
+
<td>Instance:</td>
|
136
141
|
<td><input name="instance-url" type="text" value=""/></td>
|
137
142
|
<td><button name="instance">monitor instance</button></td>
|
138
143
|
</tr>
|
data/cockpit/js/details.js
CHANGED
@@ -30,9 +30,11 @@ function do_main_save() { //{{{
|
|
30
30
|
var svgid = save['details_target'].svgid;
|
31
31
|
var desc = save['details_target'].model;
|
32
32
|
var node = desc.get_node_by_svg_id(svgid);
|
33
|
-
var
|
33
|
+
var orignode = save['graph_adaptor'].illustrator.get_node_by_svg_id(svgid).parents('g.element[element-id]');
|
34
|
+
var origtype = orignode.attr('element-type') + '_' + orignode.attr('element-endpoint');
|
34
35
|
|
35
|
-
|
36
|
+
|
37
|
+
var url = $('body').attr('current-instance');
|
36
38
|
$('#main ui-tabbar ui-behind button').removeClass('highlight');
|
37
39
|
save['details'].set_checkpoint();
|
38
40
|
|
@@ -58,13 +60,15 @@ function do_main_save() { //{{{
|
|
58
60
|
if (vtarget.length > 0) {
|
59
61
|
vtarget.parents('g.element[element-id]').addClass('clicked');
|
60
62
|
}
|
61
|
-
var
|
62
|
-
|
63
|
-
manifestation.update_details(svgid);
|
64
|
-
}
|
63
|
+
var newnode = vtarget.parents('g.element[element-id]');
|
64
|
+
var newtype = newnode.attr('element-type') + '_' + newnode.attr('element-endpoint');
|
65
65
|
var g = graphrealization.get_description();
|
66
66
|
save['graph'] = $X(g);
|
67
67
|
save['graph'].find('[xmlns]').removeAttr('xmlns');
|
68
|
+
if (newtype != origtype) {
|
69
|
+
manifestation.update_details(svgid);
|
70
|
+
}
|
71
|
+
adaptor_update();
|
68
72
|
});
|
69
73
|
|
70
74
|
$.ajax({
|
data/cockpit/js/instance.js
CHANGED
@@ -11,6 +11,7 @@ var save = {};
|
|
11
11
|
save['graph_theme'] = undefined;
|
12
12
|
save['graph_adaptor'] = undefined;
|
13
13
|
save['endpoints'] = undefined;
|
14
|
+
save['endpoints_cache'] = {};
|
14
15
|
save['dataelements'] = undefined;
|
15
16
|
save['attributes'] = undefined;
|
16
17
|
save['details'] = undefined;
|
@@ -126,17 +127,17 @@ function cockpit() { //{{{
|
|
126
127
|
});
|
127
128
|
} //}}}
|
128
129
|
|
129
|
-
function sanitize_url() { //{{{
|
130
|
-
var url =
|
130
|
+
function sanitize_url(it) { //{{{
|
131
|
+
var url = it.val();
|
131
132
|
var lastChar = url.substr(url.length - 1)
|
132
133
|
if (lastChar != '/') {
|
133
|
-
|
134
|
+
it.val(url + '/');
|
134
135
|
}
|
135
|
-
return
|
136
|
+
return it.val();
|
136
137
|
}
|
137
138
|
//}}}
|
138
139
|
function check_subscription() { // {{{
|
139
|
-
var url = $(
|
140
|
+
var url = $('body').attr('current-instance');
|
140
141
|
var num = 0;
|
141
142
|
if ($("input[name=votecontinue]").is(':checked')) num += 1;
|
142
143
|
if (num > 0 && subscription_state == 'less') {
|
@@ -191,7 +192,7 @@ function create_instance(ask,exec) {// {{{
|
|
191
192
|
}// }}}
|
192
193
|
|
193
194
|
function websocket() {
|
194
|
-
var url = $(
|
195
|
+
var url = $('body').attr('current-instance');
|
195
196
|
var Socket = "MozWebSocket" in window ? MozWebSocket : WebSocket;
|
196
197
|
if (ws) ws.close();
|
197
198
|
ws = new Socket(url.replace(/http/,'ws') + "/notifications/subscriptions/" + subscription + "/ws/");
|
@@ -254,7 +255,8 @@ function websocket() {
|
|
254
255
|
}
|
255
256
|
|
256
257
|
function monitor_instance(load,exec) {// {{{
|
257
|
-
var url = sanitize_url();
|
258
|
+
var url = sanitize_url($("input[name=instance-url]"));
|
259
|
+
var rep = sanitize_url($("input[name=repo-url]"));
|
258
260
|
|
259
261
|
$('.tabbehind button').hide();
|
260
262
|
$('#dat_details').empty();
|
@@ -267,6 +269,9 @@ function monitor_instance(load,exec) {// {{{
|
|
267
269
|
$("ui-resizehandle.hidden").removeClass("hidden");
|
268
270
|
$("ui-tabbed ui-tab.hidden, ui-rest ui-tab.hidden").removeClass("hidden");
|
269
271
|
|
272
|
+
$("body").attr('current-instance',url);
|
273
|
+
$("body").attr('current-repo',rep);
|
274
|
+
|
270
275
|
// Change url to return to current instance when reloading
|
271
276
|
$("#current-instance").text(url);
|
272
277
|
$("#current-instance").attr('href',url);
|
@@ -309,16 +314,60 @@ function monitor_instance(load,exec) {// {{{
|
|
309
314
|
}// }}}
|
310
315
|
|
311
316
|
function monitor_instance_values(val) {// {{{
|
312
|
-
var url = $(
|
317
|
+
var url = $('body').attr('current-instance');
|
313
318
|
$.ajax({
|
314
319
|
type: "GET",
|
315
320
|
url: url + "/properties/values/" + val + "/",
|
316
321
|
success: function(res){
|
317
322
|
save[val].content(res);
|
323
|
+
if (val == "endpoints") {
|
324
|
+
var tmp = {};
|
325
|
+
$(res).find(" > value > *").each(function(k,v) {
|
326
|
+
$.ajax({
|
327
|
+
url: "https://centurio.work/plan/" + $(v).text(),
|
328
|
+
success: function() {
|
329
|
+
tmp[v.tagName] = {};
|
330
|
+
var deferreds = [];
|
331
|
+
deferreds.push(
|
332
|
+
$.ajax({
|
333
|
+
url: "https://centurio.work/plan/" + $(v).text() + "/symbol.svg",
|
334
|
+
success: function(res) {
|
335
|
+
tmp[v.tagName]['symbol'] = res;
|
336
|
+
}
|
337
|
+
})
|
338
|
+
);
|
339
|
+
deferreds.push(
|
340
|
+
$.ajax({
|
341
|
+
url: "https://centurio.work/plan/" + $(v).text() + "/schema.rng",
|
342
|
+
success: function(res) {
|
343
|
+
tmp[v.tagName]['schema'] = res;
|
344
|
+
}
|
345
|
+
})
|
346
|
+
);
|
347
|
+
$.when.apply($, deferreds).then(function(x) {
|
348
|
+
save['endpoints_cache'] = tmp;
|
349
|
+
// when updating attributes clear the attributes, because they might change as well. New arguments are possible.
|
350
|
+
$('#dat_details').empty();
|
351
|
+
adaptor_update();
|
352
|
+
});
|
353
|
+
}
|
354
|
+
});
|
355
|
+
});
|
356
|
+
}
|
318
357
|
}
|
319
358
|
});
|
320
359
|
} // }}}
|
321
360
|
|
361
|
+
function adaptor_update() {
|
362
|
+
$('g.element[element-endpoint]').each(function(k,ele){
|
363
|
+
if (save['endpoints_cache'][$(ele).attr('element-endpoint')]) {
|
364
|
+
var c = $(ele).find('g.replace');
|
365
|
+
var symbol = save['endpoints_cache'][$(ele).attr('element-endpoint')].symbol.documentElement;
|
366
|
+
c.replaceWith($(symbol).clone());
|
367
|
+
}
|
368
|
+
});
|
369
|
+
}
|
370
|
+
|
322
371
|
function adaptor_init(url,theme,dslx) {
|
323
372
|
if (save['graph_theme'] != theme) {
|
324
373
|
save['graph_theme'] = theme;
|
@@ -334,13 +383,16 @@ function adaptor_init(url,theme,dslx) {
|
|
334
383
|
url: url + "/properties/values/description/",
|
335
384
|
data: ({'content': '<content>' + g + '</content>'})
|
336
385
|
});
|
386
|
+
adaptor_update();
|
337
387
|
manifestation.events.click(svgid);
|
338
388
|
};
|
389
|
+
adaptor_update();
|
339
390
|
monitor_instance_pos();
|
340
391
|
$('#dat_details').empty();
|
341
392
|
});
|
342
393
|
} else {
|
343
394
|
save['graph_adaptor'].update(function(graphrealization){
|
395
|
+
adaptor_update();
|
344
396
|
var svgid = manifestation.clicked();
|
345
397
|
graphrealization.set_description($(dslx));
|
346
398
|
manifestation.events.click(svgid);
|
@@ -350,7 +402,7 @@ function adaptor_init(url,theme,dslx) {
|
|
350
402
|
}
|
351
403
|
|
352
404
|
function monitor_graph_change(force) { //{{{
|
353
|
-
var url = $(
|
405
|
+
var url = $('body').attr('current-instance');
|
354
406
|
$.ajax({
|
355
407
|
type: "GET",
|
356
408
|
url: url + "/properties/values/dslx/",
|
@@ -372,7 +424,7 @@ function monitor_graph_change(force) { //{{{
|
|
372
424
|
} //}}}
|
373
425
|
|
374
426
|
function monitor_instance_dsl() {// {{{
|
375
|
-
var url = $(
|
427
|
+
var url = $('body').attr('current-instance');
|
376
428
|
$.ajax({
|
377
429
|
type: "GET",
|
378
430
|
dataType: "text",
|
@@ -395,7 +447,7 @@ function monitor_instance_dsl() {// {{{
|
|
395
447
|
}// }}}
|
396
448
|
|
397
449
|
function monitor_instance_state() {// {{{
|
398
|
-
var url = $(
|
450
|
+
var url = $('body').attr('current-instance');
|
399
451
|
$.ajax({
|
400
452
|
type: "GET",
|
401
453
|
url: url + "/properties/values/state/",
|
@@ -406,7 +458,7 @@ function monitor_instance_state() {// {{{
|
|
406
458
|
});
|
407
459
|
}// }}}
|
408
460
|
function monitor_instance_transformation() {// {{{
|
409
|
-
var url = $(
|
461
|
+
var url = $('body').attr('current-instance');
|
410
462
|
$.ajax({
|
411
463
|
type: "GET",
|
412
464
|
url: url + "/properties/values/attributes/modeltype",
|
@@ -420,7 +472,7 @@ function monitor_instance_transformation() {// {{{
|
|
420
472
|
}// }}}
|
421
473
|
|
422
474
|
function monitor_instance_pos() {// {{{
|
423
|
-
var url = $(
|
475
|
+
var url = $('body').attr('current-instance');
|
424
476
|
$.ajax({
|
425
477
|
type: "GET",
|
426
478
|
url: url + "/properties/values/positions/",
|
@@ -502,7 +554,7 @@ function monitor_instance_vote_add(notification) {// {{{
|
|
502
554
|
format_visual_add(parts.activity,"vote")
|
503
555
|
}// }}}
|
504
556
|
function monitor_instance_vote_remove(activity,callback,value) {//{{{
|
505
|
-
var url = $(
|
557
|
+
var url = $('body').attr('current-instance');
|
506
558
|
$.ajax({
|
507
559
|
type: "PUT",
|
508
560
|
url: url + "/callbacks/" + callback,
|
@@ -514,7 +566,7 @@ function monitor_instance_vote_remove(activity,callback,value) {//{{{
|
|
514
566
|
}//}}}
|
515
567
|
|
516
568
|
function start_instance() {// {{{
|
517
|
-
var url = $(
|
569
|
+
var url = $('body').attr('current-instance');
|
518
570
|
$.ajax({
|
519
571
|
type: "PUT",
|
520
572
|
url: url + "/properties/values/state",
|
@@ -523,7 +575,7 @@ function start_instance() {// {{{
|
|
523
575
|
});
|
524
576
|
}// }}}
|
525
577
|
function sim_instance() {// {{{
|
526
|
-
var url = $(
|
578
|
+
var url = $('body').attr('current-instance');
|
527
579
|
$.ajax({
|
528
580
|
type: "PUT",
|
529
581
|
url: url + "/properties/values/state",
|
@@ -532,7 +584,7 @@ function sim_instance() {// {{{
|
|
532
584
|
});
|
533
585
|
}// }}}
|
534
586
|
function stop_instance() {// {{{
|
535
|
-
var url = $(
|
587
|
+
var url = $('body').attr('current-instance');
|
536
588
|
$.ajax({
|
537
589
|
type: "PUT",
|
538
590
|
url: url + "/properties/values/state",
|
@@ -542,39 +594,39 @@ function stop_instance() {// {{{
|
|
542
594
|
}// }}}
|
543
595
|
|
544
596
|
function save_testset() {// {{{
|
545
|
-
var
|
597
|
+
var url = $('body').attr('current-instance');
|
546
598
|
var testset = $X('<testset/>');
|
547
599
|
|
548
600
|
$.ajax({
|
549
601
|
type: "GET",
|
550
|
-
url:
|
602
|
+
url: url + "/properties/values/dataelements/",
|
551
603
|
success: function(res){
|
552
604
|
var pars = $X('<dataelements/>');
|
553
605
|
pars.append($(res.documentElement).children());
|
554
606
|
testset.append(pars);
|
555
607
|
$.ajax({
|
556
608
|
type: "GET",
|
557
|
-
url:
|
609
|
+
url: url + "/properties/values/handlerwrapper/",
|
558
610
|
success: function(res){
|
559
611
|
var pars = $X('<handlerwrapper>' + res + '</handlerwrapper>');
|
560
612
|
testset.append(pars);
|
561
613
|
$.ajax({
|
562
614
|
type: "GET",
|
563
|
-
url:
|
615
|
+
url: url + "/properties/values/endpoints/",
|
564
616
|
success: function(res){
|
565
617
|
var pars = $X('<endpoints/>');
|
566
618
|
pars.append($(res.documentElement).children());
|
567
619
|
testset.append(pars);
|
568
620
|
$.ajax({
|
569
621
|
type: "GET",
|
570
|
-
url:
|
622
|
+
url: url + "/properties/values/positions/",
|
571
623
|
success: function(res){
|
572
624
|
var pars = $X('<positions/>');
|
573
625
|
pars.append($(res.documentElement).children());
|
574
626
|
testset.append(pars);
|
575
627
|
$.ajax({
|
576
628
|
type: "GET",
|
577
|
-
url:
|
629
|
+
url: url + "/properties/values/dslx/",
|
578
630
|
success: function(res){
|
579
631
|
var pars = $X('<description/>');
|
580
632
|
pars.append($(res.documentElement));
|
@@ -583,7 +635,7 @@ function save_testset() {// {{{
|
|
583
635
|
testset.append(pars);
|
584
636
|
$.ajax({
|
585
637
|
type: "GET",
|
586
|
-
url:
|
638
|
+
url: url + "/properties/values/attributes/",
|
587
639
|
success: function(res){
|
588
640
|
var name = $("value > info",res).text();
|
589
641
|
var pars = $X('<attributes/>');
|
@@ -614,7 +666,7 @@ function save_testset() {// {{{
|
|
614
666
|
});
|
615
667
|
}// }}}
|
616
668
|
function save_svg() {// {{{
|
617
|
-
var
|
669
|
+
var url = $('body').attr('current-instance');
|
618
670
|
var params = { mimetype: 'image/svg+xml' };
|
619
671
|
|
620
672
|
var gc = $('#graphcanvas').clone();
|
@@ -625,7 +677,7 @@ function save_svg() {// {{{
|
|
625
677
|
gc.prepend($X('<style xmlns="http://www.w3.org/2000/svg" type="text/css"><![CDATA[' + res + ']]></style>'));
|
626
678
|
$.ajax({
|
627
679
|
type: "GET",
|
628
|
-
url:
|
680
|
+
url: url + "/properties/values/attributes/info/",
|
629
681
|
success: function(res){
|
630
682
|
var name = $(res.documentElement).text();
|
631
683
|
|
@@ -639,7 +691,7 @@ function save_svg() {// {{{
|
|
639
691
|
});
|
640
692
|
}// }}}
|
641
693
|
function set_testset(testset,exec) {// {{{
|
642
|
-
var url = $(
|
694
|
+
var url = $('body').attr('current-instance');
|
643
695
|
suspended_monitoring = true;
|
644
696
|
|
645
697
|
$.ajax({
|
@@ -733,7 +785,7 @@ function load_modelfile_after() { //{{{
|
|
733
785
|
var files = $('#modelfile').get(0).files;
|
734
786
|
var reader = new FileReader();
|
735
787
|
reader.onload = function(){
|
736
|
-
var url = $(
|
788
|
+
var url = $('body').attr('current-instance');
|
737
789
|
load_des(url,reader.result);
|
738
790
|
loading = false;
|
739
791
|
}
|
@@ -770,7 +822,7 @@ function load_testset(exec) {// {{{
|
|
770
822
|
}// }}}
|
771
823
|
function load_modeltype() {// {{{
|
772
824
|
if (loading) return;
|
773
|
-
var url = $(
|
825
|
+
var url = $('body').attr('current-instance');
|
774
826
|
loading = true;
|
775
827
|
|
776
828
|
var name = $("#modeltypes div.menuitem[data-selected=selected]").text();
|
@@ -926,6 +978,20 @@ function format_visual_remove(what,cls) {//{{{
|
|
926
978
|
node_state[what][cls] -= 1;
|
927
979
|
format_visual_set(what);
|
928
980
|
}//}}}
|
981
|
+
|
982
|
+
function scroll_into_view(what) { //{{{
|
983
|
+
var tcontainer = $('#graphcolumn')[0];
|
984
|
+
if ($('g[element-id="' + what + '"]').length > 0) {
|
985
|
+
var telement = $('g[element-id="' + what + '"]')[0].getBBox().y;
|
986
|
+
if (tcontainer.scrollTop > telement) {
|
987
|
+
tcontainer.scroll( { top: telement - 5, behavior: 'smooth' } );
|
988
|
+
}
|
989
|
+
if (tcontainer.scrollTop + tcontainer.offsetHeight - 40 < telement) {
|
990
|
+
tcontainer.scroll( { top: telement - tcontainer.offsetHeight + 40, behavior: 'smooth' } );
|
991
|
+
}
|
992
|
+
}
|
993
|
+
} //}}}
|
994
|
+
|
929
995
|
function format_visual_set(what) {//{{{
|
930
996
|
if (node_state[what] != undefined) {
|
931
997
|
if (node_state[what]['vote'] == undefined) node_state[what]['vote'] = 0;
|
@@ -936,9 +1002,7 @@ function format_visual_set(what) {//{{{
|
|
936
1002
|
var actives = node_state[what]['active'];
|
937
1003
|
var passives = node_state[what]['passive'];
|
938
1004
|
|
939
|
-
|
940
|
-
// $('g[element-id="' + what + '"]').each(function(a,b){ b.scrollIntoView(true); $('#graphcolumn')[0].scrollTop -= 15; });
|
941
|
-
$('g[element-id="' + what + '"]').each(function(a,b){ $('#graphcolumn')[0].scrollTop = b.getBBox().y - 10; });
|
1005
|
+
scroll_into_view(what);
|
942
1006
|
|
943
1007
|
if (actives > 0 && votes > 0)
|
944
1008
|
$('g[element-id="' + what + '"] .super .colon').each(function(a,b){
|
data/cockpit/js/parameters.js
CHANGED
@@ -61,7 +61,7 @@ $(document).ready(function() {
|
|
61
61
|
function do_parameters_save(event) { //{{{
|
62
62
|
var visid = $('ui-tabbar ui-tab',$(event.target).parents('ui-tabbed')).not('.switch').not('.inactive').attr('data-tab');
|
63
63
|
if (save[visid].has_changed()) {
|
64
|
-
var url = $(
|
64
|
+
var url = $('body').attr('current-instance');
|
65
65
|
save[visid].set_checkpoint();
|
66
66
|
$.ajax({
|
67
67
|
type: "PUT",
|
data/cockpit/js/ui.js
CHANGED
@@ -18,14 +18,17 @@ $(document).ready(function() {
|
|
18
18
|
$.ajax({
|
19
19
|
url: "config.json",
|
20
20
|
success: function(res){
|
21
|
+
$("input[name=repo-url]").val(res['repo-url']);
|
21
22
|
$("input[name=base-url]").val(res['base-url']);
|
22
23
|
cockpit();
|
23
24
|
},
|
24
25
|
error: function(){
|
25
26
|
if (location.protocol.match(/^file/)) {
|
26
|
-
$("input[name=base-url]").val("http://localhost:" + $('body').data('
|
27
|
+
$("input[name=base-url]").val("http://localhost:" + $('body').data('base-port'));
|
28
|
+
$("input[name=repo-url]").val("http://localhost:" + $('body').data('res-port'));
|
27
29
|
} else {
|
28
|
-
$("input[name=base-url]").val(location.protocol + "//" + location.hostname + ":" + $('body').data('
|
30
|
+
$("input[name=base-url]").val(location.protocol + "//" + location.hostname + ":" + $('body').data('base-port'));
|
31
|
+
$("input[name=repo-url]").val(location.protocol + "//" + location.hostname + ":" + $('body').data('res-port'));
|
29
32
|
}
|
30
33
|
cockpit();
|
31
34
|
}
|
data/cockpit/js/wfadaptor.js
CHANGED
@@ -549,7 +549,13 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
549
549
|
else {sym_name = tname;}
|
550
550
|
$(this).attr('svg-type',sym_name);
|
551
551
|
if((illustrator.elements[tname] && illustrator.elements[tname].svg) || sym_name == 'unknown') {
|
552
|
-
illustrator.draw.draw_symbol(tname, sym_name, $(this).attr('svg-id'), $(this).attr('svg-label'), pos.row, pos.col, block.svg).addClass(illustrator.elements[tname] ? illustrator.elements[tname].type : 'primitive unknown');
|
552
|
+
var g = illustrator.draw.draw_symbol(tname, sym_name, $(this).attr('svg-id'), $(this).attr('svg-label'), pos.row, pos.col, block.svg).addClass(illustrator.elements[tname] ? illustrator.elements[tname].type : 'primitive unknown');
|
553
|
+
if (illustrator.elements[sym_name].info) {
|
554
|
+
var info = illustrator.elements[sym_name].info(this);
|
555
|
+
_.each(info,function(val,key) {
|
556
|
+
g.attr(key, val);
|
557
|
+
});
|
558
|
+
}
|
553
559
|
} else { console.log("no icon "+ tname);}
|
554
560
|
if(illustrator.elements[tname] && illustrator.elements[tname].border) illustrator.draw.draw_border($(this).attr('svg-id'), pos, block.max, block.svg);
|
555
561
|
if(illustrator.elements[tname] && illustrator.elements[tname].type == 'complex') illustrator.draw.draw_tile($(this).attr('svg-id'), pos, block.max, block.svg);
|
@@ -1,4 +1,6 @@
|
|
1
1
|
<svg class="clickable" xmlns="http://www.w3.org/2000/svg">
|
2
|
-
<
|
3
|
-
|
2
|
+
<g class="replace">
|
3
|
+
<rect x="1" y="1" width="28" height="28" rx="4" class="hfill rfill cline stand"/>
|
4
|
+
<path class="normal" style="fill:#000000;" d="m 21.561187,10.184155 c 0,-0.03232 0,-0.03232 0,-0.03232 C 21.076371,9.5054099 20.494591,8.9559512 19.815848,8.4388133 l 0,0.032323 C 19.266389,8.891311 18.71693,9.3438064 18.199794,9.7963017 17.973545,9.6670167 17.779619,9.5700535 17.585693,9.4730903 17.327124,9.3438064 17.068556,9.2145213 16.777665,9.1498799 16.680695,9.1175569 16.583739,9.0852339 16.486775,9.0852339 16.422135,8.3741695 16.357491,7.6631063 16.260528,6.952042 15.937318,6.887396 15.614106,6.887396 15.258574,6.855073 c -0.09697,0 -0.193926,0 -0.258569,0 -0.09697,0 -0.193925,0 -0.258568,0 -0.323211,0.032323 -0.614101,0.032323 -0.90499,0.096969 -0.09697,0.6787425 -0.161606,1.3898068 -0.193927,2.1008712 -0.129284,0 -0.226248,0.032323 -0.355532,0.064646 -0.03232,0 -0.06465,0 -0.09697,0.032323 -0.258568,0.064646 -0.517136,0.1939264 -0.775704,0.3232103 -0.226249,0.096969 -0.420175,0.1939264 -0.614102,0.3232114 -0.549458,-0.4524953 -1.066595,-0.87267 -1.616054,-1.3251654 0,0 0,0 -0.03232,-0.032323 C 10.022552,8.5357845 9.8932693,8.6327419 9.7963053,8.7297051 9.5700583,8.8913109 9.3761314,9.0852373 9.2145262,9.2791637 8.9236366,9.5377327 8.6973883,9.8609431 8.4388194,10.184155 c 0,0 0,0 0.032323,0 0.4201747,0.549459 0.87267,1.066596 1.325166,1.616054 -0.129285,0.193927 -0.258569,0.420175 -0.355533,0.614101 -0.129285,0.258569 -0.226248,0.549459 -0.2908894,0.808028 -0.064646,0.129284 -0.096969,0.258568 -0.096969,0.355531 -0.7110644,0.06465 -1.4221288,0.129285 -2.1008713,0.226248 -0.064646,0.323211 -0.096969,0.646422 -0.096969,1.001954 0,0.484816 0.032323,0.969632 0.1292839,1.422128 0.6787437,0.06465 1.3574862,0.129284 2.0685505,0.193926 0,0.129284 0.032323,0.258569 0.096969,0.355532 0.064646,0.29089 0.1616049,0.549459 0.2908899,0.840349 0.129284,0.226247 0.2262471,0.452495 0.387853,0.646421 -0.452496,0.549459 -0.9049912,1.066596 -1.3251647,1.616054 0.484816,0.678744 1.0665957,1.260523 1.7453387,1.74534 l 0,-0.03232 c 0.517137,-0.420175 1.066596,-0.87267 1.583733,-1.325166 l 0.03232,0 c 0.161605,0.09697 0.355532,0.193928 0.517136,0.290891 0.290891,0.129284 0.614101,0.258568 0.904991,0.32321 0.129284,0.03232 0.226248,0.06465 0.32321,0.09697 0.06465,0.678743 0.129285,1.389807 0.226249,2.100871 0.290889,0.03232 0.581779,0.06465 0.90499,0.06465 0.06465,0 0.258568,0 0.484817,0 0.355532,0 0.711064,-0.03232 1.066595,-0.09697 0.06465,-0.678742 0.129285,-1.389807 0.193926,-2.10087 0.09697,-0.03232 0.193927,-0.06465 0.29089,-0.09697 l 0,0 c 0.290891,-0.06464 0.549459,-0.161605 0.808028,-0.290889 0.226248,-0.09697 0.452495,-0.226248 0.678743,-0.387854 0,0.03232 0,0.03232 0.03232,0.03232 0.517137,0.452495 1.066596,0.904989 1.616054,1.325164 0.09697,-0.06465 0.193927,-0.129284 0.323212,-0.226247 0.193926,-0.161606 0.387852,-0.355532 0.549458,-0.549459 0.29089,-0.290889 0.58178,-0.614101 0.840348,-0.969633 -0.452495,-0.549459 -0.90499,-1.098917 -1.357486,-1.616054 0,-0.03232 0,-0.03232 0,-0.03232 0.09697,-0.161605 0.193927,-0.355531 0.29089,-0.549457 0.09696,-0.258569 0.226248,-0.517138 0.29089,-0.775707 0,-0.03232 0,-0.06465 0.03232,-0.06465 0,-0.129285 0.03232,-0.226248 0.06465,-0.290891 0.711065,-0.06465 1.422129,-0.129284 2.100872,-0.193926 0.06464,-0.323211 0.06464,-0.646422 0.09697,-0.969632 0,-0.09697 0,-0.193927 0,-0.29089 0,-0.06465 0,-0.161606 0,-0.258569 -0.03232,-0.323212 -0.03232,-0.646422 -0.09697,-0.969633 -0.678743,-0.06465 -1.389807,-0.129284 -2.100872,-0.193927 -0.03232,-0.09697 -0.06465,-0.193926 -0.06465,-0.290889 -0.09697,-0.29089 -0.193927,-0.58178 -0.323212,-0.872669 -0.09697,-0.193927 -0.226247,-0.420175 -0.32321,-0.614102 0.420173,-0.517136 0.872669,-1.066595 1.325164,-1.616054 z m -8.629731,2.682651 c 0.581779,-0.614101 1.292844,-0.904991 2.100871,-0.87267 0.840348,-0.03232 1.519091,0.258569 2.133192,0.87267 0.581779,0.581779 0.872669,1.292843 0.872669,2.10087 0,0.840348 -0.29089,1.519092 -0.872669,2.133192 -0.614101,0.58178 -1.292844,0.87267 -2.133192,0.87267 -0.808027,0 -1.519092,-0.29089 -2.100871,-0.87267 -0.581779,-0.6141 -0.872669,-1.292844 -0.872669,-2.133192 0,-0.808027 0.29089,-1.519091 0.872669,-2.10087 z"/>
|
5
|
+
</g>
|
4
6
|
</svg>
|
@@ -1,6 +1,8 @@
|
|
1
1
|
<svg class="clickable" xmlns="http://www.w3.org/2000/svg">
|
2
|
-
<
|
3
|
-
|
2
|
+
<g class="replace">
|
3
|
+
<rect x="1" y="1" width="28" height="28" rx="4" class="cline hfill rfill stand"/>
|
4
|
+
<path class="normal" transform="translate(-2,-2)" style="fill:#000000;" d="m 21.561187,10.184155 c 0,-0.03232 0,-0.03232 0,-0.03232 C 21.076371,9.5054099 20.494591,8.9559512 19.815848,8.4388133 l 0,0.032323 C 19.266389,8.891311 18.71693,9.3438064 18.199794,9.7963017 17.973545,9.6670167 17.779619,9.5700535 17.585693,9.4730903 17.327124,9.3438064 17.068556,9.2145213 16.777665,9.1498799 16.680695,9.1175569 16.583739,9.0852339 16.486775,9.0852339 16.422135,8.3741695 16.357491,7.6631063 16.260528,6.952042 15.937318,6.887396 15.614106,6.887396 15.258574,6.855073 c -0.09697,0 -0.193926,0 -0.258569,0 -0.09697,0 -0.193925,0 -0.258568,0 -0.323211,0.032323 -0.614101,0.032323 -0.90499,0.096969 -0.09697,0.6787425 -0.161606,1.3898068 -0.193927,2.1008712 -0.129284,0 -0.226248,0.032323 -0.355532,0.064646 -0.03232,0 -0.06465,0 -0.09697,0.032323 -0.258568,0.064646 -0.517136,0.1939264 -0.775704,0.3232103 -0.226249,0.096969 -0.420175,0.1939264 -0.614102,0.3232114 -0.549458,-0.4524953 -1.066595,-0.87267 -1.616054,-1.3251654 0,0 0,0 -0.03232,-0.032323 C 10.022552,8.5357845 9.8932693,8.6327419 9.7963053,8.7297051 9.5700583,8.8913109 9.3761314,9.0852373 9.2145262,9.2791637 8.9236366,9.5377327 8.6973883,9.8609431 8.4388194,10.184155 c 0,0 0,0 0.032323,0 0.4201747,0.549459 0.87267,1.066596 1.325166,1.616054 -0.129285,0.193927 -0.258569,0.420175 -0.355533,0.614101 -0.129285,0.258569 -0.226248,0.549459 -0.2908894,0.808028 -0.064646,0.129284 -0.096969,0.258568 -0.096969,0.355531 -0.7110644,0.06465 -1.4221288,0.129285 -2.1008713,0.226248 -0.064646,0.323211 -0.096969,0.646422 -0.096969,1.001954 0,0.484816 0.032323,0.969632 0.1292839,1.422128 0.6787437,0.06465 1.3574862,0.129284 2.0685505,0.193926 0,0.129284 0.032323,0.258569 0.096969,0.355532 0.064646,0.29089 0.1616049,0.549459 0.2908899,0.840349 0.129284,0.226247 0.2262471,0.452495 0.387853,0.646421 -0.452496,0.549459 -0.9049912,1.066596 -1.3251647,1.616054 0.484816,0.678744 1.0665957,1.260523 1.7453387,1.74534 l 0,-0.03232 c 0.517137,-0.420175 1.066596,-0.87267 1.583733,-1.325166 l 0.03232,0 c 0.161605,0.09697 0.355532,0.193928 0.517136,0.290891 0.290891,0.129284 0.614101,0.258568 0.904991,0.32321 0.129284,0.03232 0.226248,0.06465 0.32321,0.09697 0.06465,0.678743 0.129285,1.389807 0.226249,2.100871 0.290889,0.03232 0.581779,0.06465 0.90499,0.06465 0.06465,0 0.258568,0 0.484817,0 0.355532,0 0.711064,-0.03232 1.066595,-0.09697 0.06465,-0.678742 0.129285,-1.389807 0.193926,-2.10087 0.09697,-0.03232 0.193927,-0.06465 0.29089,-0.09697 l 0,0 c 0.290891,-0.06464 0.549459,-0.161605 0.808028,-0.290889 0.226248,-0.09697 0.452495,-0.226248 0.678743,-0.387854 0,0.03232 0,0.03232 0.03232,0.03232 0.517137,0.452495 1.066596,0.904989 1.616054,1.325164 0.09697,-0.06465 0.193927,-0.129284 0.323212,-0.226247 0.193926,-0.161606 0.387852,-0.355532 0.549458,-0.549459 0.29089,-0.290889 0.58178,-0.614101 0.840348,-0.969633 -0.452495,-0.549459 -0.90499,-1.098917 -1.357486,-1.616054 0,-0.03232 0,-0.03232 0,-0.03232 0.09697,-0.161605 0.193927,-0.355531 0.29089,-0.549457 0.09696,-0.258569 0.226248,-0.517138 0.29089,-0.775707 0,-0.03232 0,-0.06465 0.03232,-0.06465 0,-0.129285 0.03232,-0.226248 0.06465,-0.290891 0.711065,-0.06465 1.422129,-0.129284 2.100872,-0.193926 0.06464,-0.323211 0.06464,-0.646422 0.09697,-0.969632 0,-0.09697 0,-0.193927 0,-0.29089 0,-0.06465 0,-0.161606 0,-0.258569 -0.03232,-0.323212 -0.03232,-0.646422 -0.09697,-0.969633 -0.678743,-0.06465 -1.389807,-0.129284 -2.100872,-0.193927 -0.03232,-0.09697 -0.06465,-0.193926 -0.06465,-0.290889 -0.09697,-0.29089 -0.193927,-0.58178 -0.323212,-0.872669 -0.09697,-0.193927 -0.226247,-0.420175 -0.32321,-0.614102 0.420173,-0.517136 0.872669,-1.066595 1.325164,-1.616054 z m -8.629731,2.682651 c 0.581779,-0.614101 1.292844,-0.904991 2.100871,-0.87267 0.840348,-0.03232 1.519091,0.258569 2.133192,0.87267 0.581779,0.581779 0.872669,1.292843 0.872669,2.10087 0,0.840348 -0.29089,1.519092 -0.872669,2.133192 -0.614101,0.58178 -1.292844,0.87267 -2.133192,0.87267 -0.808027,0 -1.519092,-0.29089 -2.100871,-0.87267 -0.581779,-0.6141 -0.872669,-1.292844 -0.872669,-2.133192 0,-0.808027 0.29089,-1.519091 0.872669,-2.10087 z"/>
|
5
|
+
</g>
|
4
6
|
<circle cx="28" cy="27" r="9" class="cline rfill stand"/>
|
5
7
|
<text transform="translate(28,31)" class="small">s</text>
|
6
8
|
</svg>
|
@@ -6,6 +6,7 @@ function WFAdaptorManifestation(adaptor) {
|
|
6
6
|
this.elements = {};
|
7
7
|
this.events = {};
|
8
8
|
this.compact = false;
|
9
|
+
this.endpoints = {};
|
9
10
|
|
10
11
|
this.noarrow = ['alternative', 'otherwise'];
|
11
12
|
|
@@ -60,7 +61,12 @@ function WFAdaptorManifestation(adaptor) {
|
|
60
61
|
tab.empty();
|
61
62
|
if (self.adaptor.description.elements[$(node).attr('svg-type')]) {
|
62
63
|
save['details_target'] = { 'svgid': svgid, 'model': self.adaptor.description };
|
63
|
-
|
64
|
+
var rng = self.adaptor.description.elements[$(node).attr('svg-type')].clone();
|
65
|
+
if (save['endpoints_cache'][$(node).attr('endpoint')]) {
|
66
|
+
var schema = save['endpoints_cache'][$(node).attr('endpoint')].schema.documentElement;
|
67
|
+
$(rng).find(' > element[name="parameters"] > element[name="arguments"]').replaceWith($(schema).clone());
|
68
|
+
}
|
69
|
+
save['details'] = new RelaxNGui(rng,tab,self.adaptor.description.context_eval);
|
64
70
|
save['details'].content(node);
|
65
71
|
}
|
66
72
|
}; //}}}
|
@@ -202,28 +208,13 @@ function WFAdaptorManifestation(adaptor) {
|
|
202
208
|
'type': 'primitive',
|
203
209
|
'illustrator': {//{{{
|
204
210
|
'endnodes': 'this',
|
205
|
-
'label': function(node){return $('label',$(node).children('parameters')).text().replace(/^['"]/,'').replace(/['"]$/,'')},
|
211
|
+
'label': function(node){ return $('label',$(node).children('parameters')).text().replace(/^['"]/,'').replace(/['"]$/,''); },
|
212
|
+
'info': function(node){ return { 'element-endpoint': $(node).attr('endpoint') }; },
|
206
213
|
'resolve_symbol': function(node) {
|
207
|
-
if($(
|
208
|
-
return 'callinstantiation';
|
209
|
-
} else if($(node).attr('endpoint').match(/^correlation_send/)) {
|
210
|
-
return 'callcorrelationsend';
|
211
|
-
} else if($(node).attr('endpoint').match(/^correlation_receive/)) {
|
212
|
-
return 'callcorrelationreceive';
|
213
|
-
} else if($(node).attr('endpoint').match(/^worklist/) && $('finalize,update', node).length > 0) {
|
214
|
-
return 'callmanipulateworklist';
|
215
|
-
} else if($(node).attr('endpoint').match(/^worklist/)) {
|
216
|
-
return 'callworklist';
|
217
|
-
} else if($(node).attr('endpoint').match(/^workqueue/) && $('finalize,update', node).length > 0) {
|
218
|
-
return 'callmanipulateworkqueue';
|
219
|
-
} else if($(node).attr('endpoint').match(/^workqueue/)) {
|
220
|
-
return 'callworkqueue';
|
221
|
-
} else if($('parameters > service', node).length > 0) {
|
222
|
-
return 'callinjection';
|
223
|
-
} else if($('finalize,update', node).length > 0) {
|
214
|
+
if($('finalize,update', node).length > 0) {
|
224
215
|
return 'callmanipulate';
|
225
216
|
} else {
|
226
|
-
return'call';
|
217
|
+
return 'call';
|
227
218
|
}
|
228
219
|
},
|
229
220
|
'svg': self.adaptor.theme_dir + 'symbols/call.svg'
|
@@ -892,6 +883,7 @@ function WFAdaptorManifestation(adaptor) {
|
|
892
883
|
'description': self.adaptor.theme_dir + 'rngs/callmanipulate.rng',
|
893
884
|
'illustrator': {//{{{
|
894
885
|
'label': function(node){return $('label',$(node).children('parameters')).text().replace(/^['"]/,'').replace(/['"]$/,'')},
|
886
|
+
'info': function(node){ return { 'element-endpoint': $(node).attr('endpoint') }; },
|
895
887
|
'svg': self.adaptor.theme_dir + 'symbols/callmanipulate.svg'
|
896
888
|
},//}}}
|
897
889
|
}; /*}}}*/
|
@@ -913,55 +905,4 @@ function WFAdaptorManifestation(adaptor) {
|
|
913
905
|
'type': 'abstract',
|
914
906
|
'description': [self.adaptor.theme_dir + 'rngs/update.rng',self.adaptor.theme_dir + 'rngs/finalize.rng']
|
915
907
|
}; /*}}}*/
|
916
|
-
this.elements.callinstantiation = { /*{{{*/
|
917
|
-
'type': 'abstract',
|
918
|
-
'parent': 'call',
|
919
|
-
'illustrator': {//{{{
|
920
|
-
'svg': self.adaptor.theme_dir + 'symbols/callinstantiation.svg'
|
921
|
-
},//}}}
|
922
|
-
}; /*}}}*/
|
923
|
-
this.elements.callcorrelationsend = { /*{{{*/
|
924
|
-
'type': 'abstract',
|
925
|
-
'parent': 'call',
|
926
|
-
'illustrator': {//{{{
|
927
|
-
'svg': self.adaptor.theme_dir + 'symbols/callcorrelationsend.svg'
|
928
|
-
},//}}}
|
929
|
-
}; /*}}}*/
|
930
|
-
this.elements.callcorrelationreceive = { /*{{{*/
|
931
|
-
'type': 'abstract',
|
932
|
-
'parent': 'call',
|
933
|
-
'illustrator': {//{{{
|
934
|
-
'svg': self.adaptor.theme_dir + 'symbols/callcorrelationreceive.svg'
|
935
|
-
},//}}}
|
936
|
-
}; /*}}}*/
|
937
|
-
this.elements.callworklist = { /*{{{*/
|
938
|
-
'type': 'abstract',
|
939
|
-
'parent': 'call',
|
940
|
-
'illustrator': {//{{{
|
941
|
-
'svg': self.adaptor.theme_dir + 'symbols/callworklist.svg'
|
942
|
-
},//}}}
|
943
|
-
}; /*}}}*/
|
944
|
-
this.elements.callmanipulateworklist = { /*{{{*/
|
945
|
-
'type': 'abstract',
|
946
|
-
'parent': 'call',
|
947
|
-
'illustrator': {//{{{
|
948
|
-
'svg': self.adaptor.theme_dir + 'symbols/callmanipulateworklist.svg'
|
949
|
-
},//}}}
|
950
|
-
}; /*}}}*/
|
951
|
-
this.elements.callworkqueue = { /*{{{*/
|
952
|
-
'type': 'abstract',
|
953
|
-
'parent': 'call',
|
954
|
-
'description': self.adaptor.theme_dir + 'rngs/callworkqueue.rng',
|
955
|
-
'illustrator': {//{{{
|
956
|
-
'svg': self.adaptor.theme_dir + 'symbols/callworkqueue.svg'
|
957
|
-
},//}}}
|
958
|
-
}; /*}}}*/
|
959
|
-
this.elements.callmanipulateworkqueue = { /*{{{*/
|
960
|
-
'type': 'abstract',
|
961
|
-
'parent': 'call',
|
962
|
-
'description': self.adaptor.theme_dir + 'rngs/callmanipulateworkqueue.rng',
|
963
|
-
'illustrator': {//{{{
|
964
|
-
'svg': self.adaptor.theme_dir + 'symbols/callmanipulateworkqueue.svg'
|
965
|
-
},//}}}
|
966
|
-
}; /*}}}*/
|
967
908
|
}
|
data/cpee.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "cpee"
|
3
|
-
s.version = "1.3.
|
3
|
+
s.version = "1.3.228"
|
4
4
|
s.platform = Gem::Platform::RUBY
|
5
5
|
s.license = "LGPL-3.0"
|
6
6
|
s.summary = "Preliminary release of cloud process execution engine (cpee). If you just need workflow execution, without a rest/xmpp service exposing it, then use WEEL"
|
data/lib/cpee/instantiation.rb
CHANGED
@@ -16,6 +16,7 @@ require 'riddl/server'
|
|
16
16
|
require 'xml/smart'
|
17
17
|
require 'base64'
|
18
18
|
require 'uri'
|
19
|
+
require 'json'
|
19
20
|
|
20
21
|
module CPEE
|
21
22
|
module Instantiation
|
@@ -26,7 +27,6 @@ module CPEE
|
|
26
27
|
|
27
28
|
def self::load(tdoc,cpee)
|
28
29
|
ins = -1
|
29
|
-
puts tdoc.to_s
|
30
30
|
XML::Smart.string(tdoc) do |doc|
|
31
31
|
doc.register_namespace 'desc', 'http://cpee.org/ns/description/1.0'
|
32
32
|
doc.register_namespace 'prop', 'http://riddl.org/ns/common-patterns/properties/1.0'
|
@@ -77,20 +77,56 @@ module CPEE
|
|
77
77
|
class Instantiate < Riddl::Implementation
|
78
78
|
def response
|
79
79
|
cpee = @a[0]
|
80
|
-
tdoc = @p[@p.length - 1].
|
81
|
-
|
82
|
-
|
80
|
+
tdoc = case @p[@p.length - 1].name
|
81
|
+
when 'url'
|
82
|
+
status, res = Riddl::Client.new(@p[@p.length - 1].value).get
|
83
|
+
if status >= 200 && status < 300
|
84
|
+
res[0].value.read
|
85
|
+
else
|
86
|
+
(@status = 500) && return
|
87
|
+
end
|
88
|
+
when 'xml'
|
89
|
+
if @p[@p.length - 1].additional =~ /base64/
|
90
|
+
Base64.decode64(@p[@p.length - 1].value.read)
|
91
|
+
else
|
92
|
+
@p[@p.length - 1].value.read
|
93
|
+
end
|
83
94
|
end
|
84
95
|
|
85
96
|
if (ins = Testset::load(tdoc,cpee)) == -1
|
86
97
|
@status = 500
|
87
98
|
else
|
88
|
-
if @p
|
99
|
+
if @p[0].value =~ /^wait/
|
100
|
+
@headers << Riddl::Header.new('CPEE_CALLBACK','true')
|
101
|
+
cb = @h['CPEE_CALLBACK']
|
102
|
+
|
103
|
+
if cb
|
104
|
+
srv = Riddl::Client.new(cpee, cpee + "?riddl-description")
|
105
|
+
status, response = srv.resource("/#{ins}/notifications/subscriptions/").post [
|
106
|
+
Riddl::Parameter::Simple.new("topic","state"),
|
107
|
+
Riddl::Parameter::Simple.new("events","change"),
|
108
|
+
]
|
109
|
+
key = response.first.value
|
110
|
+
|
111
|
+
srv.resource("/#{ins}/notifications/subscriptions/#{key}/ws/").ws do |conn|
|
112
|
+
conn.on :message do |msg|
|
113
|
+
if JSON::parse(XML::Smart::string(msg.data).find('string(/event/notification)'))['state'] == 'finished'
|
114
|
+
conn.close
|
115
|
+
Riddl::Client.new(cb).put [
|
116
|
+
# TODO extract all dataelements from instance
|
117
|
+
Riddl::Parameter::Simple.new('instance',ins)
|
118
|
+
]
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
124
|
+
if @p.length > 1 && @p[0].value =~ /_running$/
|
89
125
|
srv = Riddl::Client.new(cpee, cpee + "?riddl-description")
|
90
126
|
res = srv.resource("/#{ins}/properties/values")
|
91
127
|
status, response = res.put [
|
92
|
-
|
93
|
-
|
128
|
+
Riddl::Parameter::Simple.new('name', 'state'),
|
129
|
+
Riddl::Parameter::Simple.new('value','running')
|
94
130
|
]
|
95
131
|
end
|
96
132
|
return Riddl::Parameter::Simple.new("url",cpee + ins)
|
data/lib/instantiation.xml
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cpee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.228
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juergen eTM Mangler
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: tools
|
13
13
|
cert_chain: []
|
14
|
-
date: 2018-03-
|
14
|
+
date: 2018-03-08 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: riddl
|