From 5955d3d32e152851a354c0e2642519f0971d2159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Wed, 10 Feb 2016 09:58:40 +0100 Subject: [PATCH] Added estimates total time from gcode viewer to gcode viewer tab Implements request in #1204 --- src/octoprint/static/js/app/viewmodels/gcode.js | 1 + src/octoprint/templates/tabs/gcodeviewer.jinja2 | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/octoprint/static/js/app/viewmodels/gcode.js b/src/octoprint/static/js/app/viewmodels/gcode.js index 04feaebd..30f13200 100644 --- a/src/octoprint/static/js/app/viewmodels/gcode.js +++ b/src/octoprint/static/js/app/viewmodels/gcode.js @@ -429,6 +429,7 @@ $(function() { } else { var output = []; output.push(gettext("Model size") + ": " + model.width.toFixed(2) + "mm × " + model.depth.toFixed(2) + "mm × " + model.height.toFixed(2) + "mm"); + output.push(gettext("Estimated total print time") + ": " + formatDuration(model.printTime)); output.push(gettext("Estimated layer height") + ": " + model.layerHeight.toFixed(2) + gettext("mm")); output.push(gettext("Layer count") + ": " + model.layersPrinted.toFixed(0) + " " + gettext("printed") + ", " + model.layersTotal.toFixed(0) + " " + gettext("visited")); diff --git a/src/octoprint/templates/tabs/gcodeviewer.jinja2 b/src/octoprint/templates/tabs/gcodeviewer.jinja2 index 4c674bea..d20725ab 100644 --- a/src/octoprint/templates/tabs/gcodeviewer.jinja2 +++ b/src/octoprint/templates/tabs/gcodeviewer.jinja2 @@ -57,6 +57,10 @@

+ +
+ {{ _('Note that the time estimates in this tab are calculated by the GCODE viewer in your browser and might differ from the values calculated by the server that are displayed in the "State" and "Files" panels in the sidebar due to slightly different implementations.') }} +

{{ _('Warning') }}