cpee 2.0.23 → 2.0.28
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cockpit/{templates/.CPEE.xml → CPEE.xml} +1 -1
- data/cockpit/{templates/.Signavio.xml → Signavio.xml} +1 -1
- data/cockpit/css/model.css +2 -0
- data/cockpit/css/replay.css +55 -0
- data/cockpit/css/ui.css +30 -5
- data/cockpit/edit.html +260 -0
- data/cockpit/graph.html +3 -3
- data/cockpit/index.html +11 -8
- data/cockpit/js/details.js +0 -1
- data/cockpit/js/edit.js +32 -0
- data/cockpit/js/instance.js +46 -48
- data/cockpit/js/model.js +6 -36
- data/cockpit/js/parameters.js +9 -4
- data/cockpit/js/replay.js +40 -0
- data/cockpit/js/ui.js +7 -0
- data/cockpit/model.html +8 -4
- data/cockpit/replay.html +53 -0
- data/cockpit/templates/Coopis 2010.xml +1 -1
- data/cockpit/templates/IUPC arXiv:1104.3609 P34 1.xml +1 -1
- data/cockpit/templates/IUPC arXiv:1104.3609 P34 2.xml +1 -1
- data/cockpit/templates/IUPC arXiv:1104.3609 P34 3.xml +1 -1
- data/cockpit/templates/Track Test Local.xml +6 -2
- data/cockpit/templates/Track Test.xml +5 -1
- data/cockpit/templates/UR-VUE 2020 Manual Adjust.xml +5 -1
- data/cockpit/templates/UR-VUE 2020 Solution Baseline.xml +8 -4
- data/cockpit/templates/UR-VUE 2020 Solution NN.xml +8 -4
- data/cockpit/templates/UR-VUE 2020 Solution View.xml +8 -4
- data/cockpit/templates/UR-VUE 2020.xml +8 -4
- data/cockpit/templates/instantiate.local/Take_Sub.xml +1 -1
- data/cockpit/themes/compact/rngs/call.rng +93 -41
- data/cockpit/themes/compact/rngs/callmanipulate.rng +113 -40
- data/cockpit/themes/compact/theme.js +57 -25
- data/cockpit/themes/{diana → control}/rngs/alternative.rng +0 -0
- data/cockpit/themes/control/rngs/call.rng +174 -0
- data/cockpit/themes/control/rngs/callmanipulate.rng +218 -0
- data/cockpit/themes/{diana → control}/rngs/choose.rng +0 -0
- data/cockpit/themes/{diana → control}/rngs/closed_loop.rng +0 -0
- data/cockpit/themes/{diana → control}/rngs/closed_loop_cancel.rng +0 -0
- data/cockpit/themes/{diana → control}/rngs/closed_loop_control.rng +0 -0
- data/cockpit/themes/{diana → control}/rngs/closed_loop_measuring.rng +0 -0
- data/cockpit/themes/{diana → control}/rngs/critical.rng +0 -0
- data/cockpit/themes/{diana → control}/rngs/escape.rng +0 -0
- data/cockpit/themes/{diana → control}/rngs/group.rng +0 -0
- data/cockpit/themes/{diana → control}/rngs/loop.rng +0 -0
- data/cockpit/themes/{diana → control}/rngs/manipulate.rng +0 -0
- data/cockpit/themes/{diana → control}/rngs/otherwise.rng +0 -0
- data/cockpit/themes/{diana → control}/rngs/parallel.rng +0 -0
- data/cockpit/themes/{diana → control}/rngs/parallel_branch.rng +0 -0
- data/cockpit/themes/{diana → control}/rngs/scripts.rng +0 -0
- data/cockpit/themes/{diana → control}/rngs/stop.rng +0 -0
- data/cockpit/themes/{diana → control}/rngs/terminate.rng +0 -0
- data/cockpit/themes/{diana → control}/symbols/alternative.svg +0 -0
- data/cockpit/themes/{diana → control}/symbols/arrow.svg +0 -0
- data/cockpit/themes/{diana → control}/symbols/call.svg +0 -0
- data/cockpit/themes/{diana → control}/symbols/callmanipulate.svg +0 -0
- data/cockpit/themes/{diana → control}/symbols/choose.svg +0 -0
- data/cockpit/themes/{diana → control}/symbols/choose_exclusive.svg +0 -0
- data/cockpit/themes/{diana → control}/symbols/choose_inclusive.svg +0 -0
- data/cockpit/themes/{diana → control}/symbols/closed_loop.svg +0 -0
- data/cockpit/themes/{diana → control}/symbols/closed_loop_cancel.svg +0 -0
- data/cockpit/themes/{diana → control}/symbols/closed_loop_control.svg +0 -0
- data/cockpit/themes/{diana → control}/symbols/closed_loop_measuring.svg +0 -0
- data/cockpit/themes/{diana → control}/symbols/complex.svg +0 -0
- data/cockpit/themes/{diana → control}/symbols/critical.svg +0 -0
- data/cockpit/themes/{diana → control}/symbols/end.svg +0 -0
- data/cockpit/themes/{diana → control}/symbols/escape.svg +0 -0
- data/cockpit/themes/{diana → control}/symbols/event_end.svg +0 -0
- data/cockpit/themes/{diana → control}/symbols/loop.svg +0 -0
- data/cockpit/themes/{diana → control}/symbols/manipulate.svg +0 -0
- data/cockpit/themes/{diana → control}/symbols/otherwise.svg +0 -0
- data/cockpit/themes/{diana → control}/symbols/parallel.svg +0 -0
- data/cockpit/themes/{diana → control}/symbols/parallel_branch.svg +0 -0
- data/cockpit/themes/{diana → control}/symbols/parallel_branch_compact.svg +0 -0
- data/cockpit/themes/{diana → control}/symbols/parallel_branch_event.svg +0 -0
- data/cockpit/themes/{diana → control}/symbols/parallel_branch_normal.svg +0 -0
- data/cockpit/themes/{diana → control}/symbols/scripts.svg +0 -0
- data/cockpit/themes/{diana → control}/symbols/start.svg +0 -0
- data/cockpit/themes/{diana → control}/symbols/stop.svg +0 -0
- data/cockpit/themes/{diana → control}/symbols/terminate.svg +0 -0
- data/cockpit/themes/{diana → control}/theme.js +74 -28
- data/cockpit/themes/default/rngs/call.rng +93 -41
- data/cockpit/themes/default/rngs/callmanipulate.rng +113 -40
- data/cockpit/themes/default/theme.js +1318 -0
- data/cockpit/themes/extended/rngs/call.rng +93 -41
- data/cockpit/themes/extended/rngs/callmanipulate.rng +113 -40
- data/cockpit/themes/extended/theme.js +50 -19
- data/cockpit/themes/model/rngs/call.rng +21 -20
- data/cockpit/themes/model/rngs/callmanipulate.rng +23 -22
- data/cockpit/themes/model/theme.js +51 -20
- data/cockpit/themes/packed/rngs/call.rng +93 -41
- data/cockpit/themes/packed/rngs/callmanipulate.rng +113 -40
- data/cockpit/themes/packed/theme.js +50 -19
- data/cockpit/themes/preset/rngs/call.rng +93 -41
- data/cockpit/themes/preset/rngs/callmanipulate.rng +113 -40
- data/cockpit/themes/preset/theme.js +49 -18
- data/cockpit/track.html +3 -10
- data/cockpit/{templates/.transformations.xml → transformations.xml} +0 -0
- data/cpee.gemspec +3 -3
- data/lib/callbacks.xml +5 -0
- data/lib/cpee/controller.rb +30 -28
- data/lib/cpee/implementation_callbacks.rb +60 -0
- data/lib/cpee/implementation_notifications.rb +6 -2
- data/server/handlerwrappers/default.rb +21 -5
- data/server/resources/transformation_dslx.xsl +1 -1
- data/server/routing/end.pid +1 -0
- data/server/routing/end.rb +1 -0
- data/server/routing/forward-events.pid +1 -0
- data/server/routing/forward-votes.pid +1 -0
- data/server/routing/forward-votes.rb +6 -5
- data/server/routing/persist.pid +1 -0
- data/server/routing/persist.rb +4 -4
- data/server/server.pid +1 -0
- metadata +66 -56
- data/cockpit/templates/.templates.xml +0 -13
- data/cockpit/themes/diana/rngs/call.rng +0 -122
- data/cockpit/themes/diana/rngs/callmanipulate.rng +0 -145
data/cockpit/index.html
CHANGED
@@ -36,11 +36,11 @@
|
|
36
36
|
|
37
37
|
<script type="text/javascript" src="/js_libs/relaxngui.js"></script>
|
38
38
|
|
39
|
-
<script type="text/javascript" src="/js_libs/
|
39
|
+
<script type="text/javascript" src="/js_libs/uidash.js"></script>
|
40
40
|
<script type="text/javascript" src="/js_libs/custommenu.js"></script>
|
41
41
|
|
42
42
|
<link rel="stylesheet" href="/js_libs/custommenu.css" type="text/css"/>
|
43
|
-
<link rel="stylesheet" href="/js_libs/
|
43
|
+
<link rel="stylesheet" href="/js_libs/uidash.css" type="text/css"/>
|
44
44
|
|
45
45
|
<link rel="stylesheet" href="/js_libs/relaxngui.css" type="text/css"/>
|
46
46
|
|
@@ -54,12 +54,13 @@
|
|
54
54
|
<script type="text/javascript" src="js/details.js"></script>
|
55
55
|
<script type="text/javascript" src="js/parameters.js"></script>
|
56
56
|
<link rel="stylesheet" href="css/ui.css" type="text/css"/>
|
57
|
+
<link rel="stylesheet" href="/global_ui/uicpee.css" type="text/css"/>
|
57
58
|
<style>
|
58
59
|
/* has to be fucking inline, because firefox and chrome disagree how to handle filter urls */
|
59
60
|
/* shit balls, no elegance is left in this world */
|
60
61
|
</style>
|
61
62
|
</head>
|
62
|
-
<body data-base-port="8298" data-res-port="9303" data-theme-base="themes" is="x-ui">
|
63
|
+
<body data-base-port="8298" data-res-port="9303" data-theme-base="themes" is="x-ui-">
|
63
64
|
<div id='disclaimer' class='hidden'> <!--{{{-->
|
64
65
|
<h1>Disclaimer</h1>
|
65
66
|
|
@@ -122,6 +123,7 @@
|
|
122
123
|
<ui-tab class="inactive hidden" data-tab="instance" id="tabinstance" >Instance</ui-tab>
|
123
124
|
<ui-tab class="inactive hidden" data-tab="execution" id="tabexecution">Execution</ui-tab>
|
124
125
|
<ui-behind ><a style='display:none' target='_blank' id='current-instance'></a><a style='display:none' target='_blank' id='current-instance-properties'>P</a><a style='display:none' target='_blank' id='current-instance-subscriptions'>S</a><a style='display:none' target='_blank' id='current-instance-callbacks'>C</a></ui-behind>
|
126
|
+
<ui-last ><a class="logo" href=".."></a></ui-last>
|
125
127
|
</ui-tabbar>
|
126
128
|
<ui-content>
|
127
129
|
<ui-area data-belongs-to-tab="new" id="areanew"> <!--{{{-->
|
@@ -187,8 +189,6 @@
|
|
187
189
|
<button name="state_start" title='start' style='display:none'>Start</button>
|
188
190
|
<button name="state_stop" title='stop' style='display:none'>Stop</button>
|
189
191
|
<span id="state_extended" style='display:none'>
|
190
|
-
<span> / </span>
|
191
|
-
<button name="state_replay" title='replay' style='display:none'>Replay</button>
|
192
192
|
<span> / </span>
|
193
193
|
<button name="state_abandon" title='abandon' style='display:none'>Abandon</button>
|
194
194
|
</span>
|
@@ -211,17 +211,20 @@
|
|
211
211
|
<ui-tab class="" data-tab="dataelements" id="tabdataelements">Data Elements</ui-tab>
|
212
212
|
<ui-tab class="inactive" data-tab="endpoints" id="tabendpoints" >Endpoints</ui-tab>
|
213
213
|
<ui-tab class="inactive" data-tab="attributes" id="tabattributes" >Attributes</ui-tab>
|
214
|
-
<ui-behind
|
214
|
+
<ui-behind ></ui-behind>
|
215
215
|
</ui-tabbar>
|
216
216
|
<ui-content>
|
217
217
|
<ui-area data-belongs-to-tab="dataelements" id="areadataelements"> <!--{{{-->
|
218
|
+
<button title='add entry'><span>New</span></button>
|
218
219
|
<div id="dat_dataelements"></div>
|
219
220
|
</ui-area> <!--}}}-->
|
220
221
|
<ui-area data-belongs-to-tab="endpoints" id="areaendpoints" class="inactive"> <!--{{{-->
|
221
|
-
<
|
222
|
+
<button title='add entry'><span>New</span></button>
|
223
|
+
<div id="dat_endpoints"></div>
|
222
224
|
</ui-area> <!--}}}-->
|
223
225
|
<ui-area data-belongs-to-tab="attributes" id="areaattributes" class="inactive"> <!--{{{-->
|
224
|
-
<
|
226
|
+
<button title='add entry'><span>New</span></button>
|
227
|
+
<div id="dat_attributes"></div>
|
225
228
|
</ui-area> <!--}}}-->
|
226
229
|
</ui-content>
|
227
230
|
</ui-tabbed>
|
data/cockpit/js/details.js
CHANGED
@@ -49,7 +49,6 @@ function do_main_work() { //{{{
|
|
49
49
|
var origtype = orignode.attr('element-type') + '_' + orignode.attr('element-endpoint');
|
50
50
|
|
51
51
|
var url = $('body').attr('current-instance');
|
52
|
-
$('#main ui-tabbar ui-behind button').removeClass('highlight');
|
53
52
|
save['details'].set_checkpoint();
|
54
53
|
|
55
54
|
var nnew = $(save['details'].save().documentElement);
|
data/cockpit/js/edit.js
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
document.addEventListener('graph:changed', function (e) {
|
2
|
+
$("button[name=save]").prop("disabled",false);
|
3
|
+
}, false);
|
4
|
+
document.addEventListener('parameters:changed', function (e) {
|
5
|
+
$("button[name=save]").prop("disabled",false);
|
6
|
+
}, false);
|
7
|
+
|
8
|
+
$(document).ready(function() {
|
9
|
+
$("button[name=save]").click(function(){
|
10
|
+
var def = new $.Deferred();
|
11
|
+
def.done(function(name,testset) {
|
12
|
+
$.ajax({
|
13
|
+
url: $('body').attr('current-save') + ($('body').attr('current-save-dir') ? ($('body').attr('current-save-dir') + '/').replace(/\/+/,'/') : '') + name + '.xml',
|
14
|
+
type: 'PUT',
|
15
|
+
contentType: 'application/xml',
|
16
|
+
data: testset.serializePrettyXML(),
|
17
|
+
headers: { 'Content-ID': 'content' },
|
18
|
+
success: function() {
|
19
|
+
$("button[name=save]").prop("disabled",true);
|
20
|
+
$("#lastsavedline").removeClass('hidden');
|
21
|
+
var dt = new Date();
|
22
|
+
var time = dt.getHours() + ":" + dt.getMinutes() + ":" + dt.getSeconds();
|
23
|
+
$("#lastsaved").text(time);
|
24
|
+
},
|
25
|
+
error: function() {
|
26
|
+
alert('File was moved or deleted. Save testset to disk.');
|
27
|
+
}
|
28
|
+
});
|
29
|
+
});
|
30
|
+
get_testset(def);
|
31
|
+
});
|
32
|
+
});
|
data/cockpit/js/instance.js
CHANGED
@@ -82,7 +82,7 @@ var sub_less = 'topic' + '=' + 'activity' + '&' +// {{{
|
|
82
82
|
|
83
83
|
function cockpit() { //{{{
|
84
84
|
$("button[name=base]").click(function(){ create_instance($("input[name=base-url]").val(),null,false,false); });
|
85
|
-
$("button[name=instance]").click(function(){
|
85
|
+
$("button[name=instance]").click(function(){ uidash_activate_tab("#tabinstance"); monitor_instance($("input[name=instance-url]").val(),$("input[name=res-url]").val(),false,false); });
|
86
86
|
$("button[name=loadtestset]").click(function(e){new CustomMenu(e).menu($('#templates'),function(){ load_testset(false) } ); });
|
87
87
|
$("button[name=loadtestsetfile]").click(load_testsetfile);
|
88
88
|
$("button[name=loadmodelfile]").click(load_modelfile);
|
@@ -91,24 +91,24 @@ function cockpit() { //{{{
|
|
91
91
|
$("button[name=savesvgfile]").click(function(){ save_svgfile(); });
|
92
92
|
$("button[name=state_start]").click(function(){ $(this).parent().find('button').attr("disabled","disabled");start_instance(); });
|
93
93
|
$("button[name=state_stop]").click(function(){ $(this).parent().find('button').attr("disabled","disabled");stop_instance(); });
|
94
|
-
$("button[name=state_replay]").click(function(){ $(this).parent().find('button').attr("disabled","disabled");replay_instance(); });
|
95
94
|
$("button[name=state_abandon]").click(function(){ aba_instance(); });
|
96
95
|
$("input[name=votecontinue]").click(check_subscription);
|
97
96
|
$("input[name=testsetfile]").change(load_testsetfile_after);
|
98
97
|
$("input[name=modelfile]").change(load_modelfile_after);
|
99
98
|
|
100
99
|
$.ajax({
|
101
|
-
url: $('body').attr('current-templates')
|
102
|
-
dataType: '
|
100
|
+
url: $('body').attr('current-templates'),
|
101
|
+
dataType: 'json',
|
103
102
|
success: function(res){
|
104
|
-
$(
|
105
|
-
|
106
|
-
|
103
|
+
$(res).each(function(){
|
104
|
+
if (this.type == 'file') {
|
105
|
+
$('#templates').append($("<div class='menuitem'></div>").text(this.name.replace(/\.xml/,'')));
|
106
|
+
}
|
107
107
|
});
|
108
108
|
var q = $.parseQuerySimple();
|
109
109
|
if (q.min || q.min == "") {
|
110
|
-
|
111
|
-
|
110
|
+
uidash_toggle_vis_tab($('#instance'));
|
111
|
+
uidash_toggle_vis_tab($('#parameters'));
|
112
112
|
}
|
113
113
|
if (q.monitor && q.load) {
|
114
114
|
if (q.load.match(/https?:\/\//)) {
|
@@ -118,7 +118,7 @@ function cockpit() { //{{{
|
|
118
118
|
if ($(v).text() == q.load) { $(v).attr('data-selected','selected'); }
|
119
119
|
});
|
120
120
|
}
|
121
|
-
|
121
|
+
uidash_activate_tab("#tabexecution");
|
122
122
|
monitor_instance(q.monitor,$("body").attr('current-resources'),true,false);
|
123
123
|
} else if (q.load) {
|
124
124
|
if (q.load.match(/https?:\/\//)) {
|
@@ -128,20 +128,20 @@ function cockpit() { //{{{
|
|
128
128
|
if ($(v).text() == q.load) { $(v).attr('data-selected','selected'); }
|
129
129
|
});
|
130
130
|
}
|
131
|
-
|
131
|
+
uidash_activate_tab("#tabexecution");
|
132
132
|
create_instance($("body").attr('current-base'),q.load,true,false);
|
133
133
|
} else if (q.instantiate) {
|
134
134
|
if (q.instantiate.match(/https?:\/\//)) {
|
135
|
-
|
135
|
+
uidash_activate_tab("#tabexecution");
|
136
136
|
create_instance_from($("body").attr('current-base'),q.instantiate,false);
|
137
137
|
} else {
|
138
138
|
alert('Nope. Url!');
|
139
139
|
}
|
140
140
|
} else if (q.new || q.new == "") {
|
141
|
-
|
141
|
+
uidash_activate_tab("#tabinstance");
|
142
142
|
create_instance($("body").attr('current-base'),"Plain Instance",false,false);
|
143
143
|
} else if (q.monitor) {
|
144
|
-
|
144
|
+
uidash_activate_tab("#tabinstance");
|
145
145
|
monitor_instance(q.monitor,$("body").attr('current-resources'),false,false);
|
146
146
|
} else if (q.exec) {
|
147
147
|
if (q.exec.match(/https?:\/\//)) {
|
@@ -151,13 +151,13 @@ function cockpit() { //{{{
|
|
151
151
|
if ($(v).text() == q.exec) { $(v).attr('data-selected','selected'); }
|
152
152
|
});
|
153
153
|
}
|
154
|
-
|
154
|
+
uidash_activate_tab("#tabexecution");
|
155
155
|
create_instance($("body").attr('current-base'),q.exec,true,true);
|
156
156
|
}
|
157
157
|
}
|
158
158
|
});
|
159
159
|
$.ajax({
|
160
|
-
url:
|
160
|
+
url: "transformations.xml",
|
161
161
|
dataType: 'xml',
|
162
162
|
success: function(res){
|
163
163
|
$('transformation',res).each(function(){
|
@@ -324,7 +324,7 @@ function monitor_instance(cin,rep,load,exec) {// {{{
|
|
324
324
|
$("input[name=instance-url]").val($("body").attr('current-instance'));
|
325
325
|
$("input[name=res-url]").val($("body").attr('current-resources'));
|
326
326
|
|
327
|
-
$('
|
327
|
+
$('#parameters ui-content ui-area > button').attr('disabled','disabled');
|
328
328
|
$('#dat_details').empty();
|
329
329
|
|
330
330
|
url = $("body").attr('current-instance');
|
@@ -380,7 +380,7 @@ function monitor_instance(cin,rep,load,exec) {// {{{
|
|
380
380
|
},
|
381
381
|
error: function(a,b,c) {
|
382
382
|
alert("This ain't no CPEE instance");
|
383
|
-
|
383
|
+
uidash_activate_tab("#tabnew");
|
384
384
|
}
|
385
385
|
});
|
386
386
|
}// }}}
|
@@ -629,8 +629,6 @@ function monitor_instance_state() {// {{{
|
|
629
629
|
}// }}}
|
630
630
|
function monitor_instance_transformation() {// {{{
|
631
631
|
var url = $('body').attr('current-instance');
|
632
|
-
console.log('hallo');
|
633
|
-
console.log(url);
|
634
632
|
$.ajax({
|
635
633
|
type: "GET",
|
636
634
|
url: url + "/properties/attributes/modeltype/",
|
@@ -659,17 +657,21 @@ function monitor_instance_pos() {// {{{
|
|
659
657
|
function monitor_instance_running(content,event) {// {{{
|
660
658
|
if (save['state'] == "stopping") return;
|
661
659
|
if (event == "calling") {
|
662
|
-
save['activity_states'][content
|
663
|
-
|
664
|
-
}
|
665
|
-
if (event == "manipulating") {
|
666
|
-
if (!save['activity_states'][content.activity_uuid]) {
|
660
|
+
if (!save['activity_states'][content['activity-uuid']]) {
|
661
|
+
save['activity_states'][content['activity-uuid']] = true
|
667
662
|
format_visual_add(content.activity,"active")
|
668
663
|
}
|
669
|
-
}
|
670
|
-
|
671
|
-
|
672
|
-
|
664
|
+
} else if (event == "manipulating") {
|
665
|
+
if (!save['activity_states'][content['activity-uuid']]) {
|
666
|
+
save['activity_states'][content['activity-uuid']] = true
|
667
|
+
format_visual_add(content.activity,"active")
|
668
|
+
}
|
669
|
+
} else if (event == "done") {
|
670
|
+
if (save['activity_states'][content['activity-uuid']]) {
|
671
|
+
save['activity_states'][content['activity-uuid']] = true
|
672
|
+
format_visual_remove(content.activity,"active")
|
673
|
+
setTimeout(() => {delete save['activity_states'][content['activity-uuid']]},5000);
|
674
|
+
}
|
673
675
|
}
|
674
676
|
} // }}}
|
675
677
|
function monitor_instance_state_change(notification) { //{{{
|
@@ -701,19 +703,16 @@ function monitor_instance_state_change(notification) { //{{{
|
|
701
703
|
$('#state_extended').show();
|
702
704
|
$("button[name=state_start]").show();
|
703
705
|
$("button[name=state_stop]").hide();
|
704
|
-
$("button[name=state_replay]").show();
|
705
706
|
$("button[name=state_abandon]").show();
|
706
707
|
} else if (notification == "running") {
|
707
708
|
$('#state_extended').hide();
|
708
709
|
$("button[name=state_start]").hide();
|
709
710
|
$("button[name=state_stop]").show();
|
710
|
-
$("button[name=state_replay]").hide();
|
711
711
|
$("button[name=state_abandon]").hide();
|
712
712
|
} else {
|
713
713
|
$('#state_extended').hide();
|
714
714
|
$("button[name=state_start]").hide();
|
715
715
|
$("button[name=state_stop]").hide();
|
716
|
-
$("button[name=state_replay]").hide();
|
717
716
|
$("button[name=state_abandon]").hide();
|
718
717
|
}
|
719
718
|
|
@@ -722,13 +721,16 @@ function monitor_instance_state_change(notification) { //{{{
|
|
722
721
|
// remove all markings with state change
|
723
722
|
if (save['graph_adaptor'] && save['graph_adaptor'].illustrator) {
|
724
723
|
save['graph_adaptor'].illustrator.get_elements().removeClass('marked');
|
724
|
+
localStorage.removeItem('marked');
|
725
|
+
localStorage.removeItem('marked_from');
|
725
726
|
}
|
726
727
|
|
727
728
|
if (notification != "ready" && notification != "stopped" && notification != "running") {
|
728
|
-
|
729
|
+
console.log('rrr');
|
730
|
+
$('#parameters ui-content ui-area > button').attr('disabled','disabled');
|
729
731
|
$('#state_any').hide();
|
730
732
|
} else {
|
731
|
-
$('#parameters
|
733
|
+
$('#parameters ui-content ui-area > button').removeAttr('disabled');
|
732
734
|
$('#state_any').show();
|
733
735
|
}
|
734
736
|
|
@@ -781,15 +783,6 @@ function start_instance() {// {{{
|
|
781
783
|
error: report_failure
|
782
784
|
});
|
783
785
|
}// }}}
|
784
|
-
function replay_instance() {// {{{
|
785
|
-
var url = $('body').attr('current-instance');
|
786
|
-
$.ajax({
|
787
|
-
type: "PUT",
|
788
|
-
url: url + "/properties/state/",
|
789
|
-
data: ({value: "replaying"}),
|
790
|
-
error: report_failure
|
791
|
-
});
|
792
|
-
}// }}}
|
793
786
|
function aba_instance() {// {{{
|
794
787
|
monitor_instance_state_change('abandoned');
|
795
788
|
var url = $('body').attr('current-instance');
|
@@ -1017,7 +1010,11 @@ function load_testset(exec) {// {{{
|
|
1017
1010
|
var name = $("#templates div.menuitem[data-selected=selected]").text();
|
1018
1011
|
var url;
|
1019
1012
|
if (name) {
|
1020
|
-
|
1013
|
+
if ($('body').attr('current-templates').match(/\?/)) {
|
1014
|
+
url = $('body').attr('current-templates').replace(/\?/,name + '.xml?');
|
1015
|
+
} else {
|
1016
|
+
url = $('body').attr('current-templates') + name + ".xml";
|
1017
|
+
}
|
1021
1018
|
} else {
|
1022
1019
|
if ($('body').attr('load-testset').length > 0) {
|
1023
1020
|
url = $('body').attr('load-testset');
|
@@ -1030,7 +1027,6 @@ function load_testset(exec) {// {{{
|
|
1030
1027
|
url: url,
|
1031
1028
|
success: function(res){
|
1032
1029
|
save['dsl'] = null; // reload dsl and position under all circumstances
|
1033
|
-
$('#main .tabbehind button').hide();
|
1034
1030
|
$('#dat_details').empty();
|
1035
1031
|
|
1036
1032
|
document.title = "Untitled";
|
@@ -1051,7 +1047,7 @@ function load_modeltype() {// {{{
|
|
1051
1047
|
$.ajax({
|
1052
1048
|
cache: false,
|
1053
1049
|
dataType: 'xml',
|
1054
|
-
url:
|
1050
|
+
url: name + ".xml",
|
1055
1051
|
success: function(res){
|
1056
1052
|
$.ajax({
|
1057
1053
|
type: "PUT",
|
@@ -1214,8 +1210,10 @@ function format_visual_vote_clear() {//{{{
|
|
1214
1210
|
|
1215
1211
|
function format_instance_pos() { //{{{
|
1216
1212
|
$(save['instance_pos']).each(function(){
|
1217
|
-
|
1218
|
-
|
1213
|
+
console.log(this);
|
1214
|
+
var taskname = this.nodeName;
|
1215
|
+
var taskstate = this.textContent;
|
1216
|
+
format_visual_add(taskname,save['state'] == 'running' ? (taskstate == 'at' ? 'active' : 'passive') : 'passive');
|
1219
1217
|
});
|
1220
1218
|
} //}}}
|
1221
1219
|
|
data/cockpit/js/model.js
CHANGED
@@ -1,41 +1,11 @@
|
|
1
|
-
document.addEventListener('graph:changed', function (e) {
|
2
|
-
$("button[name=save]").prop("disabled",false);
|
3
|
-
}, false);
|
4
|
-
|
5
1
|
$(document).ready(function() {
|
6
|
-
$('#
|
7
|
-
$('#model ui-
|
8
|
-
});
|
9
|
-
$('#tabdataelements').click(function(event){
|
10
|
-
$('#model ui-behind button:nth-child(1)').removeClass('hidden');
|
11
|
-
});
|
12
|
-
|
13
|
-
$('#model ui-behind button:nth-child(1)').click(function(event){
|
14
|
-
var but = $(document).find('#model ui-content ui-area:not(.inactive) button');
|
2
|
+
$('#model ui-content ui-area > button').click(function(event){
|
3
|
+
var but = $(document).find('#model ui-content ui-area:not(.inactive) > div button');
|
15
4
|
but.click();
|
16
|
-
var
|
17
|
-
|
5
|
+
var inp = $(document).find('#model ui-content ui-area:not(.inactive) > div input');
|
6
|
+
$(inp[inp.length-2]).focus();
|
7
|
+
var are = $(document).find('#model ui-content ui-area:not(.inactive) > div');
|
8
|
+
var tab = $(document).find('#model ui-content ui-area:not(.inactive) > div > div');
|
18
9
|
are.animate({ scrollTop: tab.height() }, "slow");
|
19
10
|
});
|
20
|
-
|
21
|
-
$("button[name=save]").click(function(){
|
22
|
-
var def = new $.Deferred();
|
23
|
-
def.done(function(name,testset) {
|
24
|
-
$.ajax({
|
25
|
-
url: $('body').attr('current-save') + ($('body').attr('current-save-dir') ? ($('body').attr('current-save-dir') + '/').replace(/\/+/,'/') : '') + name + '.xml',
|
26
|
-
type: 'PUT',
|
27
|
-
contentType: 'application/xml',
|
28
|
-
data: testset.serializePrettyXML(),
|
29
|
-
headers: { 'Content-ID': 'content' },
|
30
|
-
success: function() {
|
31
|
-
$("button[name=save]").prop("disabled",true);
|
32
|
-
$("#lastsavedline").removeClass('hidden');
|
33
|
-
var dt = new Date();
|
34
|
-
var time = dt.getHours() + ":" + dt.getMinutes() + ":" + dt.getSeconds();
|
35
|
-
$("#lastsaved").text(time);
|
36
|
-
}
|
37
|
-
});
|
38
|
-
});
|
39
|
-
get_testset(def);
|
40
|
-
});
|
41
11
|
});
|
data/cockpit/js/parameters.js
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
var parameters_changed = new Event("parameters:changed", {"bubbles":true, "cancelable":false});
|
2
|
+
|
1
3
|
$(document).ready(function() {
|
2
4
|
// hook up dataelements with relaxngui //{{{
|
3
5
|
$.ajax({
|
@@ -28,11 +30,13 @@ $(document).ready(function() {
|
|
28
30
|
}); //}}}
|
29
31
|
|
30
32
|
// new entry //{{{
|
31
|
-
$('#parameters ui-
|
32
|
-
var but = $(document).find('#parameters ui-content ui-area:not(.inactive) button');
|
33
|
+
$('#parameters ui-content ui-area > button').click(function(event){
|
34
|
+
var but = $(document).find('#parameters ui-content ui-area:not(.inactive) > div button');
|
33
35
|
but.click();
|
34
|
-
var
|
35
|
-
|
36
|
+
var inp = $(document).find('#parameters ui-content ui-area:not(.inactive) > div input');
|
37
|
+
$(inp[inp.length-2]).focus();
|
38
|
+
var are = $(document).find('#parameters ui-content ui-area:not(.inactive) > div');
|
39
|
+
var tab = $(document).find('#parameters ui-content ui-area:not(.inactive) > div > div');
|
36
40
|
are.animate({ scrollTop: tab.height() }, "slow");
|
37
41
|
}); //}}}
|
38
42
|
|
@@ -68,6 +72,7 @@ function do_parameters_save(event) { //{{{
|
|
68
72
|
var url = $('body').attr('current-instance');
|
69
73
|
save[visid].set_checkpoint();
|
70
74
|
var send = save[visid].save_text();
|
75
|
+
document.dispatchEvent(parameters_changed);
|
71
76
|
$.ajax({
|
72
77
|
type: "PUT",
|
73
78
|
url: url + "/properties/" + visid + "/",
|
@@ -0,0 +1,40 @@
|
|
1
|
+
$(document).ready(function() {
|
2
|
+
$("#replay button").click(e => {
|
3
|
+
$.ajax({
|
4
|
+
url: $('#replay input').val(),
|
5
|
+
type: 'GET',
|
6
|
+
success: function(re) {
|
7
|
+
var de;
|
8
|
+
var ep;
|
9
|
+
var at;
|
10
|
+
var desc;
|
11
|
+
try {
|
12
|
+
jsyaml.loadAll(re,e => {
|
13
|
+
if (e.event && e.event['cpee:lifecycle:transition'] == 'dataelements/change') {
|
14
|
+
de = e.event.data.data_values;
|
15
|
+
}
|
16
|
+
if (e.event && e.event['cpee:lifecycle:transition'] == 'endpoints/change') {
|
17
|
+
ep = e.event.data.data_values;
|
18
|
+
}
|
19
|
+
if (e.event && e.event['cpee:lifecycle:transition'] == 'attributes/change') {
|
20
|
+
at = e.event.data.data_values;
|
21
|
+
}
|
22
|
+
if (e.event && e.event['cpee:description']) {
|
23
|
+
desc = e.event['cpee:description'];
|
24
|
+
}
|
25
|
+
if (e.event && e.event['cpee:state'] == 'running') {
|
26
|
+
throw BreakException;
|
27
|
+
}
|
28
|
+
});
|
29
|
+
} catch(e) { /* just to break out of the iterator. what a shitty language */ }
|
30
|
+
}
|
31
|
+
});
|
32
|
+
|
33
|
+
|
34
|
+
// load log with ajax
|
35
|
+
// extract process model
|
36
|
+
// initialize process model
|
37
|
+
// set attributes
|
38
|
+
// change start button to do replay
|
39
|
+
});
|
40
|
+
});
|