From 9a4a13c669cdcaeb74bd3dae74c263773c9378f1 Mon Sep 17 00:00:00 2001 From: Stefan Cohen Date: Wed, 4 Mar 2020 00:03:12 +0000 Subject: [PATCH] Bug fixes --- octoprint_dashboard/__init__.py | 2 +- octoprint_dashboard/static/js/dashboard.js | 4 ++-- octoprint_dashboard/templates/dashboard_tab.jinja2 | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/octoprint_dashboard/__init__.py b/octoprint_dashboard/__init__.py index b2785d3..6d3db0d 100644 --- a/octoprint_dashboard/__init__.py +++ b/octoprint_dashboard/__init__.py @@ -63,7 +63,7 @@ def on_event(self, event, payload): self._plugin_manager.send_plugin_message(self._identifier, dict(totalLayer=payload.get('totalLayer'), currentLayer=payload.get('currentLayer'), currentHeight=payload.get('currentHeight'), - totalHeightWithExtrusion=payload.get('totalHeightWithExtrusion'), + totalHeight=payload.get('totalHeight'), feedrate=payload.get('feedrate'), feedrateG0=payload.get('feedrateG0'), feedrateG1=payload.get('feedrateG1'), diff --git a/octoprint_dashboard/static/js/dashboard.js b/octoprint_dashboard/static/js/dashboard.js index 8aa5b3f..acb38fe 100644 --- a/octoprint_dashboard/static/js/dashboard.js +++ b/octoprint_dashboard/static/js/dashboard.js @@ -23,7 +23,7 @@ $(function () { self.totalLayer = ko.observable("-"); self.currentLayer = ko.observable("-"); self.currentHeight = ko.observable("-"); - self.totalHeightWithExtrusion = ko.observable("-"); + self.totalHeight = ko.observable("-"); self.feedrate = ko.observable("-"); self.feedrateG0 = ko.observable("-"); self.feedrateG1 = ko.observable("-"); @@ -407,7 +407,7 @@ $(function () { if (data.totalLayer) { self.totalLayer(data.totalLayer); } if (data.currentLayer) { self.currentLayer(data.currentLayer); } if (data.currentHeight) { self.currentHeight(data.currentHeight); } - if (data.totalHeightWithExtrusion) { self.totalHeightWithExtrusion(data.totalHeightWithExtrusion); } + if (data.totalHeight) { self.totalHeight(data.totalHeight); } if (data.feedrate) { self.feedrate(data.feedrate); } if (data.feedrateG0) { self.feedrateG0(data.feedrateG0); } if (data.feedrateG1) { self.feedrateG1(data.feedrateG1); } diff --git a/octoprint_dashboard/templates/dashboard_tab.jinja2 b/octoprint_dashboard/templates/dashboard_tab.jinja2 index 3952957..63471f1 100644 --- a/octoprint_dashboard/templates/dashboard_tab.jinja2 +++ b/octoprint_dashboard/templates/dashboard_tab.jinja2 @@ -234,7 +234,7 @@
- +