Commit 82d02800 authored by Nicolas Wavrant's avatar Nicolas Wavrant

slaprunner: interface correctly renders the build&run capability

parent 9c660c07
...@@ -89,12 +89,6 @@ function getRunningState() { ...@@ -89,12 +89,6 @@ function getRunningState() {
} }
}).error(function () { }).error(function () {
clearAll(false); clearAll(false);
}).complete(function () {
if (running) {
setTimeout(function () {
getRunningState();
}, speed);
}
}); });
} }
...@@ -197,6 +191,13 @@ function setRunningState(data) { ...@@ -197,6 +191,13 @@ function setRunningState(data) {
$("#softrun").addClass('slapos_stop'); $("#softrun").addClass('slapos_stop');
$("#running img").before('<p id="running_info" class="instance">Running instance...</p>'); $("#running img").before('<p id="running_info" class="instance">Running instance...</p>');
} }
if (processType === "Software") {
running = false;
$("#running_info").remove();
$("#softrun").addClass('slapos_run');
$("#softrun").removeClass('slapos_stop');
$("#instrun").click();
}
processType = "Instance"; processType = "Instance";
} }
} }
...@@ -238,11 +239,14 @@ function runProcess(urlfor, data) { ...@@ -238,11 +239,14 @@ function runProcess(urlfor, data) {
if ( $("#running_info").children('span').length > 0 ) { if ( $("#running_info").children('span').length > 0 ) {
$("#running_info").children('p').remove(); $("#running_info").children('p').remove();
} }
setRunningState(data);
setTimeout(getRunningState, 6000);
} }
} }
setInterval('GetStateRegularly()', 800);
function GetStateRegularly() {
getRunningState();
}
function checkSavedCmd() { function checkSavedCmd() {
"use strict"; "use strict";
var result = getCookie("slapgridCMD"); var result = getCookie("slapgridCMD");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment