cpee 1.3.224 → 1.3.225

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ce2f2888804d0868122fbcfd26f63b6845d157ad
4
- data.tar.gz: ef8225299e50b439e22365ddfb3801c355cf3b70
3
+ metadata.gz: 831bd6c8a62caa40df7e52d21e8b83132ca74ec4
4
+ data.tar.gz: 7438caf8c8ccbc361474beb8b7320e21455ca9a4
5
5
  SHA512:
6
- metadata.gz: af3f3e3c8e11ffe0b09333194247a13e1f77468c22c3d3ea285c46cb23a517b0809010180b6ee54feae35d55b50611f2bdcedb424151dc1c18430fcb93d74feb
7
- data.tar.gz: 33a265bd3ebf2658f80ba79c121627a0b9c37621eb4db8fefe66bad8b32c7466cbdfe21304e84e15bf8840418bda32c962e45bc2b8b5c629b95d9e70d727f91b
6
+ metadata.gz: 6cc32d3fb2d3f9dd7439bea5776fa2e66f6a053a29dbda50beefa6759050b78637387b23bae467ae2b04267f45b273ba4f0f6c28fe3d5189b4e27be3e982b250
7
+ data.tar.gz: 7f9d69fcdd8673727bc191b9dd505839e1e3a079b25eb0596bea225558d7fece5cd8ee77239b85fb8d6d83120ea5754edca6bf692cd719efeda5b14b376c2bbb
@@ -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
- if ((document.location.hostname == 'localhost') && (document.location.protocol == 'http:')) {
26
- document.write('<script type="text/javascript" src="http://' + document.location.host + '/js_libs/jquery.min.js">\x3C/script>');
27
- document.write('<script type="text/javascript" src="http://' + document.location.host + '/js_libs/jquery.browser.js">\x3C/script>');
28
- document.write('<script type="text/javascript" src="http://' + document.location.host + '/js_libs/jquery.svg.min.js">\x3C/script>');
29
- document.write('<script type="text/javascript" src="http://' + document.location.host + '/js_libs/jquery.svgdom.min.js">\x3C/script>');
30
- document.write('<script type="text/javascript" src="http://' + document.location.host + '/js_libs/vkbeautify.js">\x3C/script>');
31
- document.write('<script type="text/javascript" src="http://' + document.location.host + '/js_libs/util.js">\x3C/script>');
32
- document.write('<script type="text/javascript" src="http://' + document.location.host + '/js_libs/printf.js">\x3C/script>');
33
- document.write('<script type="text/javascript" src="http://' + document.location.host + '/js_libs/strftime.min.js">\x3C/script>');
34
- document.write('<script type="text/javascript" src="http://' + document.location.host + '/js_libs/parsequery.js">\x3C/script>');
35
- document.write('<script type="text/javascript" src="http://' + document.location.host + '/js_libs/underscore.min.js">\x3C/script>');
36
- document.write('<script type="text/javascript" src="http://' + document.location.host + '/js_libs/jquery.caret.min.js">\x3C/script>');
37
- document.write('<script type="text/javascript" src="http://' + document.location.host + '/js_libs/jquery.cookie.js">\x3C/script>');
38
- document.write('<script type="text/javascript" src="http://' + document.location.host + '/js_libs/relaxngui.js">\x3C/script>');
39
-
40
- document.write('<script type="text/javascript" src="http://' + document.location.host + '/js_libs/ui.js">\x3C/script>');
41
- document.write('<script type="text/javascript" src="http://' + document.location.host + '/js_libs/custommenu.js">\x3C/script>');
42
-
43
- document.write('<link rel="stylesheet" href="http://' + document.location.host + '/js_libs/custommenu.css" type="text/css"/>');
44
- document.write('<link rel="stylesheet" href="http://' + document.location.host + '/js_libs/ui.css" type="text/css"/>');
45
-
46
- document.write('<link rel="stylesheet" href="http://' + document.location.host + '/js_libs/relaxngui.css" type="text/css"/>');
47
- } else if ((document.location.hostname == 'localhost') && (document.location.protocol == 'https:')) {
48
- document.write('<script type="text/javascript" src="https://' + document.location.host + '/js_libs/jquery.min.js">\x3C/script>');
49
- document.write('<script type="text/javascript" src="https://' + document.location.host + '/js_libs/jquery.browser.js">\x3C/script>');
50
- document.write('<script type="text/javascript" src="https://' + document.location.host + '/js_libs/jquery.svg.min.js">\x3C/script>');
51
- document.write('<script type="text/javascript" src="https://' + document.location.host + '/js_libs/jquery.svgdom.min.js">\x3C/script>');
52
- document.write('<script type="text/javascript" src="https://' + document.location.host + '/js_libs/vkbeautify.js">\x3C/script>');
53
- document.write('<script type="text/javascript" src="https://' + document.location.host + '/js_libs/util.js">\x3C/script>');
54
- document.write('<script type="text/javascript" src="https://' + document.location.host + '/js_libs/printf.js">\x3C/script>');
55
- document.write('<script type="text/javascript" src="https://' + document.location.host + '/js_libs/strftime.min.js">\x3C/script>');
56
- document.write('<script type="text/javascript" src="https://' + document.location.host + '/js_libs/parsequery.js">\x3C/script>');
57
- document.write('<script type="text/javascript" src="https://' + document.location.host + '/js_libs/underscore.min.js">\x3C/script>');
58
- document.write('<script type="text/javascript" src="https://' + document.location.host + '/js_libs/jquery.caret.min.js">\x3C/script>');
59
- document.write('<script type="text/javascript" src="https://' + document.location.host + '/js_libs/jquery.cookie.js">\x3C/script>');
60
- document.write('<script type="text/javascript" src="https://' + document.location.host + '/js_libs/relaxngui.js">\x3C/script>');
61
-
62
- document.write('<script type="text/javascript" src="https://' + document.location.host + '/js_libs/ui.js">\x3C/script>');
63
- document.write('<script type="text/javascript" src="https://' + document.location.host + '/js_libs/custommenu.js">\x3C/script>');
64
-
65
- document.write('<link rel="stylesheet" href="https://' + document.location.host + '/js_libs/custommenu.css" type="text/css"/>');
66
- document.write('<link rel="stylesheet" href="https://' + document.location.host + '/js_libs/ui.css" type="text/css"/>');
67
-
68
- document.write('<link rel="stylesheet" href="https://' + document.location.host + '/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>
24
+ <script type="text/javascript" src="/js_libs/jquery.min.js"></script>
25
+ <script type="text/javascript" src="/js_libs/jquery.browser.js"></script>
26
+ <script type="text/javascript" src="/js_libs/jquery.svg.min.js"></script>
27
+ <script type="text/javascript" src="/js_libs/jquery.svgdom.min.js"></script>
28
+ <script type="text/javascript" src="/js_libs/vkbeautify.js"></script>
29
+ <script type="text/javascript" src="/js_libs/util.js"></script>
30
+ <script type="text/javascript" src="/js_libs/printf.js"></script>
31
+ <script type="text/javascript" src="/js_libs/strftime.min.js"></script>
32
+ <script type="text/javascript" src="/js_libs/parsequery.js"></script>
33
+ <script type="text/javascript" src="/js_libs/underscore.min.js"></script>
34
+ <script type="text/javascript" src="/js_libs/jquery.caret.min.js"></script>
35
+ <script type="text/javascript" src="/js_libs/jquery.cookie.js"></script>
36
+
37
+ <script type="text/javascript" src="/js_libs/relaxngui.js"></script>
38
+
39
+ <script type="text/javascript" src="/js_libs/ui.js"></script>
40
+ <script type="text/javascript" src="/js_libs/custommenu.js"></script>
41
+
42
+ <link rel="stylesheet" href="/js_libs/custommenu.css" type="text/css"/>
43
+ <link rel="stylesheet" href="/js_libs/ui.css" type="text/css"/>
44
+
45
+ <link rel="stylesheet" href="/js_libs/relaxngui.css" type="text/css"/>
94
46
 
95
47
  <!-- modelling ui -->
96
48
  <script type="text/javascript" src="js/wfadaptor.js"></script>
@@ -27,10 +27,10 @@ $(document).ready(function() {
27
27
 
28
28
  function do_main_save() { //{{{
29
29
  if (save['details'].has_changed()) {
30
- var visid = 'details';
31
- var svgid = save[visid + '_target'].svgid;
32
- var desc = save[visid + '_target'].model;
33
- var node = desc.get_node_by_svg_id(svgid);
30
+ var svgid = save['details_target'].svgid;
31
+ var desc = save['details_target'].model;
32
+ var node = desc.get_node_by_svg_id(svgid);
33
+ var origtype = save['graph_adaptor'].illustrator.get_node_by_svg_id(svgid).parents('g.element[element-id]').attr('element-type');
34
34
 
35
35
  var url = $("#current-instance").text();
36
36
  $('#main ui-tabbar ui-behind button').removeClass('highlight');
@@ -58,6 +58,10 @@ function do_main_save() { //{{{
58
58
  if (vtarget.length > 0) {
59
59
  vtarget.parents('g.element[element-id]').addClass('clicked');
60
60
  }
61
+ var newtype = vtarget.parents('g.element[element-id]').attr('element-type');
62
+ if (newtype != origtype) {
63
+ manifestation.update_details(svgid);
64
+ }
61
65
  var g = graphrealization.get_description();
62
66
  save['graph'] = $X(g);
63
67
  save['graph'].find('[xmlns]').removeAttr('xmlns');
@@ -59,11 +59,6 @@ var sub_less = 'topic' + '=' + 'activity' + '&' +// {{{
59
59
  'events' + '=' + 'change';// }}}
60
60
 
61
61
  function cockpit() {
62
- if (location.protocol.match(/^file/)) {
63
- $("input[name=base-url]").val("http://localhost:" + $('body').data('defaultport'));
64
- } else {
65
- $("input[name=base-url]").val(location.protocol + "//" + location.hostname + ":" + $('body').data('defaultport'));
66
- }
67
62
  $("button[name=base]").click(function(){ create_instance(null,false); });
68
63
  $("button[name=instance]").click(function(){ ui_activate_tab("#tabinstance"); monitor_instance(false,false); });
69
64
  $("button[name=loadtestset]").click(function(e){new CustomMenu(e).menu($('#predefinedtestsets'),function(){ load_testset(false) } ); });
@@ -102,6 +97,9 @@ function cockpit() {
102
97
  });
103
98
  ui_activate_tab("#tabexecution");
104
99
  create_instance(q.load,false);
100
+ } else if (q.new || q.new == "" || q.load == "") {
101
+ ui_activate_tab("#tabinstance");
102
+ create_instance("Plain Instance",false);
105
103
  } else if (q.monitor) {
106
104
  $("input[name=instance-url]").val(q.monitor);
107
105
  ui_activate_tab("#tabexecution");
@@ -15,6 +15,20 @@ $(document).ready(function() {
15
15
  location.reload();
16
16
  });
17
17
  } else {
18
- cockpit();
18
+ $.ajax({
19
+ url: "config.json",
20
+ success: function(res){
21
+ $("input[name=base-url]").val(res['base-url']);
22
+ cockpit();
23
+ },
24
+ error: function(){
25
+ if (location.protocol.match(/^file/)) {
26
+ $("input[name=base-url]").val("http://localhost:" + $('body').data('defaultport'));
27
+ } else {
28
+ $("input[name=base-url]").val(location.protocol + "//" + location.hostname + ":" + $('body').data('defaultport'));
29
+ }
30
+ cockpit();
31
+ }
32
+ });
19
33
  }
20
34
  });
@@ -8,6 +8,8 @@ function WFAdaptorManifestation(adaptor) {
8
8
  this.compact = true;
9
9
 
10
10
  this.noarrow = ['alternative', 'otherwise'];
11
+
12
+ //{{{ transform the details data to description parts based on rng
11
13
  this.source = function(base,opts) {
12
14
  if (base[0].namespaceURI == "http://relaxng.org/ns/structure/1.0") {
13
15
  $('#relaxngworker').empty();
@@ -30,7 +32,8 @@ function WFAdaptorManifestation(adaptor) {
30
32
  }
31
33
  return base;
32
34
  }
33
- };
35
+ }; //}}}
36
+ //{{{ Return the svgid for the clicked task
34
37
  this.clicked = function(){
35
38
  var svgid = 'unknown';
36
39
  _.each(self.adaptor.illustrator.get_elements(),function(value,key) {
@@ -39,7 +42,8 @@ function WFAdaptorManifestation(adaptor) {
39
42
  }
40
43
  });
41
44
  return svgid;
42
- };
45
+ }; //}}}
46
+ //{{{ Return the svgids for all marked tasks
43
47
  this.marked = function(){
44
48
  var svgid = [];
45
49
  _.each(self.adaptor.illustrator.get_elements(),function(value,key) {
@@ -48,9 +52,20 @@ function WFAdaptorManifestation(adaptor) {
48
52
  }
49
53
  });
50
54
  return svgid;
51
- };
55
+ }; //}}}
56
+ //{{{ Render the details from rng (right hand side of graph tab)
57
+ this.update_details = function(svgid){
58
+ var tab = $('#dat_details');
59
+ var node = self.adaptor.description.get_node_by_svg_id(svgid).get(0);
60
+ tab.empty();
61
+ if (self.adaptor.description.elements[$(node).attr('svg-type')]) {
62
+ save['details_target'] = { 'svgid': svgid, 'model': self.adaptor.description };
63
+ save['details'] = new RelaxNGui(self.adaptor.description.elements[$(node).attr('svg-type')],tab,self.adaptor.description.context_eval);
64
+ save['details'].content(node);
65
+ }
66
+ }; //}}}
52
67
 
53
- function copyOrMove(menu,group,xml_node,mode) {
68
+ function copyOrMove(menu,group,xml_node,mode) { //{{{
54
69
  var markymark = self.marked();
55
70
  var check1 = [];
56
71
  var check2 = [];
@@ -89,7 +104,7 @@ function WFAdaptorManifestation(adaptor) {
89
104
  }
90
105
  );
91
106
  }
92
- }
107
+ } //}}}
93
108
 
94
109
  // Events
95
110
  this.events.mousedown = function(svgid, e, child, sibling) { // {{{
@@ -104,7 +119,7 @@ function WFAdaptorManifestation(adaptor) {
104
119
  group = self.elements[xml_node.get(0).tagName].permissible_children(xml_node,'into');
105
120
  if(group.length > 0) {
106
121
  menu['Insert into'] = group;
107
- copyOrMove(menu['Insert into'],group,self.adaptor.description.insert_first_into);
122
+ copyOrMove(menu['Insert into'],group,xml_node,self.adaptor.description.insert_first_into);
108
123
  }
109
124
  }
110
125
  if (sibling) {
@@ -146,13 +161,11 @@ function WFAdaptorManifestation(adaptor) {
146
161
  return;
147
162
  }
148
163
 
149
- var visid = 'details';
150
- var tab = $('#dat_' + visid);
151
- tab.empty();
152
-
153
164
  self.adaptor.illustrator.get_elements().removeClass('clicked');
154
165
 
155
166
  if (e && e.ctrlKey) {
167
+ var tab = $('#dat_details');
168
+ tab.empty();
156
169
  var vtarget = self.adaptor.illustrator.get_node_by_svg_id(svgid);
157
170
  if (vtarget.length > 0) {
158
171
  vtarget.parents('g.element[element-id]').toggleClass('marked');
@@ -165,13 +178,7 @@ function WFAdaptorManifestation(adaptor) {
165
178
  vtarget.parents('g.element[element-id]').addClass('clicked');
166
179
  }
167
180
 
168
- var node = self.adaptor.description.get_node_by_svg_id(svgid).get(0);
169
-
170
- if (self.adaptor.description.elements[$(node).attr('svg-type')]) {
171
- save[visid + '_target'] = { 'svgid': svgid, 'model': self.adaptor.description };
172
- save[visid] = new RelaxNGui(self.adaptor.description.elements[$(node).attr('svg-type')],tab,self.adaptor.description.context_eval);
173
- save[visid].content(node);
174
- }
181
+ self.update_details(svgid);
175
182
  }
176
183
  } // }}}
177
184
  this.events.dblclick = function(svgid, e) { // {{{
@@ -207,6 +214,10 @@ function WFAdaptorManifestation(adaptor) {
207
214
  return 'callmanipulateworklist';
208
215
  } else if($(node).attr('endpoint').match(/^worklist/)) {
209
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';
210
221
  } else if($('parameters > service', node).length > 0) {
211
222
  return 'callinjection';
212
223
  } else if($('finalize,update', node).length > 0) {
@@ -933,9 +944,24 @@ function WFAdaptorManifestation(adaptor) {
933
944
  this.elements.callmanipulateworklist = { /*{{{*/
934
945
  'type': 'abstract',
935
946
  'parent': 'call',
936
- 'description': self.adaptor.theme_dir + 'rngs/callmanipulate.rng',
937
947
  'illustrator': {//{{{
938
948
  'svg': self.adaptor.theme_dir + 'symbols/callmanipulateworklist.svg'
939
949
  },//}}}
940
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
+ }; /*}}}*/
941
967
  }
@@ -0,0 +1,122 @@
1
+ <element rngui:version="1.2" name="call" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rngui="http://rngui.org">
2
+ <attribute name="id" rngui:label="ID" rngui:default="javascript:get_free_id()">
3
+ <data type="string" rngui:readonly="true"/>
4
+ </attribute>
5
+ <attribute name="endpoint" rngui:label="Endpoint">
6
+ <data type="string"/>
7
+ </attribute>
8
+ <element name='parameters' rngui:header="Parameters">
9
+ <element name="label" rngui:label="Label">
10
+ <data type="string" rngui:label="Short description of the task"/>
11
+ </element>
12
+ <element name="method" rngui:label="Method">
13
+ <choice>
14
+ <value>:post</value>
15
+ <value>:get</value>
16
+ <value>:put</value>
17
+ <value>:delete</value>
18
+ </choice>
19
+ </element>
20
+ <element name="arguments" rngui:header="Arguments">
21
+ <element name="nc-program" rngui:label="NC Program">
22
+ <data type="string" rngui:label="Unique ID of the NC Program"/>
23
+ </element>
24
+ <element name="material-name" rngui:label="Material Name">
25
+ <data type="string" rngui:label="Name of the raw material"/>
26
+ </element>
27
+ <element name="material-pic" rngui:label="Material Picture">
28
+ <data type="string" rngui:label="Picture of the raw material"/>
29
+ </element>
30
+ <element name="result-pic" rngui:label="Result Picture">
31
+ <data type="string" rngui:label="Picture of the result"/>
32
+ </element>
33
+ <element name="comment" rngui:label="Comment">
34
+ <text rngui:wrap='true' rngui:label='Additional comments for the operator'/>
35
+ </element>
36
+ <element name="tools" rngui:header="Tools">
37
+ <zeroOrMore rngui:label="Add Tool">
38
+ <element name="tool">
39
+ <element name="place" rngui:label="Position">
40
+ <data type="integer" rngui:label="Position in Tool Magazine"/>
41
+ </element>
42
+ <element name="tool-name" rngui:label="Tool">
43
+ <data type="string" rngui:label="Name of Tool"/>
44
+ </element>
45
+ <element name="tool-holder" rngui:label="Holder">
46
+ <data type="string" rngui:label="Name of Tool Holder"/>
47
+ </element>
48
+ <element name="tool-orientation" rngui:label="Orientation">
49
+ <data type="string" rngui:label="Orientation in Tool Holder"/>
50
+ </element>
51
+ <element name="corrections" rngui:header="Corrections">
52
+ <zeroOrMore rngui:label="Add Correction">
53
+ <element name="correction">
54
+ <attribute name="length-x" rngui:label="Length X">
55
+ <data type="float"/>
56
+ </attribute>
57
+ <attribute name="length-z" rngui:label="Length Y">
58
+ <data type="float"/>
59
+ </attribute>
60
+ <attribute name="radius" rngui:label="Radius">
61
+ <data type="float"/>
62
+ </attribute>
63
+ </element>
64
+ </zeroOrMore>
65
+ </element>
66
+ <element name="attachments" rngui:header="Attachments">
67
+ <zeroOrMore rngui:label="Add Attachment">
68
+ <element name="attachment" rngui:label="URL">
69
+ <attribute name="label" rngui:label="Label">
70
+ <data type="string" rngui:label="Label"/>
71
+ </attribute>
72
+ <data type="string" rngui:label="URL"/>
73
+ </element>
74
+ </zeroOrMore>
75
+ </element>
76
+ </element>
77
+ </zeroOrMore>
78
+ </element>
79
+ </element>
80
+ </element>
81
+ <element name="finalize" rngui:header="Finalize" rngui:label="Code">
82
+ <attribute name="output" rngui:label="Access Variable" rngui:default="result">
83
+ <data type="string" rngui:readonly="true"/>
84
+ </attribute>
85
+ <text rngui:label='Script that is executed, when a service returns data'/>
86
+ </element>
87
+ <element name="update" rngui:header="Update" rngui:label="Code">
88
+ <attribute name="output" rngui:label="Access Variable" rngui:default="result">
89
+ <data type="string" rngui:readonly="true"/>
90
+ </attribute>
91
+ <text rngui:label='Script that is executed, when a service sends intermediate data'/>
92
+ </element>
93
+ <element name="_timing" rngui:header="Timing">
94
+ <element name="_timing_min" rngui:label='Min in m'>
95
+ <data type='float' rngui:label='Minutes'/>
96
+ </element>
97
+ <element name="_timing_max" rngui:label='Max in m'>
98
+ <data type='float' rngui:label='Minutes'/>
99
+ </element>
100
+ <element name="_timing_avg" rngui:label='Avg in m'>
101
+ <data type='float' rngui:label='Minutes'/>
102
+ </element>
103
+ </element>
104
+ <element name="_notes" rngui:header="Notes">
105
+ <element name="_notes_general" rngui:label='General'>
106
+ <text rngui:wrap='true' rngui:label='Notes'/>
107
+ </element>
108
+ <element name="_notes_output" rngui:label='Output'>
109
+ <text rngui:wrap='true' rngui:label='Notes'/>
110
+ </element>
111
+ <element name="_attachments">
112
+ <zeroOrMore rngui:label="Create Attachment">
113
+ <element name='_attachment' rngui:label='Attachment'>
114
+ <attribute name="label" rngui:label="Note">
115
+ <data type="string"/>
116
+ </attribute>
117
+ <data type="string" rngui:label="Url"/>
118
+ </element>
119
+ </zeroOrMore>
120
+ </element>
121
+ </element>
122
+ </element>
@@ -0,0 +1,107 @@
1
+ <element rngui:version="1.2" name="call" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rngui="http://rngui.org">
2
+ <attribute name="id" rngui:label="ID" rngui:default="javascript:get_free_id()">
3
+ <data type="string" rngui:readonly="true"/>
4
+ </attribute>
5
+ <attribute name="endpoint" rngui:label="Endpoint">
6
+ <data type="string"/>
7
+ </attribute>
8
+ <element name='parameters' rngui:header="Parameters">
9
+ <element name="label" rngui:label="Label">
10
+ <data type="string" rngui:label="Short description of the task"/>
11
+ </element>
12
+ <element name="method" rngui:label="Method">
13
+ <choice>
14
+ <value>:post</value>
15
+ <value>:get</value>
16
+ <value>:put</value>
17
+ <value>:delete</value>
18
+ </choice>
19
+ </element>
20
+ <element name="arguments" rngui:header="Arguments">
21
+ <element name="nc-program" rngui:label="NC Program">
22
+ <data type="string" rngui:label="Unique ID of the NC Program"/>
23
+ </element>
24
+ <element name="material-name" rngui:label="Material Name">
25
+ <data type="string" rngui:label="Name of the raw material"/>
26
+ </element>
27
+ <element name="material-pic" rngui:label="Material Picture">
28
+ <data type="string" rngui:label="Picture of the raw material"/>
29
+ </element>
30
+ <element name="result-pic" rngui:label="Result Picture">
31
+ <data type="string" rngui:label="Picture of the result"/>
32
+ </element>
33
+ <element name="comment" rngui:label="Comment">
34
+ <text rngui:wrap='true' rngui:label='Additional comments for the operator'/>
35
+ </element>
36
+ <element name="tools" rngui:header="Tools">
37
+ <zeroOrMore rngui:label="Add Tool">
38
+ <element name="tool">
39
+ <element name="place" rngui:label="Position">
40
+ <data type="integer" rngui:label="Position in Tool Magazine"/>
41
+ </element>
42
+ <element name="tool-name" rngui:label="Tool">
43
+ <data type="string" rngui:label="Name of Tool"/>
44
+ </element>
45
+ <element name="tool-holder" rngui:label="Holder">
46
+ <data type="string" rngui:label="Name of Tool Holder"/>
47
+ </element>
48
+ <element name="tool-orientation" rngui:label="Orientation">
49
+ <data type="string" rngui:label="Orientation in Tool Holder"/>
50
+ </element>
51
+ <element name="corrections" rngui:header="Corrections">
52
+ <zeroOrMore rngui:label="Add Correction">
53
+ <element name="correction">
54
+ <attribute name="length-x" rngui:label="Length X">
55
+ <data type="float"/>
56
+ </attribute>
57
+ <attribute name="length-z" rngui:label="Length Y">
58
+ <data type="float"/>
59
+ </attribute>
60
+ <attribute name="radius" rngui:label="Radius">
61
+ <data type="float"/>
62
+ </attribute>
63
+ </element>
64
+ </zeroOrMore>
65
+ </element>
66
+ <element name="attachments" rngui:header="Attachments">
67
+ <zeroOrMore rngui:label="Add Attachment">
68
+ <element name="attachment" rngui:label="URL">
69
+ <attribute name="label" rngui:label="Label">
70
+ <data type="string" rngui:label="Label"/>
71
+ </attribute>
72
+ <data type="string" rngui:label="URL"/>
73
+ </element>
74
+ </zeroOrMore>
75
+ </element>
76
+ </element>
77
+ </zeroOrMore>
78
+ </element>
79
+ </element>
80
+ </element>
81
+ <element name="_timing" rngui:header="Timing">
82
+ <element name="_timing_min" rngui:label='Min in m'>
83
+ <data type='float' rngui:label='Minutes'/>
84
+ </element>
85
+ <element name="_timing_max" rngui:label='Max in m'>
86
+ <data type='float' rngui:label='Minutes'/>
87
+ </element>
88
+ <element name="_timing_avg" rngui:label='Avg in m'>
89
+ <data type='float' rngui:label='Minutes'/>
90
+ </element>
91
+ </element>
92
+ <element name="_notes" rngui:header="Notes">
93
+ <element name="_notes_general" rngui:label='General'>
94
+ <text rngui:wrap='true' rngui:label='Notes'/>
95
+ </element>
96
+ <element name="_attachments">
97
+ <zeroOrMore rngui:label="Create Attachment">
98
+ <element name='_attachment' rngui:label='Attachment'>
99
+ <attribute name="label" rngui:label="Note">
100
+ <data type="string"/>
101
+ </attribute>
102
+ <data type="string" rngui:label="Url"/>
103
+ </element>
104
+ </zeroOrMore>
105
+ </element>
106
+ </element>
107
+ </element>
@@ -0,0 +1,6 @@
1
+ <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="1" y="1" width="28" height="28" rx="4" class="cline hfill rfill stand"/>
3
+ <path transform="translate(-2,-2)" class="normal" style="fill:#000000;" d="m 15,6.5 a 3.9999995,4 0 0 0 -4,4 3.9999995,4 0 0 0 4,4 3.9999995,4 0 0 0 4,-4 3.9999995,4 0 0 0 -4,-4 z m 0,8 -3.5,0 c -1.108,0 -2,0.892 -2,2 l 0,5 c 0,1.108 0.892,2 2,2 l 7,0 c 1.108,0 2,-0.892 2,-2 l 0,-5 c 0,-1.108 -0.892,-2 -2,-2 l -3.5,0 z"/>
4
+ <circle cx="28" cy="27" r="9" class="cline hfill rfill stand"/>
5
+ <text transform="translate(28,31)" class="small">s</text>
6
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="1" y="1" width="28" height="28" rx="4" class="cline hfill rfill stand"/>
3
+ <path class="normal" style="fill:#000000;" d="m 15,6.5 a 3.9999995,4 0 0 0 -4,4 3.9999995,4 0 0 0 4,4 3.9999995,4 0 0 0 4,-4 3.9999995,4 0 0 0 -4,-4 z m 0,8 -3.5,0 c -1.108,0 -2,0.892 -2,2 l 0,5 c 0,1.108 0.892,2 2,2 l 7,0 c 1.108,0 2,-0.892 2,-2 l 0,-5 c 0,-1.108 -0.892,-2 -2,-2 l -3.5,0 z"/>
4
+ </svg>
@@ -8,6 +8,8 @@ function WFAdaptorManifestation(adaptor) {
8
8
  this.compact = false;
9
9
 
10
10
  this.noarrow = ['alternative', 'otherwise'];
11
+
12
+ //{{{ transform the details data to description parts based on rng
11
13
  this.source = function(base,opts) {
12
14
  if (base[0].namespaceURI == "http://relaxng.org/ns/structure/1.0") {
13
15
  $('#relaxngworker').empty();
@@ -30,7 +32,8 @@ function WFAdaptorManifestation(adaptor) {
30
32
  }
31
33
  return base;
32
34
  }
33
- };
35
+ }; //}}}
36
+ //{{{ Return the svgid for the clicked task
34
37
  this.clicked = function(){
35
38
  var svgid = 'unknown';
36
39
  _.each(self.adaptor.illustrator.get_elements(),function(value,key) {
@@ -39,7 +42,8 @@ function WFAdaptorManifestation(adaptor) {
39
42
  }
40
43
  });
41
44
  return svgid;
42
- };
45
+ }; //}}}
46
+ //{{{ Return the svgids for all marked tasks
43
47
  this.marked = function(){
44
48
  var svgid = [];
45
49
  _.each(self.adaptor.illustrator.get_elements(),function(value,key) {
@@ -48,9 +52,20 @@ function WFAdaptorManifestation(adaptor) {
48
52
  }
49
53
  });
50
54
  return svgid;
51
- };
55
+ }; //}}}
56
+ //{{{ Render the details from rng (right hand side of graph tab)
57
+ this.update_details = function(svgid){
58
+ var tab = $('#dat_details');
59
+ var node = self.adaptor.description.get_node_by_svg_id(svgid).get(0);
60
+ tab.empty();
61
+ if (self.adaptor.description.elements[$(node).attr('svg-type')]) {
62
+ save['details_target'] = { 'svgid': svgid, 'model': self.adaptor.description };
63
+ save['details'] = new RelaxNGui(self.adaptor.description.elements[$(node).attr('svg-type')],tab,self.adaptor.description.context_eval);
64
+ save['details'].content(node);
65
+ }
66
+ }; //}}}
52
67
 
53
- function copyOrMove(menu,group,xml_node,mode) {
68
+ function copyOrMove(menu,group,xml_node,mode) { //{{{
54
69
  var markymark = self.marked();
55
70
  var check1 = [];
56
71
  var check2 = [];
@@ -89,7 +104,7 @@ function WFAdaptorManifestation(adaptor) {
89
104
  }
90
105
  );
91
106
  }
92
- }
107
+ } //}}}
93
108
 
94
109
  // Events
95
110
  this.events.mousedown = function(svgid, e, child, sibling) { // {{{
@@ -104,7 +119,7 @@ function WFAdaptorManifestation(adaptor) {
104
119
  group = self.elements[xml_node.get(0).tagName].permissible_children(xml_node,'into');
105
120
  if(group.length > 0) {
106
121
  menu['Insert into'] = group;
107
- copyOrMove(menu['Insert into'],group,self.adaptor.description.insert_first_into);
122
+ copyOrMove(menu['Insert into'],group,xml_node,self.adaptor.description.insert_first_into);
108
123
  }
109
124
  }
110
125
  if (sibling) {
@@ -146,13 +161,11 @@ function WFAdaptorManifestation(adaptor) {
146
161
  return;
147
162
  }
148
163
 
149
- var visid = 'details';
150
- var tab = $('#dat_' + visid);
151
- tab.empty();
152
-
153
164
  self.adaptor.illustrator.get_elements().removeClass('clicked');
154
165
 
155
166
  if (e && e.ctrlKey) {
167
+ var tab = $('#dat_details');
168
+ tab.empty();
156
169
  var vtarget = self.adaptor.illustrator.get_node_by_svg_id(svgid);
157
170
  if (vtarget.length > 0) {
158
171
  vtarget.parents('g.element[element-id]').toggleClass('marked');
@@ -165,13 +178,7 @@ function WFAdaptorManifestation(adaptor) {
165
178
  vtarget.parents('g.element[element-id]').addClass('clicked');
166
179
  }
167
180
 
168
- var node = self.adaptor.description.get_node_by_svg_id(svgid).get(0);
169
-
170
- if (self.adaptor.description.elements[$(node).attr('svg-type')]) {
171
- save[visid + '_target'] = { 'svgid': svgid, 'model': self.adaptor.description };
172
- save[visid] = new RelaxNGui(self.adaptor.description.elements[$(node).attr('svg-type')],tab,self.adaptor.description.context_eval);
173
- save[visid].content(node);
174
- }
181
+ self.update_details(svgid);
175
182
  }
176
183
  } // }}}
177
184
  this.events.dblclick = function(svgid, e) { // {{{
@@ -207,6 +214,10 @@ function WFAdaptorManifestation(adaptor) {
207
214
  return 'callmanipulateworklist';
208
215
  } else if($(node).attr('endpoint').match(/^worklist/)) {
209
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';
210
221
  } else if($('parameters > service', node).length > 0) {
211
222
  return 'callinjection';
212
223
  } else if($('finalize,update', node).length > 0) {
@@ -933,9 +944,24 @@ function WFAdaptorManifestation(adaptor) {
933
944
  this.elements.callmanipulateworklist = { /*{{{*/
934
945
  'type': 'abstract',
935
946
  'parent': 'call',
936
- 'description': self.adaptor.theme_dir + 'rngs/callmanipulate.rng',
937
947
  'illustrator': {//{{{
938
948
  'svg': self.adaptor.theme_dir + 'symbols/callmanipulateworklist.svg'
939
949
  },//}}}
940
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
+ }; /*}}}*/
941
967
  }
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cpee"
3
- s.version = "1.3.224"
3
+ s.version = "1.3.225"
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"
@@ -2,8 +2,8 @@
2
2
  <interface name="events">
3
3
  <xi:include href="http://www.riddl.org/ns/common-patterns/notifications-consumer/1.0/consumer.xml"/>
4
4
  </interface>
5
- <interface name="cpee" location="http://cpee.org:9298">
6
- <xi:include href="http://cpee.org:9298/?riddl-description"/>
5
+ <interface name="cpee" location="http://localhost:9298">
6
+ <xi:include href="http://localhost:9298/?riddl-description"/>
7
7
  </interface>
8
8
  <interface name="logoverlay">
9
9
  <xi:include href="logoverlay.xml"/>
@@ -115,14 +115,14 @@ end #}}}
115
115
  Riddl::Server.new(::File.dirname(__FILE__) + '/log.xml', :host => "coruscant.wst.univie.ac.at", :port => 9300) do #{{{
116
116
  accessible_description true
117
117
  cross_site_xhr true
118
- log_dir = "/home/demo/Projects/cpee-helpers/log/logs_yaml"
118
+ log_dir = "/home/centurio/Projects/cpee/log/logs_yaml"
119
119
 
120
120
  interface 'events' do
121
121
  run Logging if post 'event'
122
122
  end
123
123
  interface 'logoverlay' do |r|
124
+ p log_dir + r[:h]["RIDDL_DECLARATION_PATH"]+ ".xes"
124
125
  run Riddl::Utils::FileServe, log_dir + r[:h]["RIDDL_DECLARATION_PATH"]+ ".xes","text/xml" if get
125
126
  end
126
127
 
127
-
128
128
  end.loop! #}}}
@@ -359,10 +359,18 @@
359
359
  </xsl:template>
360
360
  <xsl:template match="d:*" mode="sub">
361
361
  <xsl:if test="count(preceding-sibling::*) &gt; 0">, </xsl:if>
362
-
363
362
  <xsl:text>⭐(</xsl:text>
364
363
  <xsl:text>:name =&gt; :</xsl:text>
365
- <xsl:value-of select="name()"/>
364
+ <xsl:choose>
365
+ <xsl:when test="contains(name(),'-')">
366
+ <xsl:text>'</xsl:text>
367
+ <xsl:value-of select="name()"/>
368
+ <xsl:text>'</xsl:text>
369
+ </xsl:when>
370
+ <xsl:otherwise>
371
+ <xsl:value-of select="name()"/>
372
+ </xsl:otherwise>
373
+ </xsl:choose>
366
374
  <xsl:text>, :value =&gt; </xsl:text>
367
375
  <xsl:choose>
368
376
  <xsl:when test="not(node())">
@@ -371,10 +379,19 @@
371
379
  <xsl:when test="child::node()[not(self::text())]">
372
380
  <xsl:text>"{ </xsl:text>
373
381
  <xsl:apply-templates select="*" mode="JSON"/>
374
- <xsl:text> }"</xsl:text>
382
+ <xsl:text>}"</xsl:text>
375
383
  </xsl:when>
376
384
  <xsl:otherwise>
377
- <xsl:value-of select="text()"/>
385
+ <xsl:choose>
386
+ <xsl:when test="substring(text(),1,1) = '!'">
387
+ <xsl:value-of select="substring(text(),2)"/>
388
+ </xsl:when>
389
+ <xsl:otherwise>
390
+ <xsl:text>"</xsl:text>
391
+ <xsl:value-of select="str:replace(str:replace(text(),'\','\\'),'&quot;','\&quot;')"/>
392
+ <xsl:text>"</xsl:text>
393
+ </xsl:otherwise>
394
+ </xsl:choose>
378
395
  </xsl:otherwise>
379
396
  </xsl:choose>
380
397
  <xsl:for-each select="@*">
@@ -469,6 +486,17 @@
469
486
 
470
487
  <!-- JSON Element -->
471
488
  <xsl:template match="*" mode="JSON">
489
+ <xsl:text>\"</xsl:text>
490
+ <xsl:value-of select="name()"/>
491
+ <xsl:text>-</xsl:text>
492
+ <xsl:value-of select="generate-id(.)"/>
493
+ <xsl:text>\": </xsl:text>
494
+ <xsl:call-template name="JSONProperties">
495
+ <xsl:with-param name="parent" select="'Yes'"></xsl:with-param>
496
+ </xsl:call-template>
497
+ </xsl:template>
498
+
499
+ <xsl:template match="*" mode="JSONSUB">
472
500
  <xsl:text>\"</xsl:text>
473
501
  <xsl:value-of select="name()"/>
474
502
  <xsl:text>\": </xsl:text>
@@ -526,10 +554,21 @@
526
554
  <xsl:text> ] }</xsl:text>
527
555
  </xsl:when>
528
556
  <xsl:otherwise>
557
+ <xsl:if test="text()[normalize-space(.)]">
558
+ <xsl:text>[ </xsl:text>
559
+ </xsl:if>
529
560
  <xsl:text>{</xsl:text>
530
561
  <xsl:apply-templates select="@*" mode="JSON"/>
531
- <xsl:apply-templates select="*" mode="JSON"/>
562
+ <xsl:apply-templates select="*" mode="JSONSUB"/>
532
563
  <xsl:text>}</xsl:text>
564
+ <xsl:if test="text()[normalize-space(.)]">
565
+ <xsl:text>, </xsl:text>
566
+ <xsl:text>\"</xsl:text>
567
+ <xsl:value-of select="str:replace(str:replace(.,'\','\\'),'&quot;','\\\&quot;')"/>
568
+ <xsl:text>\"</xsl:text>
569
+ <xsl:text> ]</xsl:text>
570
+ </xsl:if>
571
+ <xsl:text> </xsl:text>
533
572
  </xsl:otherwise>
534
573
  </xsl:choose>
535
574
  <xsl:if test="following-sibling::*">, </xsl:if>
@@ -537,7 +576,7 @@
537
576
 
538
577
  <!-- JSON Attribute Property -->
539
578
  <xsl:template match="@*" mode="JSON">
540
- <xsl:text> \"</xsl:text>
579
+ <xsl:text> \"@</xsl:text>
541
580
  <xsl:value-of select="name()"/>
542
581
  <xsl:text>\": </xsl:text>
543
582
  <xsl:choose>
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.224
4
+ version: 1.3.225
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-02-09 00:00:00.000000000 Z
14
+ date: 2018-02-23 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: riddl
@@ -157,6 +157,8 @@ files:
157
157
  - cockpit/themes/default/rngs/alternative.rng
158
158
  - cockpit/themes/default/rngs/call.rng
159
159
  - cockpit/themes/default/rngs/callmanipulate.rng
160
+ - cockpit/themes/default/rngs/callmanipulateworkqueue.rng
161
+ - cockpit/themes/default/rngs/callworkqueue.rng
160
162
  - cockpit/themes/default/rngs/choose.rng
161
163
  - cockpit/themes/default/rngs/critical.rng
162
164
  - cockpit/themes/default/rngs/escape.rng
@@ -176,7 +178,9 @@ files:
176
178
  - cockpit/themes/default/symbols/callinstantiation.svg
177
179
  - cockpit/themes/default/symbols/callmanipulate.svg
178
180
  - cockpit/themes/default/symbols/callmanipulateworklist.svg
181
+ - cockpit/themes/default/symbols/callmanipulateworkqueue.svg
179
182
  - cockpit/themes/default/symbols/callworklist.svg
183
+ - cockpit/themes/default/symbols/callworkqueue.svg
180
184
  - cockpit/themes/default/symbols/choose.svg
181
185
  - cockpit/themes/default/symbols/choose_exclusive.svg
182
186
  - cockpit/themes/default/symbols/choose_inclusive.svg