Merge pull request #6907 from huffman/fix-console-log

Fix auto scroll and font in console log window
This commit is contained in:
Stephen Birarda 2016-01-22 12:04:56 -08:00
commit 61430235a0
2 changed files with 10 additions and 7 deletions

View file

@ -52,6 +52,7 @@ ul.tabs li.current {
display: none;
background-color: #ededed;
width: 100%;
height: 100%;
overflow: auto;
margin: 0;
padding: 0;
@ -63,7 +64,7 @@ ul.tabs li.current {
}
.tab-content {
overflow: auto;
overflow: hidden;
padding: 10px;
background-color: #ededed;
}
@ -84,4 +85,9 @@ ul.tabs li.current {
display: none;
float: right;
margin: 10px;
}
}
.log-line {
font-family: "Consolas", monospace;
font-size: 9.5pt;
}

View file

@ -154,9 +154,7 @@ ready = function() {
}
function appendLogMessage(pid, msg, name) {
console.log(pid, msg, name);
var id = "pid-" + pid;
id = name == "ds" ? "domain-server" : "assignment-client";
var id = name == "ds" ? "domain-server" : "assignment-client";
var $pidLog = $('#' + id);
var size = ++tabStates[id].size;
@ -167,8 +165,7 @@ ready = function() {
var wasAtBottom = false;
if (currentTab == id) {
var padding = 15;
wasAtBottom = $pidLog[0].scrollTop >= ($pidLog[0].scrollHeight - $pidLog.height() - (2 * padding));
wasAtBottom = $pidLog[0].scrollTop >= ($pidLog[0].scrollHeight - $pidLog.height());
}
var $logLine = $('<div class="log-line">').text(msg);