Commit a6ca555e authored by Nicolas Wavrant's avatar Nicolas Wavrant

runner: fix bug in displaying logs when slapgrid is not running

in page /viewLog
parent 1650be7b
/*jslint undef: true */
/*global $, window, $SCRIPT_ROOT, setRunningState, setCookie, getCookie, deleteCookie */
/*global currentState: true, running: true, $current: true, currentProcess: true, processTypes: true */
/*global currentState: true, running: false, $current: true, currentProcess: true, processTypes: true */
/*global sendStop: true, openedlogpage: true, logReadingPosition: true, speed: true */
/*global isRunning: true */
/* vim: set et sts=4: */
......@@ -9,7 +9,7 @@
var url = $SCRIPT_ROOT + "/slapgridResult";
var currentState = false;
var running = true;
var running = false;
var currentProcess = "";
var processTypes = {instance:"instance", software:"software"};
var sendStop = false;
......@@ -55,7 +55,7 @@ function writeLogs(data) {
size = data.content.position - logReadingPosition;
if (size < 0) {
clearAll();
clearAll(false);
}
if (logReadingPosition !== 0 && data.content.truncated) {
log_info = "<p class='info' rel='0'>SLAPRUNNER INFO: SLAPGRID-LOG HAS BEEN TRUNCATED HERE. To see full log reload your log page</p>";
......
/*jslint undef: true */
/*global $, document, window, processState, getCookie, setCookie, setSpeed, $SCRIPT_ROOT */
/*global openedlogpage: true */
/*global $, document, window, getCookie, setCookie, setSpeed, $SCRIPT_ROOT */
/*global openedlogpage: true, running: false */
/* vim: set et sts=4: */
$(document).ready(function () {
......@@ -53,7 +53,7 @@ $(document).ready(function () {
}
function updatelogBox() {
if (processState === "Stopped" || processState === "Checking" || $("#manual").is(":checked")) {
if (! running || $("#manual").is(":checked")) {
$("#salpgridLog").hide();
$("#manualLog").show();
$("#slapstate").hide();
......@@ -113,7 +113,7 @@ $(document).ready(function () {
})
.always(function() {
sending = false;
if (processState === "Stopped" || processState === "Checking" || $("#manual").is(":checked")) {
if (! running || $("#manual").is(":checked")) {
$("#logheader").html(info);
} else {
$("#logheader").html("Inspecting slapgrid log - Click for more options");
......
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