Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sco01 committed Mar 4, 2020
1 parent dfdace2 commit 9a4a13c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion octoprint_dashboard/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
4 changes: 2 additions & 2 deletions octoprint_dashboard/static/js/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -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("-");
Expand Down Expand Up @@ -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); }
Expand Down
2 changes: 1 addition & 1 deletion octoprint_dashboard/templates/dashboard_tab.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
<div class="dashboardGridItem" data-bind="visible: printerStateModel.isPrinting()">
<img class="dashboardIcon" title="Current height" src="plugin/dashboard/static/img/height-icon.png">
<span id="currentHeight" data-bind="attr: { title: 'Current Height' }, html: currentHeight"></span>
<span class="dashboardSmall" id="totalHeightWithExtrusion" data-bind="attr: { title: 'Total Height' }, html: '/' + totalHeightWithExtrusion() + 'mm'"></span>
<span class="dashboardSmall" id="totalHeight" data-bind="attr: { title: 'Total Height' }, html: '/' + totalHeight() + 'mm'"></span>
</div>
<div class="dashboardGridItem" data-bind="visible: printerStateModel.isPrinting()">
<img class="dashboardIcon" title="Layer Time" src="plugin/dashboard/static/img/layer-time-average-icon.png">
Expand Down

0 comments on commit 9a4a13c

Please sign in to comment.