cockpit/js/instance.js in cpee-1.3.224 vs cockpit/js/instance.js in cpee-1.3.225

- old
+ new

@@ -57,15 +57,10 @@ 'events' + '=' + 'error,change' + '&' + 'topic' + '=' + 'handlers' + '&' + 'events' + '=' + 'change';// }}} function cockpit() { - if (location.protocol.match(/^file/)) { - $("input[name=base-url]").val("http://localhost:" + $('body').data('defaultport')); - } else { - $("input[name=base-url]").val(location.protocol + "//" + location.hostname + ":" + $('body').data('defaultport')); - } $("button[name=base]").click(function(){ create_instance(null,false); }); $("button[name=instance]").click(function(){ ui_activate_tab("#tabinstance"); monitor_instance(false,false); }); $("button[name=loadtestset]").click(function(e){new CustomMenu(e).menu($('#predefinedtestsets'),function(){ load_testset(false) } ); }); $("button[name=loadtestsetfile]").click(load_testsetfile); $("button[name=loadmodelfile]").click(load_modelfile); @@ -100,9 +95,12 @@ $("#predefinedtestsets div.menuitem").each(function(k,v){ if ($(v).text() == q.load) { $(v).attr('data-selected','selected'); } }); ui_activate_tab("#tabexecution"); create_instance(q.load,false); + } else if (q.new || q.new == "" || q.load == "") { + ui_activate_tab("#tabinstance"); + create_instance("Plain Instance",false); } else if (q.monitor) { $("input[name=instance-url]").val(q.monitor); ui_activate_tab("#tabexecution"); monitor_instance(false,false); } else if (q.exec) {