cpee 2.0.21 → 2.0.26
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 +4 -4
- data/cockpit/CPEE.xml +8 -0
- data/cockpit/Signavio.xml +8 -0
- data/cockpit/css/model.css +2 -0
- data/cockpit/css/replay.css +55 -0
- data/cockpit/css/ui.css +29 -5
- data/cockpit/edit.html +263 -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 +52 -52
- 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/transformations.xml +4 -0
- data/cpee.gemspec +2 -2
- 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 +17 -5
- data/server/resources/notifications/logging/subscription.xml +6 -0
- 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 +63 -50
- data/cockpit/edit.html +0 -1
- 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("#tabexecution");
|
|
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
|
}// }}}
|
|
@@ -631,7 +631,7 @@ function monitor_instance_transformation() {// {{{
|
|
|
631
631
|
var url = $('body').attr('current-instance');
|
|
632
632
|
$.ajax({
|
|
633
633
|
type: "GET",
|
|
634
|
-
url: url + "/properties/attributes/modeltype",
|
|
634
|
+
url: url + "/properties/attributes/modeltype/",
|
|
635
635
|
success: function(res){
|
|
636
636
|
$("#currentmodel").text(res);
|
|
637
637
|
},
|
|
@@ -657,17 +657,21 @@ function monitor_instance_pos() {// {{{
|
|
|
657
657
|
function monitor_instance_running(content,event) {// {{{
|
|
658
658
|
if (save['state'] == "stopping") return;
|
|
659
659
|
if (event == "calling") {
|
|
660
|
-
save['activity_states'][content
|
|
661
|
-
|
|
662
|
-
}
|
|
663
|
-
if (event == "manipulating") {
|
|
664
|
-
if (!save['activity_states'][content.activity_uuid]) {
|
|
660
|
+
if (!save['activity_states'][content['activity-uuid']]) {
|
|
661
|
+
save['activity_states'][content['activity-uuid']] = true
|
|
665
662
|
format_visual_add(content.activity,"active")
|
|
666
663
|
}
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
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
|
+
}
|
|
671
675
|
}
|
|
672
676
|
} // }}}
|
|
673
677
|
function monitor_instance_state_change(notification) { //{{{
|
|
@@ -699,19 +703,16 @@ function monitor_instance_state_change(notification) { //{{{
|
|
|
699
703
|
$('#state_extended').show();
|
|
700
704
|
$("button[name=state_start]").show();
|
|
701
705
|
$("button[name=state_stop]").hide();
|
|
702
|
-
$("button[name=state_replay]").show();
|
|
703
706
|
$("button[name=state_abandon]").show();
|
|
704
707
|
} else if (notification == "running") {
|
|
705
708
|
$('#state_extended').hide();
|
|
706
709
|
$("button[name=state_start]").hide();
|
|
707
710
|
$("button[name=state_stop]").show();
|
|
708
|
-
$("button[name=state_replay]").hide();
|
|
709
711
|
$("button[name=state_abandon]").hide();
|
|
710
712
|
} else {
|
|
711
713
|
$('#state_extended').hide();
|
|
712
714
|
$("button[name=state_start]").hide();
|
|
713
715
|
$("button[name=state_stop]").hide();
|
|
714
|
-
$("button[name=state_replay]").hide();
|
|
715
716
|
$("button[name=state_abandon]").hide();
|
|
716
717
|
}
|
|
717
718
|
|
|
@@ -720,13 +721,16 @@ function monitor_instance_state_change(notification) { //{{{
|
|
|
720
721
|
// remove all markings with state change
|
|
721
722
|
if (save['graph_adaptor'] && save['graph_adaptor'].illustrator) {
|
|
722
723
|
save['graph_adaptor'].illustrator.get_elements().removeClass('marked');
|
|
724
|
+
localStorage.removeItem('marked');
|
|
725
|
+
localStorage.removeItem('marked_from');
|
|
723
726
|
}
|
|
724
727
|
|
|
725
728
|
if (notification != "ready" && notification != "stopped" && notification != "running") {
|
|
726
|
-
|
|
729
|
+
console.log('rrr');
|
|
730
|
+
$('#parameters ui-content ui-area > button').attr('disabled','disabled');
|
|
727
731
|
$('#state_any').hide();
|
|
728
732
|
} else {
|
|
729
|
-
$('#parameters
|
|
733
|
+
$('#parameters ui-content ui-area > button').removeAttr('disabled');
|
|
730
734
|
$('#state_any').show();
|
|
731
735
|
}
|
|
732
736
|
|
|
@@ -774,26 +778,17 @@ function start_instance() {// {{{
|
|
|
774
778
|
var url = $('body').attr('current-instance');
|
|
775
779
|
$.ajax({
|
|
776
780
|
type: "PUT",
|
|
777
|
-
url: url + "/properties/state",
|
|
781
|
+
url: url + "/properties/state/",
|
|
778
782
|
data: ({value: "running"}),
|
|
779
783
|
error: report_failure
|
|
780
784
|
});
|
|
781
785
|
}// }}}
|
|
782
|
-
function replay_instance() {// {{{
|
|
783
|
-
var url = $('body').attr('current-instance');
|
|
784
|
-
$.ajax({
|
|
785
|
-
type: "PUT",
|
|
786
|
-
url: url + "/properties/state",
|
|
787
|
-
data: ({value: "replaying"}),
|
|
788
|
-
error: report_failure
|
|
789
|
-
});
|
|
790
|
-
}// }}}
|
|
791
786
|
function aba_instance() {// {{{
|
|
792
787
|
monitor_instance_state_change('abandoned');
|
|
793
788
|
var url = $('body').attr('current-instance');
|
|
794
789
|
$.ajax({
|
|
795
790
|
type: "PUT",
|
|
796
|
-
url: url + "/properties/state",
|
|
791
|
+
url: url + "/properties/state/",
|
|
797
792
|
data: ({value: "abandoned"}),
|
|
798
793
|
error: report_failure
|
|
799
794
|
});
|
|
@@ -802,7 +797,7 @@ function stop_instance() {// {{{
|
|
|
802
797
|
var url = $('body').attr('current-instance');
|
|
803
798
|
$.ajax({
|
|
804
799
|
type: "PUT",
|
|
805
|
-
url: url + "/properties/state",
|
|
800
|
+
url: url + "/properties/state/",
|
|
806
801
|
data: ({value: "stopping"}),
|
|
807
802
|
error: report_failure
|
|
808
803
|
});
|
|
@@ -951,7 +946,7 @@ async function set_testset(testset,exec) {// {{{
|
|
|
951
946
|
success: function(res){
|
|
952
947
|
$.ajax({
|
|
953
948
|
type: "PUT",
|
|
954
|
-
url: url + "/properties/state",
|
|
949
|
+
url: url + "/properties/state/",
|
|
955
950
|
data: ({value: res}),
|
|
956
951
|
error: report_failure,
|
|
957
952
|
success: function(res){
|
|
@@ -1015,7 +1010,11 @@ function load_testset(exec) {// {{{
|
|
|
1015
1010
|
var name = $("#templates div.menuitem[data-selected=selected]").text();
|
|
1016
1011
|
var url;
|
|
1017
1012
|
if (name) {
|
|
1018
|
-
|
|
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
|
+
}
|
|
1019
1018
|
} else {
|
|
1020
1019
|
if ($('body').attr('load-testset').length > 0) {
|
|
1021
1020
|
url = $('body').attr('load-testset');
|
|
@@ -1028,7 +1027,6 @@ function load_testset(exec) {// {{{
|
|
|
1028
1027
|
url: url,
|
|
1029
1028
|
success: function(res){
|
|
1030
1029
|
save['dsl'] = null; // reload dsl and position under all circumstances
|
|
1031
|
-
$('#main .tabbehind button').hide();
|
|
1032
1030
|
$('#dat_details').empty();
|
|
1033
1031
|
|
|
1034
1032
|
document.title = "Untitled";
|
|
@@ -1049,11 +1047,11 @@ function load_modeltype() {// {{{
|
|
|
1049
1047
|
$.ajax({
|
|
1050
1048
|
cache: false,
|
|
1051
1049
|
dataType: 'xml',
|
|
1052
|
-
url:
|
|
1050
|
+
url: name + ".xml",
|
|
1053
1051
|
success: function(res){
|
|
1054
1052
|
$.ajax({
|
|
1055
1053
|
type: "PUT",
|
|
1056
|
-
url: url + "/properties/attributes/modeltype",
|
|
1054
|
+
url: url + "/properties/attributes/modeltype/",
|
|
1057
1055
|
data: ({value: name}),
|
|
1058
1056
|
success: function(){
|
|
1059
1057
|
set_testset(res,false);
|
|
@@ -1212,8 +1210,10 @@ function format_visual_vote_clear() {//{{{
|
|
|
1212
1210
|
|
|
1213
1211
|
function format_instance_pos() { //{{{
|
|
1214
1212
|
$(save['instance_pos']).each(function(){
|
|
1215
|
-
|
|
1216
|
-
|
|
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');
|
|
1217
1217
|
});
|
|
1218
1218
|
} //}}}
|
|
1219
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 + "/",
|