diff --git a/.versioneer-lookup b/.versioneer-lookup index f36ca988a..212fdecdb 100644 --- a/.versioneer-lookup +++ b/.versioneer-lookup @@ -18,16 +18,16 @@ prerelease HEAD \(detached.* -# maintenance is currently the branch for preparation of maintenance release 1.3.12 +# maintenance is currently the branch for preparation of maintenance release 1.3.13 # so are any fix/... and improve/... branches -maintenance 1.3.12 73df8c2407f04756261acfe62ac3d72877f8a97d pep440-dev -fix/.* 1.3.12 73df8c2407f04756261acfe62ac3d72877f8a97d pep440-dev -improve/.* 1.3.12 73df8c2407f04756261acfe62ac3d72877f8a97d pep440-dev +maintenance 1.3.13 2a42f02aecaedf2c55579984e0bc94e44402cc15 pep440-dev +fix/.* 1.3.13 2a42f02aecaedf2c55579984e0bc94e44402cc15 pep440-dev +improve/.* 1.3.13 2a42f02aecaedf2c55579984e0bc94e44402cc15 pep440-dev -# staging/maintenance is currently the branch for preparation of 1.3.11rc4 +# staging/maintenance is currently the branch for preparation of 1.3.12rc3 # so is regressionfix/... -staging/maintenance 1.3.11rc4 af3285854995fb5b910fd2ce869e26c02d57bbc2 pep440-dev -regressionfix/.* 1.3.11rc4 af3285854995fb5b910fd2ce869e26c02d57bbc2 pep440-dev +staging/maintenance 1.3.12rc3 c4258c5bb0eae30595e6463281f266582096ad48 pep440-dev +regressionfix/.* 1.3.12rc3 c4258c5bb0eae30595e6463281f266582096ad48 pep440-dev # every other branch is a development branch and thus gets resolved to 1.4.0-dev for now .* 1.4.0 7f5d03d0549bcbd26f40e7e4a3297ea5204fb1cc pep440-dev diff --git a/AUTHORS.md b/AUTHORS.md index 99c995aa4..38730e8d6 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -107,6 +107,7 @@ date of first contribution): * [Steven Spungin](https://github.com/flamenco) * [Piotr Usewicz](https://github.com/pusewicz) * [Aliaksei Pilko](https://github.com/aliaksei135) + * [Ben Yarmis](https://github.com/byarmis) OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by [Daid Braam](https://github.com/daid). Parts of its communication layer and diff --git a/CHANGELOG.md b/CHANGELOG.md index d364c1ab8..f8956da60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,111 @@ # OctoPrint Changelog +## 1.3.12rc2 (2019-09-17) + +### Improvements + + * [#3271](https://github.com/foosel/OctoPrint/issues/3271) - Extend safemode to also disable third party language packs + +### Bug fixes + + * [#3270](https://github.com/foosel/OctoPrint/issues/3270) - Properly escape translation strings in single/double quoted template locations + * [#3272](https://github.com/foosel/OctoPrint/issues/3272) (regression) - GCODE viewer: Fix out-of-sync & layer slider issue + * [#3273](https://github.com/foosel/OctoPrint/issues/3273) (regression) - Fix minimum pip version for OctoPi 0.15.1, which turns out is 9.0.3, not 10.0.1 as on OctoPi 0.15.0 due to a bug related version pin back then when. + +### Special thanks to all the contributors! + +Special thanks to everyone who contributed to this release candidate and provided full, analysable bug reports! + +### More information + + * [Commits](https://github.com/foosel/OctoPrint/compare/1.3.12rc1...1.3.12rc2) + +## 1.3.12rc1 (2019-09-10) + +### Improvements + + * [#1239](https://github.com/foosel/OctoPrint/issues/1239) & [#3227](https://github.com/foosel/OctoPrint/pull/3227) - Add command line interface for user management. Via `octoprint user [add_user|remove_user|change_password]` it is now possible to add & remove users or change their passwords right from the command line instead of just through the web interface. That should also make password recovery easier and as simple as `octoprint user change_password username`. + * [#2896](https://github.com/foosel/OctoPrint/issues/2896) - Add confirmation dialog when removing a plugin (see also [#3179](https://github.com/foosel/OctoPrint/pull/3179)). + * [#3075](https://github.com/foosel/OctoPrint/issues/3075) - Calculate filament usage for all extruders in `M605` duplicate/mirror setup (see also [#3181](https://github.com/foosel/OctoPrint/pull/3181)). + * [#3101](https://github.com/foosel/OctoPrint/issues/3101) - Support tags on GCODE script hook and add `plugin:` to script parts from plugins. + * [#2669](https://github.com/foosel/OctoPrint/issues/2669) - Add option for disabling filters on search results in the file list (see also [#3126](https://github.com/foosel/OctoPrint/pull/3126)). + * [#3131](https://github.com/foosel/OctoPrint/pull/3131) - Allow subscribing to multiple events in one yaml based event subscription. + * [#3133](https://github.com/foosel/OctoPrint/issues/3133) - Adjust wording in case of file upload errors to also hint at permission problems. + * [#3134](https://github.com/foosel/OctoPrint/pull/3134) - Add support for logging in (and creating users) through `REMOTE_USER` header supplied by a reverse proxy in front of OctoPrint. + * [#3147](https://github.com/foosel/OctoPrint/pull/3147) - Forcelogin: Add autofocus to the username + * [#3161](https://github.com/foosel/OctoPrint/issues/3161) - Plugin manager: Reduce height of plugin list. + * [#3162](https://github.com/foosel/OctoPrint/issues/3162) - Make closing behaviour of dialogs adjustable: default behaviour is to close on click outside of dialog, this can now be disabled. + * [#3167](https://github.com/foosel/OctoPrint/pull/3167) - Make it configurable whether to perform the parity double open workaround on serial needed for (some?) debian based systems. Solves issues for FreeBSD systems & Klipper. + * [#3180](https://github.com/foosel/OctoPrint/pull/3180) - Add button to terminal tab to clear the log. + * [#3188](https://github.com/foosel/OctoPrint/issues/3188) - Suppress scary `WebSocketClosedError` messages in the log simply caused by closing the browser. + * [#3171](https://github.com/foosel/OctoPrint/issues/3171) & [#3204](https://github.com/foosel/OctoPrint/issues/3204) - Action command prompts: Add close button to prompts triggered through action commands by the firmware. Wouldn't have been necessary if firmware wasn't already abusing this feature created for *interactive prompts* as non interactive fire&forget notification dialogs 🙄 + * [#3174](https://github.com/foosel/OctoPrint/issues/3174) - Include upload date & time in State panel to make file refreshs clearer. + * [#3191](https://github.com/foosel/OctoPrint/pull/3191) - Docs: Clarify that a target temperature value of 0 turns heaters off. + * [#3198](https://github.com/foosel/OctoPrint/issues/3198) - Clarify execution order of GCODE scripts. + * [#3199](https://github.com/foosel/OctoPrint/issues/3199) - Hardening against corrupt print recovery data. + * [#3203](https://github.com/foosel/OctoPrint/issues/3203) - Add documentation for `printTimeLeftOrigin` field. + * [#3206](https://github.com/foosel/OctoPrint/issues/3206) - Better resilience against garbage on the line on initial connect to the printer due to more handshake attempts. + * [#3207](https://github.com/foosel/OctoPrint/issues/3207) - Try to guess the mimetype if there is none during the webcam stream test. + * [#3218](https://github.com/foosel/OctoPrint/pull/3218) - Small refactoring in comm layer + * [#3225](https://github.com/foosel/OctoPrint/pull/3225) - Quote arguments in `pip install` to avoid issues with shells other than bash. + * [#3249](https://github.com/foosel/OctoPrint/pull/3249) & [#3263](https://github.com/foosel/OctoPrint/pull/3263) - Printer profile events are now properly triggered. + * [#3250](https://github.com/foosel/OctoPrint/issues/3250) - Add optional confirmation dialog for starting a print. + * Make emergency codes configurable. + * Detect endless resend requests of the same line. If the printer keeps requesting the same line over and over again, something is either seriously wrong with the line or with the connection. In any case, log an error and disconnect. + * Send `M112` on disconnect due to an error (configurable) to try to disable heaters and such. + * More type annotations throughout the code. + * Re-add missing `minHeight` support to modals. + * Ensure line breaks on copy of terminal contents. + * Error Tracking: Further limit events that go out, this time by fqcn of callback methods, if needed. + * GCODE viewer: Increase logging. + * Plugin Manager: Prevent plugin installs while throttled due to undervoltage or overheating. + * Software Update: Consider an empty restart command an unset one. + * Software Update: Prevent updates while throttled due to undervoltage or overheating. + * Tracking: Track plugins & versions once every 24h. This is a feature requested repeatedly by plugin developers and will also allow the compilation of something like a Top-10-list. + * Tracking: Track slicing events + +### Bug fixes + + * [#3022](https://github.com/foosel/OctoPrint/issues/3022) & [#3236](https://github.com/foosel/OctoPrint/issues/3236) - Ignore `NaN` and `Inf` values in GCODE analysis result, don't allow `NaN` on APIs. + * [#3095](https://github.com/foosel/OctoPrint/issues/3095) - Fix a small error in the frontend through bootstrap update. + * [#3096](https://github.com/foosel/OctoPrint/issues/3096) - Fix handling of `Empty` exception in send loop. + * [#3104](https://github.com/foosel/OctoPrint/issues/3104) - `M112` and other emergency codes must *always* jump the internal command queue even when printing and be sent immediately. + * [#3107](https://github.com/foosel/OctoPrint/issues/3107) - Prevent issues if `hash` field on file metadata is unset. + * [#3109](https://github.com/foosel/OctoPrint/issues/3109) - Fix some unicode issues on the API. + * [#3114](https://github.com/foosel/OctoPrint/issues/3114) - Virtual printer: Fix handling of closed connection. + * [#3137](https://github.com/foosel/OctoPrint/issues/3137) - Do not invert axes in GCODE viewer. The axis inversion is only relevant to the control panel (depends on how the print head is positioned), NOT the rendition of the GCODE. + * [#3142](https://github.com/foosel/OctoPrint/issues/3142) - Only do autologin if not actively logged out. + * [#3143](https://github.com/foosel/OctoPrint/issues/3143) - Fix layers vanishing from GCODE viewer on settings access. + * [#3153](https://github.com/foosel/OctoPrint/issues/3153) - Fix wrong variable name in an exception handler. + * [#3154](https://github.com/foosel/OctoPrint/issues/3154) - Strip interface tags from IPv6 addresses in local address check. + * [#3155](https://github.com/foosel/OctoPrint/issues/3155) - Backup: Make sure `exclude` is always a list. + * [#3156](https://github.com/foosel/OctoPrint/issues/3156) - Tracking: Fix error if tracked time is `None`. + * [#3157](https://github.com/foosel/OctoPrint/issues/3157) - Plugin manager: Better handling of unexpected repository format (e.g. in case of a misconfigured repository URL). + * [#3166](https://github.com/foosel/OctoPrint/issues/3166) & [#3211](https://github.com/foosel/OctoPrint/issues/3211) - Fix caching behaviour in case of active wizards. + * [#3171](https://github.com/foosel/OctoPrint/issues/3171) - Action command prompts: Remove prompts on disconnect from the printer. + * [#3176](https://github.com/foosel/OctoPrint/issues/3176) - Forcelogin: Don't touch static endpoints. + * [#3177](https://github.com/foosel/OctoPrint/issues/3177) - Always report all tools in shared nozzle setups to avoid inconsistencies. + * [#3190](https://github.com/foosel/OctoPrint/issues/3190) - Plugin Manager: Refresh the repository list on cache timeout, not just on server restart and/or connectivity events. + * [#3194](https://github.com/foosel/OctoPrint/issues/3194) & [#3196](https://github.com/foosel/OctoPrint/issues/3196) - Fix typo causing a `KeyError` on starting a second consecutive print of a file (see also [#3195](https://github.com/foosel/OctoPrint/pull/3195)). + * [#3217](https://github.com/foosel/OctoPrint/pull/3217) - Docs: Fix typo in chambers documentation + * [#3220](https://github.com/foosel/OctoPrint/issues/3220) - Fix `_long_running_command` flag for `M191` on comm layer. + * [#3224](https://github.com/foosel/OctoPrint/issues/3224) - Fix file selection not being cleared in the frontend on printer disconnect. + * [#3247](https://github.com/foosel/OctoPrint/issues/3247) - Fix scoping issue in JavaScript for custom commands with `javascript`/`enabled` fields. + * [#3253](https://github.com/foosel/OctoPrint/issues/3253) - Software Update: Fix error in python version detection (see also [#3256](https://github.com/foosel/OctoPrint/pull/3256)). + * [#3257](https://github.com/foosel/OctoPrint/issues/3257) - Appkeys: Ignore empty username on `request` endpoint to avoid later issues. + * Fix broken filtering of valid tools + * Properly clear out user data from user management dialogs + * Appkeys: Fix handling of empty request body, should return `400 Bad Request` instead of `500 Internal Server Error`. + * Printer safety: Anycubic 1.1.2 is already safe (off by one error, used to only detect >1.1.2 instead of >=1.1.2) + +### Special thanks to all the contributors! + +Special thanks to everyone who contributed to this release candidate and provided full, analyzable bug reports and pull requests, especially [@aliaksei135](https://github.com/aliaksei135), [@AndyQ](https://github.com/AndyQ), [@dmweis](https://github.com/dmweis), [@esver](https://github.com/esver), [@gdombiak](https://github.com/gdombiak), [@jackwilsdon](https://github.com/jackwilsdon), [@JanneMantyharju](https://github.com/JanneMantyharju), [@kevans91](https://github.com/kevans91), [@pusewicz](https://github.com/pusewicz), [@rfinnie](https://github.com/rfinnie) and [@tduehr](https://github.com/tduehr) for their PRs. + +### More information + + * [Commits](https://github.com/foosel/OctoPrint/compare/1.3.11...1.3.12rc1) + ## 1.3.11 (2019-05-14) ### Heads-up: 1.3.11 unbundles the Cura plugin diff --git a/SUPPORTERS.md b/SUPPORTERS.md index 8ca7d23b7..b80d61f31 100644 --- a/SUPPORTERS.md +++ b/SUPPORTERS.md @@ -8,8 +8,8 @@ thanks to everyone who contributed! * Andre Bubel * Andrew Moorby + * ANTONIO AUGUSTO DE LIMA PONTES * Arnljot Arntsen - * Bjorn Breckenridge * Boris Hussein * Brad Jackson * Christian Petropolis @@ -27,7 +27,6 @@ thanks to everyone who contributed! * Jeff Renfer * Jefferson Hunt * Jeremiah Avery - * Joseph Payne * Joshua Wills * Justin Kaufman * Kaile Riser @@ -41,9 +40,11 @@ thanks to everyone who contributed! * Miles Flavel * Mosaic Manufacturing * OMER MEHMET SUTAS + * Patrick Glyré * Patrick McGinnis * Prof Yuh Wen Chen * Randy C. Will + * Ranjib Dey * Robert Gusek * Samer Najia * Shawn Lewis @@ -53,5 +54,6 @@ thanks to everyone who contributed! * TEVO 3D Printers * Trent Shumay * Ulrich Kempken + * Vladislav Kuzemchik -and 1544 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel)! +and 1587 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel)! diff --git a/docs/events/index.rst b/docs/events/index.rst index 2250d402f..791f33d0f 100644 --- a/docs/events/index.rst +++ b/docs/events/index.rst @@ -640,7 +640,7 @@ SlicingProfileAdded * ``profile``: the profile that was added SlicingProfileModified - A new slicing profile was modified. + A slicing profile was modified. Payload: @@ -665,3 +665,15 @@ SettingsUpdated This event may also be triggered if calling code of :py:class:`octoprint.settings.Settings.save` or :py:class:`octoprint.plugin.PluginSettings.save` sets the ``trigger_event`` parameter to ``True``. + +.. _sec-events-available_events-printer_profile: + +Printer Profile +-------- + +PrinterProfileModified + A printer profile was modified. + + Payload: + + * ``identifier``: the identifier of the modified printer profile diff --git a/docs/features/safemode.rst b/docs/features/safemode.rst index c90d30d60..56445e9e4 100644 --- a/docs/features/safemode.rst +++ b/docs/features/safemode.rst @@ -5,19 +5,20 @@ Safe mode ********* With the advent of support for plugins in OctoPrint, it quickly became apparent that some of the bugs -reported on OctoPrint's bug tracker were actually bugs with installed third party plugins instead of -OctoPrint itself. +reported on OctoPrint's bug tracker were actually bugs with installed third party plugins or language +packs instead of OctoPrint itself. To allow an easier identification of these cases, OctoPrint 1.3.0 introduced safe mode. Starting -OctoPrint in safe mode disables all plugins that are not bundled with OctoPrint, allowing to easier -identify most cases where a third party plugin is the culprit of an observed issue. +OctoPrint in safe mode disables all plugins (and starting with 1.3.13 also all language packs) that are +not bundled with OctoPrint, allowing to easier identify most cases where a third party plugin or language +pack is the culprit of an observed issue. -Additionally, OctoPrint allows uninstalling plugins in this mode, allowing recovery from cases where -a third party plugin causes the server to not start up or the web interface to not render or function -correctly anymore. +Additionally, OctoPrint allows uninstalling plugins and language packs in this mode, allowing recovery +from cases where a third party addition causes the server to not start up or the web interface to not +render or function correctly anymore. Whenever reporting an issue with OctoPrint, please always attempt to reproduce it in safe mode as well to -ensure it really is an issue in OctoPrint itself and now caused by one of your installed third party plugins. +ensure it really is an issue in OctoPrint itself and now caused by one of your installed third party additions. .. _sec-features-safemode-how: @@ -73,11 +74,17 @@ When OctoPrint is running in safe mode the following changes to its normal opera * OctoPrint will not enable any of the installed third party plugins. OctoPrint considers all plugins third party plugins that do not ship with OctoPrint's sources, so any plugins installed either via `pip` or - into OctoPrint's plugin folder at ``~/.octoprint/plugins`` (Linux), ``%APPDATA%/OctoPrint`` (Windows) and - ``~/Library/Application Support/OctoPrint`` (MacOS). + into OctoPrint's plugin folder at ``~/.octoprint/plugins`` (Linux), ``%APPDATA%/OctoPrint/plugins`` (Windows) and + ``~/Library/Application Support/OctoPrint/plugins`` (MacOS). + * OctoPrint will not enable any of the installed third party language packs. OctoPrint considers all language packs + third party language packs that do not ship with OctoPrint's sources, so any language plugins installed + through the language pack manager within settings and/or stored in the language pack folder at + ``~/.octoprint/translations`` (Linux), ``%APPDATA%/OctoPrint/translations`` (Windows) or + ``~/Library/Application Support/OctoPrint/translations`` (MacOS). * OctoPrint will still allow to uninstall third party plugins through the built-in Plugin Manager. * OctoPrint will still allow to disable (bundled) plugins that are still enabled. * OctoPrint will not allow to enable third party plugins. + * OctoPrint will still allow to manage language packs. * OctoPrint's web interface will display a notification to remind you that it is running in safe mode. diff --git a/docs/images/features-safemode-notification.png b/docs/images/features-safemode-notification.png index 4cdaa5f40..b9331c0b7 100644 Binary files a/docs/images/features-safemode-notification.png and b/docs/images/features-safemode-notification.png differ diff --git a/src/octoprint/filemanager/__init__.py b/src/octoprint/filemanager/__init__.py index e54eb8054..c33f00c24 100644 --- a/src/octoprint/filemanager/__init__.py +++ b/src/octoprint/filemanager/__init__.py @@ -17,6 +17,7 @@ from .destinations import FileDestinations from .analysis import QueueEntry, AnalysisQueue from .storage import LocalFileStorage from .util import AbstractFileWrapper, StreamWrapper, DiskFileWrapper +from octoprint.util import get_fully_qualified_classname as fqcn from collections import namedtuple @@ -429,7 +430,8 @@ class FileManager(object): self._last_slicing_progress = progress_int for callback in self._slicing_progress_callbacks: try: callback.sendSlicingProgress(slicer, source_location, source_path, dest_location, dest_path, progress_int) - except: self._logger.exception("Exception while pushing slicing progress") + except: self._logger.exception("Exception while pushing slicing progress", + extra=dict(callback=fqcn(callback))) if progress_int: def call_plugins(slicer, source_location, source_path, dest_location, dest_path, progress): diff --git a/src/octoprint/filemanager/analysis.py b/src/octoprint/filemanager/analysis.py index cdb61b5a1..181320d16 100644 --- a/src/octoprint/filemanager/analysis.py +++ b/src/octoprint/filemanager/analysis.py @@ -19,6 +19,7 @@ import time from octoprint.events import Events, eventManager from octoprint.settings import settings from octoprint.util import monotonic_time +from octoprint.util import get_fully_qualified_classname as fqcn class QueueEntry(collections.namedtuple("QueueEntry", "name, path, type, location, absolute_path, printer_profile, analysis")): @@ -109,7 +110,11 @@ class AnalysisQueue(object): def _analysis_finished(self, entry, result): for callback in self._callbacks: - callback(entry, result) + try: + callback(entry, result) + except: + self._logger.exception(u"Error while pushing analysis data to callback {}".format(callback), + extra=dict(callback=fqcn(callback))) eventManager().fire(Events.METADATA_ANALYSIS_FINISHED, {"name": entry.name, "path": entry.path, "origin": entry.location, diff --git a/src/octoprint/plugins/action_command_prompt/templates/action_command_prompt_navbar.jinja2 b/src/octoprint/plugins/action_command_prompt/templates/action_command_prompt_navbar.jinja2 index 584c486b2..31e2a266e 100644 --- a/src/octoprint/plugins/action_command_prompt/templates/action_command_prompt_navbar.jinja2 +++ b/src/octoprint/plugins/action_command_prompt/templates/action_command_prompt_navbar.jinja2 @@ -1,3 +1,3 @@ - diff --git a/src/octoprint/plugins/announcements/templates/announcements_navbar.jinja2 b/src/octoprint/plugins/announcements/templates/announcements_navbar.jinja2 index 933cc5521..7f936f0da 100644 --- a/src/octoprint/plugins/announcements/templates/announcements_navbar.jinja2 +++ b/src/octoprint/plugins/announcements/templates/announcements_navbar.jinja2 @@ -1,3 +1,3 @@ - + diff --git a/src/octoprint/plugins/appkeys/__init__.py b/src/octoprint/plugins/appkeys/__init__.py index 310638360..d67c8de9a 100644 --- a/src/octoprint/plugins/appkeys/__init__.py +++ b/src/octoprint/plugins/appkeys/__init__.py @@ -43,6 +43,12 @@ class PendingDecision(object): user_id=self.user_id, user_token=self.user_token) + def __repr__(self): + return u"PendingDecision({!r}, {!r}, {!r}, {!r}, timeout_callback=...)".format(self.app_id, + self.app_token, + self.user_id, + self.user_token) + class ReadyDecision(object): def __init__(self, app_id, app_token, user_id): @@ -54,6 +60,11 @@ class ReadyDecision(object): def for_pending(cls, pending, user_id): return cls(pending.app_id, pending.app_token, user_id) + def __repr__(self): + return u"ReadyDecision({!r}, {!r}, {!r})".format(self.app_id, + self.app_token, + self.user_id) + class ActiveKey(object): def __init__(self, app_id, api_key, user_id): @@ -74,6 +85,11 @@ class ActiveKey(object): def for_internal(cls, internal, user_id): return cls(internal["app_id"], internal["api_key"], user_id) + def __repr__(self): + return u"ActiveKey({!r}, {!r}, {!r})".format(self.app_id, + self.api_key, + self.user_id) + class AppKeysPlugin(octoprint.plugin.AssetPlugin, octoprint.plugin.BlueprintPlugin, @@ -121,12 +137,15 @@ class AppKeysPlugin(octoprint.plugin.AssetPlugin, @no_firstrun_access def handle_request(self): data = flask.request.json + if data is None: + return flask.make_response("Missing key request", 400) + if not "app" in data: return flask.make_response("No app name provided", 400) app_name = data["app"] user_id = None - if "user" in data: + if "user" in data and data["user"]: user_id = data["user"] app_token, user_token = self._add_pending_decision(app_name, user_id=user_id) diff --git a/src/octoprint/plugins/appkeys/templates/appkeys_settings.jinja2 b/src/octoprint/plugins/appkeys/templates/appkeys_settings.jinja2 index 700fb8f2b..6da481c60 100644 --- a/src/octoprint/plugins/appkeys/templates/appkeys_settings.jinja2 +++ b/src/octoprint/plugins/appkeys/templates/appkeys_settings.jinja2 @@ -40,8 +40,8 @@ -
{{ _('API Key') }}: - +
{{ _('API Key') }}: + diff --git a/src/octoprint/plugins/appkeys/templates/appkeys_usersettings.jinja2 b/src/octoprint/plugins/appkeys/templates/appkeys_usersettings.jinja2 index 2499b2330..1bfeaf07f 100644 --- a/src/octoprint/plugins/appkeys/templates/appkeys_usersettings.jinja2 +++ b/src/octoprint/plugins/appkeys/templates/appkeys_usersettings.jinja2 @@ -13,8 +13,8 @@ -
{{ _('API Key') }}: - +
{{ _('API Key') }}: + diff --git a/src/octoprint/plugins/backup/templates/backup_settings.jinja2 b/src/octoprint/plugins/backup/templates/backup_settings.jinja2 index e9546adb2..6fcc72ca4 100644 --- a/src/octoprint/plugins/backup/templates/backup_settings.jinja2 +++ b/src/octoprint/plugins/backup/templates/backup_settings.jinja2 @@ -46,7 +46,7 @@ -  |  |  +  |  |  diff --git a/src/octoprint/plugins/errortracking/__init__.py b/src/octoprint/plugins/errortracking/__init__.py index 341adf66b..fa59ee6f4 100644 --- a/src/octoprint/plugins/errortracking/__init__.py +++ b/src/octoprint/plugins/errortracking/__init__.py @@ -7,13 +7,14 @@ __copyright__ = "Copyright (C) 2019 The OctoPrint Project - Released under terms import octoprint.plugin import logging +from octoprint.util import get_fully_qualified_classname as fqcn from octoprint.util.version import get_octoprint_version_string, is_released_octoprint_version from flask import jsonify from flask_babel import gettext -SENTRY_URL_SERVER = "https://4069187705ab4e76921eb19db2e9ccbb@sentry.io/1373987" -SENTRY_URL_COREUI = "https://a4ab48f27daf4c129392b78be15412b8@sentry.io/1374096" +SENTRY_URL_SERVER = "https://2eecd116552e4d498caa75d2e67edc5a@sentry.io/1373987" +SENTRY_URL_COREUI = "https://f5e6d16d17d64d588b5d8221eb9eeb39@sentry.io/1374096" SETTINGS_DEFAULTS = dict(enabled=False, enabled_unreleased=False, @@ -29,19 +30,24 @@ import tornado.websocket IGNORED_EXCEPTIONS = [ # serial exceptions in octoprint.util.comm - (serial.SerialException, lambda exc, logger, plugin: logger == "octoprint.util.comm"), + (serial.SerialException, lambda exc, logger, plugin, cb: logger == "octoprint.util.comm"), # isp errors during port auto detection in octoprint.util.comm - (octoprint.util.avr_isp.ispBase.IspError, lambda exc, logger, plugin: logger == "octoprint.util.comm"), + (octoprint.util.avr_isp.ispBase.IspError, lambda exc, logger, plugin, cb: logger == "octoprint.util.comm"), # IOErrors of any kind due to a full file system - (IOError, lambda exc, logger, plugin: getattr(exc, "errno") and exc.errno in (getattr(errno, "ENOSPC"),)), + (IOError, lambda exc, logger, plugin, cb: getattr(exc, "errno") and exc.errno in (getattr(errno, "ENOSPC"),)), # RequestExceptions of any kind requests.exceptions.RequestException, # Tornado WebSocketErrors of any kind - tornado.websocket.WebSocketError + tornado.websocket.WebSocketError, + + # Anything triggered by or in third party plugin Astroprint + (Exception, lambda exc, logger, plugin, cb: logger.startswith("octoprint.plugins.astroprint") + or plugin == "astroprint" + or cb.startswith("octoprint_astroprint.")) ] try: @@ -138,6 +144,7 @@ def _enable_errortracking(): handled = True logger = event.get("logger", "") plugin = event.get("extra", dict()).get("plugin", None) + callback = event.get("extra", dict()).get("callback", None) for ignore in IGNORED_EXCEPTIONS: if isinstance(ignore, tuple): @@ -147,8 +154,8 @@ def _enable_errortracking(): matcher = lambda *args: True exc = hint["exc_info"][1] - if isinstance(exc, ignored_exc) and matcher(exc, logger, plugin): - # exception ignored for logger + if isinstance(exc, ignored_exc) and matcher(exc, logger, plugin, callback): + # exception ignored for logger, plugin and/or callback return None elif isinstance(ignore, type): diff --git a/src/octoprint/plugins/errortracking/templates/errortracking_settings.jinja2 b/src/octoprint/plugins/errortracking/templates/errortracking_settings.jinja2 index e5adefa92..56f86efee 100644 --- a/src/octoprint/plugins/errortracking/templates/errortracking_settings.jinja2 +++ b/src/octoprint/plugins/errortracking/templates/errortracking_settings.jinja2 @@ -25,7 +25,7 @@
- +
diff --git a/src/octoprint/plugins/forcelogin/templates/forcelogin_index.jinja2 b/src/octoprint/plugins/forcelogin/templates/forcelogin_index.jinja2 index 99055b532..f12e6ad4f 100644 --- a/src/octoprint/plugins/forcelogin/templates/forcelogin_index.jinja2 +++ b/src/octoprint/plugins/forcelogin/templates/forcelogin_index.jinja2 @@ -21,8 +21,8 @@
{{ _('Incorrect username or password.') }}
{{ _('Server is currently offline.') }} {{ _('Reconnect...') }}
- - + + {{ _('Forgot password?') }}
- +
@@ -103,7 +103,7 @@
- +
diff --git a/src/octoprint/plugins/pi_support/templates/pi_support_navbar.jinja2 b/src/octoprint/plugins/pi_support/templates/pi_support_navbar.jinja2 index 6349f9180..c2c5f9401 100644 --- a/src/octoprint/plugins/pi_support/templates/pi_support_navbar.jinja2 +++ b/src/octoprint/plugins/pi_support/templates/pi_support_navbar.jinja2 @@ -1,4 +1,4 @@ - - - + + + diff --git a/src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2 b/src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2 index 56347fa73..8252562bf 100644 --- a/src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2 +++ b/src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2 @@ -40,7 +40,7 @@ {{ pluginmanager_throttled() }}
- +

{{ _('Installed Plugins') }}

@@ -56,7 +56,7 @@ -
()
+
()
 
@@ -67,7 +67,7 @@
-  |  +  |  @@ -151,7 +151,7 @@
@@ -193,7 +193,7 @@
- +
@@ -246,14 +246,14 @@
{{ _('Confirmations') }} -
+
-
+