Commit 70109873 authored by Nicolas Wavrant's avatar Nicolas Wavrant

runner: new state for slapgrid : notupdated

This means building failed, but a previous instance is still running
parent 099d7e2d
...@@ -535,7 +535,7 @@ padding: 10px;height: 80px;padding-bottom:15px;} ...@@ -535,7 +535,7 @@ padding: 10px;height: 80px;padding-bottom:15px;}
display: block; display: block;
float: left; float: left;
} }
.log_info_box div.state_running span{ .log_info_box div.state_running span, .log_info_box div.state_notupdated span{
background: #FFC800; background: #FFC800;
} }
.log_info_box div.state_terminated span{ .log_info_box div.state_terminated span{
......
...@@ -130,7 +130,11 @@ function getRunningState() { ...@@ -130,7 +130,11 @@ function getRunningState() {
updateStatus(currentProcess, "running"); updateStatus(currentProcess, "running");
} else { } else {
build_success = (data.software.success === 0)? "terminated":"failed"; build_success = (data.software.success === 0)? "terminated":"failed";
run_success = (data.instance.success === 0)? "terminated":"failed"; if ( last_run < data.software.last_build && data.software.success === 1 ) {
run_success = "notupdated";
} else {
run_success = (data.instance.success === 0)? "terminated":"failed";
}
updateStatus("software", build_success); updateStatus("software", build_success);
updateStatus("instance", run_success); updateStatus("instance", run_success);
} }
...@@ -210,17 +214,13 @@ function updateStatus(elt, val) { ...@@ -210,17 +214,13 @@ function updateStatus(elt, val) {
case "running": case "running":
$(src).children('p').text("Processing"); $(src).children('p').text("Processing");
break; break;
case "notupdated":
$(src).children('p').text("Not updated");
break;
case "failed": case "failed":
$(src).children('p').text("Failed"); $(src).children('p').text("Failed");
break; break;
} }
// in case of failure
if ($("#salpgridLog").text().indexOf("Failed to run buildout profile") !== -1) {
var src = '#' + elt + '_run_state', value = 'state_' + "stopped";
$(src).removeClass();
$(src).addClass(value);
$(src).children('p').text("Buildout Failed");
}
} }
function setRunningState(data) { function setRunningState(data) {
......
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