cockpit/js/instance.js in cpee-1.3.163 vs cockpit/js/instance.js in cpee-1.3.164
- old
+ new
@@ -22,10 +22,12 @@
'events' + '=' + 'change' + '&' +
'topic' + '=' + 'properties/dataelements' + '&' +
'events' + '=' + 'change' + '&' +
'topic' + '=' + 'properties/endpoints' + '&' +
'events' + '=' + 'change' + '&' +
+ 'topic' + '=' + 'properties/handlerwrapper' + '&' +
+ 'events' + '=' + 'result' + '&' +
'topic' + '=' + 'properties/handlers' + '&' +
'events' + '=' + 'change';// }}}
var sub_less = 'topic' + '=' + 'running' + '&' +// {{{
'events' + '=' + 'activity_calling,activity_manipulating,activity_failed,activity_done' + '&' +
'topic' + '=' + 'properties/position' + '&' +
@@ -36,10 +38,12 @@
'events' + '=' + 'change' + '&' +
'topic' + '=' + 'properties/dataelements' + '&' +
'events' + '=' + 'change' + '&' +
'topic' + '=' + 'properties/endpoints' + '&' +
'events' + '=' + 'change' + '&' +
+ 'topic' + '=' + 'properties/handlerwrapper' + '&' +
+ 'events' + '=' + 'result' + '&' +
'topic' + '=' + 'properties/handlers' + '&' +
'events' + '=' + 'change';// }}}
$(document).ready(function() {// {{{
$("input[name=base-url]").val(location.protocol + "//" + location.host + ":" + $('body').data('defaultport'));
@@ -314,10 +318,11 @@
graphrealization.notify = function(svgid) {
save_description();
manifestation.events.click(svgid,undefined);
};
$('#graphcanvas').redraw();
+ $('#graphcolumn div').redraw();
monitor_instance_pos();
}
});
}
@@ -580,24 +585,26 @@
load_testset_dataelements(url,testset);
load_testset_endpoints(url,testset);
load_testset_pos(url,testset);
- var ser = '';
- $("testset > transformation > *",testset).each(function(){
- ser += $(this).serializeXML() + "\n";
- });
- var val = "<content>" + ser + "</content>";
- $.ajax({
- type: "PUT",
- url: url + "/properties/values/transformation",
- data: ({content: val}),
- success: function() {
- load_testset_des(url,testset);
- },
- error: report_failure
- });
+ if ($("testset > transformation",testset).length > 0) {
+ var ser = '';
+ $("testset > transformation > *",testset).each(function(){
+ ser += $(this).serializeXML() + "\n";
+ });
+ var val = "<content>" + ser + "</content>";
+ $.ajax({
+ type: "PUT",
+ url: url + "/properties/values/transformation",
+ data: ({content: val}),
+ success: function() {
+ load_testset_des(url,testset);
+ },
+ error: report_failure
+ });
+ }
load_testset_hw(url,testset);
$.ajax({
type: "GET",
url: url + "/properties/values/state/",
@@ -677,10 +684,11 @@
error: report_failure
});
} //}}}
function load_testset_des(url,testset) {// {{{
+ if ($("testset > description",testset).length == 0) { return; }
var ser = '';
$("testset > description > *",testset).each(function(){
ser += $(this).serializeXML() + "\n";
});
load_des(url,ser);
@@ -695,10 +703,11 @@
error: report_failure
});
});
} // }}}
function load_testset_dataelements(url,testset) {// {{{
+ if ($("testset > dataelements",testset).length == 0) { return; }
var ser = '';
$("testset > dataelements > *",testset).each(function(){
ser += $(this).serializeXML() + "\n";
});
var val = "<content>" + ser + "</content>";
@@ -708,10 +717,11 @@
data: ({content: val}),
error: report_failure
});
}// }}}
function load_testset_endpoints(url,testset) {// {{{
+ if ($("testset > endpoints",testset).length == 0) { return; }
var ser = '';
$("testset > endpoints > *",testset).each(function(){
ser += $(this).serializeXML() + "\n";
});
var val = "<content>" + ser + "</content>";
@@ -721,18 +731,20 @@
data: ({content: val}),
error: report_failure
});
}// }}}
function load_testset_pos(url,testset) {// {{{
+ if ($("testset > positions",testset).length == 0) { return; }
var ser = '';
$("testset > positions > *",testset).each(function(){
ser += $(this).serializeXML() + "\n";
});
var val = "<content>" + ser + "</content>";
$.ajax({
type: "PUT",
url: url + "/properties/values/positions/",
data: ({content: val}),
+ success: monitor_instance_pos,
error: report_failure
});
}// }}}
function load_testset_handlers(url,testset,vals) {// {{{
$("testset > handlers > *",testset).each(function(){