Commit cd195d3b authored by Nicolas Wavrant's avatar Nicolas Wavrant

runner: /viewLog displays "Queue" for Run only if the run_instance option of...

runner: /viewLog displays "Queue" for Run only if the run_instance option of slapgrid is set to true
parent 59c9c360
...@@ -18,6 +18,14 @@ var logReadingPosition = 0; ...@@ -18,6 +18,14 @@ var logReadingPosition = 0;
var speed = 5000; var speed = 5000;
var maxLogSize = 100000; //Define the max limit of log to display ~ 2500 lines var maxLogSize = 100000; //Define the max limit of log to display ~ 2500 lines
var currentLogSize = 0; //Define the size of log actually displayed var currentLogSize = 0; //Define the size of log actually displayed
var runInstance = false;
$(document).ready(function () {
$.get("/getSlapgridParameters",null,function(data) {
runInstance = data.run_instance;
});
});
var isRunning = function () { var isRunning = function () {
"use strict"; "use strict";
if (running) { if (running) {
...@@ -101,14 +109,17 @@ function getRunningState() { ...@@ -101,14 +109,17 @@ function getRunningState() {
$("#last_build_software").text("last build: " + data.software.last_build); $("#last_build_software").text("last build: " + data.software.last_build);
$("#last_build_instance").text("last run: " + data.instance.last_build); $("#last_build_instance").text("last run: " + data.instance.last_build);
//show accurate right panel //show accurate right panel
writeLogs(data);
setRunningState(data);
if (running) { if (running) {
$("#slapstate").show(); $("#slapstate").show();
$("#openloglist").hide(); $("#openloglist").hide();
} }
writeLogs(data);
setRunningState(data);
if(data.result) { if(data.result) {
updateStatus(currentProcess, "running"); updateStatus(currentProcess, "running");
if (runInstance) {
updateStatus("instance", "waiting");
}
} 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"; run_success = (data.instance.success === 0)? "terminated":"failed";
......
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