🚸 Highlight warnings in terminal

This commit is contained in:
Gina Häußge committed 2020-10-15 13:55:11 +02:00
1 parent 9494db9568
commit 4dea9f08ef
2 files changed
+20 -5

No files matched your search

@@ -288,11 +288,26 @@ $(function () {
self.updateOutput();
};
self._toInternalFormat = function (line, type) {
if (type == undefined) {
type = "line";
self._toInternalFormat = function (line, display, type) {
if (display === undefined) {
display = "line";
}
return {line: escapeUnprintableCharacters(line), type: type};
if (type === undefined) {
if (line.startsWith("Recv:")) {
type = "recv";
} else if (line.startsWith("Send:")) {
type = "send";
} else if (line.startsWith("Warn:")) {
type = "warn";
}
}
return {
line: escapeUnprintableCharacters(line),
display: display,
type: type
};
};
self._processStateData = function (data) {
+1 -1
View File
@@ -1,5 +1,5 @@
<div class="terminal">
<pre id="terminal-output" class="pre-scrollable pre-output" data-bind="foreach: displayedLines, visible: fancyFunctionality(), click: function(){ gotoTerminalCommand(); }, event: { scroll: terminalScrollEvent }"><span data-bind="text: line + '\n', css: {muted: type == 'filtered' || type == 'cut'}"></span></pre>
<pre id="terminal-output" class="pre-scrollable pre-output" data-bind="foreach: displayedLines, visible: fancyFunctionality(), click: function(){ gotoTerminalCommand(); }, event: { scroll: terminalScrollEvent }"><span data-bind="text: line + '\n', css: {muted: display == 'filtered' || display == 'cut', 'text-error': type == 'warn'}"></span></pre>
<pre id="terminal-output-lowfi" style="display: none" class="pre-scrollable" data-bind="text: plainLogOutput, visible: !fancyFunctionality()"></pre>
<div id="terminal-sendpanel" style="display: none;" data-bind="visible: loginState.hasPermissionKo(access.permissions.CONTROL)">
<div class="input-block-level input-append">