diff --git a/src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js b/src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js index 61e1ed6c..1787dc62 100644 --- a/src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js +++ b/src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js @@ -646,6 +646,7 @@ $(function() { self.loglines.removeAll(); self.loglines.push({line: line, stream: "message"}); + self._scrollWorkingOutputToEnd(); self.workingDialog.modal("show"); }; @@ -746,7 +747,7 @@ $(function() { if (messageType == "loglines" && self.working()) { _.each(data.loglines, function(line) { - self.loglines.push(line); + self.loglines.push(self._preprocessLine(line)); }); self._scrollWorkingOutputToEnd(); } else if (messageType == "result") { @@ -861,6 +862,14 @@ $(function() { self.requestData(); } }; + + self._forcedStdoutLine = /You are using pip version .*?, however version .*? is available\.|You should consider upgrading via the '.*?' command\./; + self._preprocessLine = function(line) { + if (line.stream == "stderr" && line.line.match(self._forcedStdoutLine)) { + line.stream = "stdout"; + } + return line; + } } // view model class, parameters for constructor, container to bind to diff --git a/src/octoprint/plugins/softwareupdate/static/js/softwareupdate.js b/src/octoprint/plugins/softwareupdate/static/js/softwareupdate.js index 294c65d4..c9234e0b 100644 --- a/src/octoprint/plugins/softwareupdate/static/js/softwareupdate.js +++ b/src/octoprint/plugins/softwareupdate/static/js/softwareupdate.js @@ -539,7 +539,7 @@ $(function() { case "loglines": { if (self.working()) { _.each(messageData.loglines, function(line) { - self.loglines.push(line); + self.loglines.push(self._preprocessLine(line)); }); self._scrollWorkingOutputToEnd(); } @@ -557,6 +557,7 @@ $(function() { self.loglines.push({line: _.repeat("+", text.length), stream: "separator"}); self.loglines.push({line: text, stream: "message"}); self.loglines.push({line: _.repeat("+", text.length), stream: "separator"}); + self._scrollWorkingOutputToEnd(); self._updatePopup({ text: text, hide: false, @@ -584,6 +585,7 @@ $(function() { }; self.loglines.push({line: text, stream: "message"}); + self._scrollWorkingOutputToEnd(); self.waitingForRestart = true; self.restartTimeout = setTimeout(function() { @@ -694,6 +696,13 @@ $(function() { } }; + self._forcedStdoutLine = /You are using pip version .*?, however version .*? is available\.|You should consider upgrading via the '.*?' command\./; + self._preprocessLine = function(line) { + if (line.stream == "stderr" && line.line.match(self._forcedStdoutLine)) { + line.stream = "stdout"; + } + return line; + } } // view model class, parameters for constructor, container to bind to