Skip to content

Commit 8408f50

Browse files
committed
Fix more FabLab related merge issues
1 parent aeb04f7 commit 8408f50

5 files changed

Lines changed: 12 additions & 4 deletions

File tree

src/octoprint/plugins/errortracking/static/js/errortracking.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ $(function () {
1212
// already enabled?
1313
if (self.settings.settings.plugins.errortracking.enabled()) return;
1414

15+
// Exit if bundled software update plugin is disabled
16+
if (!self.settings.settings.plugins.softwareupdate) return;
17+
1518
// RC release channel?
1619
var releaseChannel = self.settings.settings.plugins.softwareupdate.octoprint_release_channel();
1720
if (releaseChannel === "rc/maintenance" || releaseChannel === "rc/devel") {

src/octoprint/printer/standard.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import copy
1313
import logging
1414
import os
15+
import requests
1516
import threading
1617
import time
1718

@@ -1687,6 +1688,8 @@ def log_print():
16871688
self._dict(text=self.get_state_string(), flags=self._getStateFlags())
16881689
)
16891690

1691+
endtransaction()
1692+
16901693
def on_comm_print_job_cancelling(self, firmware_error=None, user=None):
16911694
payload = self._payload_for_print_job_event(action_user=user)
16921695
if payload:
@@ -1742,6 +1745,8 @@ def finalize():
17421745
thread.daemon = True
17431746
thread.start()
17441747

1748+
endtransaction()
1749+
17451750
def on_comm_print_job_paused(self, suppress_script=False, user=None):
17461751
payload = self._payload_for_print_job_event(
17471752
position=self._comm.pause_position.as_dict()

src/octoprint/server/api/offline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def tryFabAppOrGetLocal(filename):
6565
print(faPayload)
6666
try:
6767
r = requests.request("POST", faUrl + "api/" + filename + ".php",
68-
json=faPayload, headers=faHeaders, timeout=0.5)
68+
json=faPayload, headers=faHeaders, timeout=(3, 9))
6969
response = r.json()
7070
print("Connection to FabApp successful. Updating " + fname)
7171
if filename == "flud":
@@ -75,7 +75,7 @@ def tryFabAppOrGetLocal(filename):
7575

7676
return jsonify(response)
7777

78-
except:
78+
except Exception as e:
7979
print("ALERT -- Connection to FabApp failed. Using local cache from " + fname)
8080
print("DEBUG: \n" + str(e))
8181
if filename == "flud":

src/octoprint/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ def settings(init=False, basedir=None, configfile=None):
274274
},
275275
"folder": {
276276
"uploads": None,
277+
"FabAppData": None,
277278
"timelapse": None,
278279
"timelapse_tmp": None,
279280
"logs": None,

src/octoprint/templates/sidebar/state.jinja2

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22
<span data-bind="visible: isOperational"><span title="{{ _('Count of resend requests, transmitted lines and resend ratio')|edq }}">{{ _('Resend ratio') }}</span>: <strong data-bind="css: {'text-error': resendRatioCritical}"><span title="{{ _('resend requests') | edq }}" data-bind="text: formatHuman(resendCount())"></span> / <span title="{{ _('transmitted lines') | edq }}" data-bind="text: formatHuman(resendTotalTransmitted())"></span> (<span title="{{ _('resend ratio') }}" data-bind="text: resendRatio"></span>%) <a href="https://faq.octoprint.org/communication-errors" target="_blank" class="text-error" data-bind="visible: resendRatioCritical"><i class="fas fa-question-circle"></i></a></strong><br></span>
33
<hr>
44
<span title="{{ _('Name of file currently selected for printing')|edq }}">{{ _('File') }}</span>: <strong data-bind="text: filedisplay, attr: {title: filepath}"></strong>&nbsp;<strong data-bind="visible: sd">(SD)</strong><br>
5-
<span title="{{ _('Upload date of the file currently selected or printing')|edq }}">{{ _('Uploaded') }}</span>: <strong data-bind="text: dateString"></strong><br>
6-
<span title="{{ _('Current Transaction ID')|edq }}">{{ _('Transaction ID') }}</span>: <strong data-bind="text: transIdString "></strong><br>
75
<!-- ko foreach: filament -->
86
<span data-bind="text: 'Filament (' + name() + '): ', title: 'Filament usage for ' + name()"></span><strong data-bind="text: formatFilament(data())"></strong><br>
97
<!-- /ko -->
108
<span title="{{ _('Estimated total print time based on analysis of the file or past prints')|edq }}">{{ _('Approx. Total Print Time') }}</span>: <strong data-bind="text: estimatedPrintTimeString, attr: {title: estimatedPrintTimeExactString}"></strong><br>
119
<hr>
10+
<span title="{{ _('Current Transaction ID')|edq }}">{{ _('Transaction ID') }}</span>: <strong data-bind="text: transIdString "></strong><br>
1211
<span title="{{ _('Total print time so far')|edq }}">{{ _('Elapsed Time') }}</span>: <strong data-bind="text: printTimeString"></strong><br>
1312
<span title="{{ _('Estimated time until the print job is done. This is only an estimate and accuracy depends heavily on various factors!')|edq }}">{{ _('Print Time Left') }}</span>: <strong data-bind="text: printTimeLeftString, attr: {title: printTimeLeftExactString}"></strong> <span id="state_printtimeleft_popover" style="display: none" data-bind="visible: printTimeLeftOrigin, attr: {title: printTimeLeftOriginString}, css: printTimeLeftOriginClass">&#9679;</span><br>
1413
<span title="{{ _('Bytes printed vs total bytes of file')|edq }}">{{ _('Printed') }}</span>: <strong data-bind="text: byteString"></strong><br>

0 commit comments

Comments
 (0)