Merge branch 'devel' into dev/permission
# Conflicts: # src/octoprint/plugins/logging/__init__.py # src/octoprint/server/__init__.py # src/octoprint/server/util/sockjs.py # src/octoprint/static/css/octoprint.css
This commit is contained in:
commit
1852578136
58 files changed
+879
-303
No files matched your search
+3
-3
@@ -23,10 +23,10 @@ maintenance 1.3.8 da2c9632ea54fd1b3c8ae34f8f26bab29dbaf3c6 pep440-dev
|
||||
fix/.* 1.3.8 da2c9632ea54fd1b3c8ae34f8f26bab29dbaf3c6 pep440-dev
|
||||
improve/.* 1.3.8 da2c9632ea54fd1b3c8ae34f8f26bab29dbaf3c6 pep440-dev
|
||||
|
||||
# staging/maintenance is currently the branch for preparation of 1.3.7rc2
|
||||
# staging/maintenance is currently the branch for preparation of 1.3.7rc5
|
||||
# so is regressionfix/...
|
||||
staging/maintenance 1.3.7rc2 da2c9632ea54fd1b3c8ae34f8f26bab29dbaf3c6 pep440-dev
|
||||
regressionfix/.* 1.3.7rc2 da2c9632ea54fd1b3c8ae34f8f26bab29dbaf3c6 pep440-dev
|
||||
staging/maintenance 1.3.7rc5 e5caa3d0bf77ed23f04c1d96ab0fa997d19d2006 pep440-dev
|
||||
regressionfix/.* 1.3.7rc5 e5caa3d0bf77ed23f04c1d96ab0fa997d19d2006 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
|
||||
@@ -88,6 +88,8 @@ date of first contribution):
|
||||
* [Josh Major](https://github.com/astateofblank)
|
||||
* ["alex-gh"](https://github.com/alex-gh)
|
||||
* [Bernd Zeimetz](https://github.com/bzed)
|
||||
* [Daniele Forsi](https://github.com/dforsi)
|
||||
* [Ganey](https://github.com/ganey)
|
||||
|
||||
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
|
||||
|
||||
@@ -1,5 +1,40 @@
|
||||
# OctoPrint Changelog
|
||||
|
||||
## 1.3.7rc4 (2018-04-04)
|
||||
|
||||
### Bugfixes
|
||||
|
||||
* [#2536](https://github.com/foosel/OctoPrint/issues/2536) - Fix a wrong state tracking when starting an SD print through the controller, causing a disconnect due to a timeout.
|
||||
* [#2544](https://github.com/foosel/OctoPrint/issues/2544) - Fix an exception when connecting to the raw websocket at `/sockjs/websocket` (instead of `/sockjs/<server_id>/<session_id>/websocket`).
|
||||
* [#2546](https://github.com/foosel/OctoPrint/issues/2546) - Fix the `PRINT_FAILED` event getting triggered twice on print failure due to disconnect
|
||||
|
||||
([Commits](https://github.com/foosel/OctoPrint/compare/1.3.7rc3...1.3.7rc4))
|
||||
|
||||
## 1.3.7rc3 (2018-03-29)
|
||||
|
||||
### Bugfixes
|
||||
|
||||
* [#2524](https://github.com/foosel/OctoPrint/issues/2524) Ignore `wait` while job is on hold.
|
||||
|
||||
([Commits](https://github.com/foosel/OctoPrint/compare/1.3.7rc2...1.3.7rc3))
|
||||
|
||||
## 1.3.7rc2 (2018-03-23)
|
||||
|
||||
### Bugfixes
|
||||
|
||||
* [#1951](http://github.com/foosel/OctoPrint/issues/1951) - Fixed plugins being able to modify internal state data (e.g. progress, job), causing concurrent modification and resulting run time errors in the printer state processing.
|
||||
* [#2494](https://github.com/foosel/OctoPrint/issues/2494) - Fixed `undefined` values not saving in the settings.
|
||||
* [#2499](https://github.com/foosel/OctoPrint/issues/2499) - Fixed communication error notification lacking the actual error message.
|
||||
* [#2501](https://github.com/foosel/OctoPrint/issues/2501) - Fixed a bug causing log downloads to fail with an HTTP 500 error.
|
||||
* [#2506](https://github.com/foosel/OctoPrint/issues/2506) - Fixed `printer.get_current_data` and `printer.get_current_job` returning `frozendict` instead of `dict` instances, causing issues with plugins relying on being able to modify the returned data (e.g. [dattas/OctoPrint-DetailedProgress#26](https://github.com/dattas/OctoPrint-DetailedProgress/issues/26)).
|
||||
* [#2508](https://github.com/foosel/OctoPrint/issues/2508) - Fixed HTTP 500 error on `/api/slicing` in case of an unconfigured slicer.
|
||||
* Have `OctoPrintJsonEncoder` fall back to regular flask JSON encoder, otherwise we might not be able to serialize some data types we need to be able to serialize.
|
||||
* Use `pkg_resources` to determine pip version during environment check instead of `import pip; pip.__version__` since the latter causes issues with pip version 9.0.2. In the same spirit make `pip.main` approach of calling `pip` in the PipCaller the last resort during auto detection, only after trying `pip` or `pip.exe` inside the same folder as the Python executable.
|
||||
* Use `octoprint.util.monotonic_time` instead of `monotonic.monotonic` in comm layer.
|
||||
* Fixed timelapse not stopping on print failure due to firmware error due to missing `PrintFailed` event.
|
||||
|
||||
([Commits](https://github.com/foosel/OctoPrint/compare/1.3.7rc1...1.3.7rc2))
|
||||
|
||||
## 1.3.7rc1 (2018-03-19)
|
||||
|
||||
### Improvements
|
||||
|
||||
+3
-13
@@ -275,22 +275,11 @@ all requested information or your ticket will be closed.
|
||||
|
||||
### Where can I find which version and branch I'm on?
|
||||
|
||||
You can find out all of them by taking a look into the lower left corner of the
|
||||
OctoPrint UI:
|
||||
|
||||

|
||||
|
||||
If you don't have access to the UI you can find out that information via the
|
||||
command line as well. Either `octoprint --version` or `python setup.py version`
|
||||
in OctoPrint's folder will tell you the version of OctoPrint you are running
|
||||
(note: if it doesn't then you are running a version older than 1.1.0,
|
||||
*upgrade now*). A `git branch` in your OctoPrint installation folder will mark
|
||||
the branch you are on with a little *. `git rev-parse HEAD` will tell you the
|
||||
current commit.
|
||||
Please refer to [this FAQ entry](https://discourse.octoprint.org/t/how-can-i-find-out-the-version-of-octoprint-or-octopi-i-am-running/204/1).
|
||||
|
||||
### Where can I find those log files you keep talking about?
|
||||
|
||||
Please refer to [this FAQ entry](https://discourse.octoprint.org/t/where-can-i-find-octoprints-log-files/299).
|
||||
Please refer to [this FAQ entry](https://discourse.octoprint.org/t/where-can-i-find-octoprints-and-octopis-log-files/299/1).
|
||||
|
||||
### Where can I find my browser's error console?
|
||||
|
||||
@@ -483,6 +472,7 @@ the local version identifier to allow for an exact determination of the active c
|
||||
* 2017-11-22: Added note on how to run the unit tests
|
||||
* 2018-03-15: Link to new community forum and some clarifications re bug
|
||||
reporting
|
||||
* 2018-03-29: "Where to find version numbers" is now located on the FAQ
|
||||
|
||||
## Footnotes
|
||||
* [1] - If you are wondering why, the problem is that anything that you add
|
||||
|
||||
+4
-4
@@ -6,11 +6,9 @@ thanks to everyone who contributed!
|
||||
|
||||
## Patreon Patrons
|
||||
|
||||
* 3D Moniak
|
||||
* Aleph Objects, Inc.
|
||||
* Andrew Moorby
|
||||
* Arnljot Arntsen
|
||||
* BEEVERYCREATIVE
|
||||
* Boris Hussein
|
||||
* Brad Jackson
|
||||
* Brian E. Tyler
|
||||
* Christian Petropolis
|
||||
@@ -32,7 +30,9 @@ thanks to everyone who contributed!
|
||||
* Kale Stedman
|
||||
* Kazuhiro Ogura
|
||||
* Kodama Inc.
|
||||
* LulzBot®
|
||||
* Makespace Madrid
|
||||
* Mark Walker
|
||||
* Martin Beattie
|
||||
* Michael Aumock
|
||||
* Miles Flavel
|
||||
@@ -54,4 +54,4 @@ thanks to everyone who contributed!
|
||||
* Thomas Hatley
|
||||
* Trent Shumay
|
||||
|
||||
and 1188 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel)!
|
||||
and 1217 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel)!
|
||||
+56
-9
@@ -263,8 +263,11 @@ File information
|
||||
- Path to type of file in extension tree. E.g. ``["model", "stl"]`` for ``.stl`` files, or ``["machinecode", "gcode"]``
|
||||
for ``.gcode`` files. ``["folder"]`` for folders.
|
||||
|
||||
Additional properties depend on ``type``. For a ``type`` value of ``folder``, see "Folders". For any other value
|
||||
see "Files".
|
||||
Additional properties depend on ``type``.
|
||||
For a ``type`` value of ``folder``, see :ref:`Folders <sec-api-datamodel-files-folders>`.
|
||||
For any other value see :ref:`Files <sec-api-datamodel-files-files>`.
|
||||
|
||||
.. _sec-api-datamodel-files-folders:
|
||||
|
||||
Folders
|
||||
'''''''
|
||||
@@ -280,13 +283,14 @@ Folders
|
||||
* - ``children``
|
||||
- 0..*
|
||||
- Array of :ref:`File information items <sec-api-datamodel-files-file>`
|
||||
- Contained children for entries of type ``folder``. Will only include children in subfolders in recursive
|
||||
listings. Not present in non recursive listings, this might be revisited in the future.
|
||||
- Contained children for entries of type ``folder``. On non recursive listings only present on first level
|
||||
sub folders!
|
||||
* - ``size``
|
||||
- 0..1
|
||||
- Number
|
||||
- The size of all files contained in the folder and its subfolders. Not present in non recursive listings, this might
|
||||
be revisited in the future.
|
||||
- The size of all files contained in the folder and its subfolders. Not present in non recursive listings!
|
||||
|
||||
.. _sec-api-datamodel-files-files:
|
||||
|
||||
Files
|
||||
'''''
|
||||
@@ -385,14 +389,58 @@ GCODE analysis information
|
||||
- 0..1
|
||||
- Object
|
||||
- The estimated usage of filament
|
||||
* - ``filament.length``
|
||||
* - ``filament.tool{n}.length``
|
||||
- 0..1
|
||||
- Integer
|
||||
- The length of filament used, in mm
|
||||
* - ``filament.volume``
|
||||
* - ``filament.tool{n}.volume``
|
||||
- 0..1
|
||||
- Float
|
||||
- The volume of filament used, in cm³
|
||||
* - ``dimensions``
|
||||
- 0..1
|
||||
- Object
|
||||
- Information regarding the size of the printed model
|
||||
* - ``dimensions.depth``
|
||||
- 0..1
|
||||
- Float
|
||||
- The depth of the printed model, in mm
|
||||
* - ``dimensions.height``
|
||||
- 0..1
|
||||
- Float
|
||||
- The height of the printed model, in mm
|
||||
* - ``dimensions.width``
|
||||
- 0..1
|
||||
- Float
|
||||
- The width of the printed model, in mm
|
||||
* - ``printingArea``
|
||||
- 0..1
|
||||
- Object
|
||||
- Information regarding the size of the printing area
|
||||
* - ``printingArea.maxX``
|
||||
- 0..1
|
||||
- Float
|
||||
- The maximum X coordinate of the printed model, in mm
|
||||
* - ``printingArea.maxY``
|
||||
- 0..1
|
||||
- Float
|
||||
- The maximum Y coordinate of the printed model, in mm
|
||||
* - ``printingArea.maxZ``
|
||||
- 0..1
|
||||
- Float
|
||||
- The maximum Z coordinate of the printed model, in mm
|
||||
* - ``printingArea.minX``
|
||||
- 0..1
|
||||
- Float
|
||||
- The minimum X coordinate of the printed model, in mm
|
||||
* - ``printingArea.minY``
|
||||
- 0..1
|
||||
- Float
|
||||
- The minimum Y coordinate of the printed model, in mm
|
||||
* - ``printingArea.minZ``
|
||||
- 0..1
|
||||
- Float
|
||||
- The minimum Z coordinate of the printed model, in mm
|
||||
|
||||
|
||||
.. _sec-api-datamodel-files-ref:
|
||||
@@ -421,4 +469,3 @@ References
|
||||
- URL
|
||||
- The model from which this file was generated (e.g. an STL, currently not used). Never present for
|
||||
folders.
|
||||
|
||||
+31
-2
@@ -82,8 +82,37 @@ Retrieve all files
|
||||
"path": "folderA",
|
||||
"type": "folder",
|
||||
"typePath": ["folder"],
|
||||
"children": [],
|
||||
"size": 1334
|
||||
"children": [
|
||||
{
|
||||
"name": "whistle_v2_copy.gcode",
|
||||
"path": "whistle_v2_copy.gcode",
|
||||
"type": "machinecode",
|
||||
"typePath": ["machinecode", "gcode"],
|
||||
"hash": "...",
|
||||
"size": 1468987,
|
||||
"date": 1378847754,
|
||||
"origin": "local",
|
||||
"refs": {
|
||||
"resource": "http://example.com/api/files/local/folderA/whistle_v2_copy.gcode",
|
||||
"download": "http://example.com/downloads/files/local/folderA/whistle_v2_copy.gcode"
|
||||
},
|
||||
"gcodeAnalysis": {
|
||||
"estimatedPrintTime": 1188,
|
||||
"filament": {
|
||||
"length": 810,
|
||||
"volume": 5.36
|
||||
}
|
||||
},
|
||||
"print": {
|
||||
"failure": 4,
|
||||
"success": 23,
|
||||
"last": {
|
||||
"date": 1387144346,
|
||||
"success": true
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"free": "3.2GB"
|
||||
|
||||
@@ -106,7 +106,7 @@ mapped from the same fields in ``config.yaml`` unless otherwise noted:
|
||||
* - ``api.key``
|
||||
- Only maps to ``api.key`` in ``config.yaml`` if request is sent with admin rights, set to ``n/a`` otherwise.
|
||||
Starting with OctoPrint 1.3.3 setting this field via :ref:`the API <sec-api-settings-save>` is not possible,
|
||||
only :ref:`regenerting it <sec-api-settings-generateapikey>` is supported. Setting a custom value is only
|
||||
only :ref:`regenerating it <sec-api-settings-generateapikey>` is supported. Setting a custom value is only
|
||||
possible through `config.yaml`.
|
||||
* - ``api.allowCrossOrigin``
|
||||
-
|
||||
|
||||
@@ -893,7 +893,7 @@ Use the following settings to configure the serial connection to the printer:
|
||||
supportResendsWithoutOk: false
|
||||
|
||||
# Whether to "manually" trigger an ok for M29 (a lot of versions of this command are buggy and
|
||||
# the responds skips on the ok)
|
||||
# the response skips on the ok)
|
||||
triggerOkForM29: true
|
||||
|
||||
capabilities:
|
||||
@@ -934,7 +934,7 @@ Use the following settings to configure the server:
|
||||
|
||||
# Settings if OctoPrint is running behind a reverse proxy (haproxy, nginx, apache, ...).
|
||||
# These are necessary in order to make OctoPrint generate correct external URLs so
|
||||
# that AJAX requests and download URLs work.
|
||||
# that AJAX requests and download URLs work, and so that client IPs are read correctly.
|
||||
reverseProxy:
|
||||
|
||||
# The request header from which to determine the URL prefix under which OctoPrint
|
||||
@@ -968,6 +968,14 @@ Use the following settings to configure the server:
|
||||
# (X-Forwarded-Host by default, see above) with forwarded requests.
|
||||
hostFallback:
|
||||
|
||||
# List of trusted downstream servers for which to ignore the IP address when trying to determine
|
||||
# the connecting client's IP address. If you have OctoPrint behind more than one reverse proxy
|
||||
# you should add their IPs here so that they won't be interpreted as the client's IP. One reverse
|
||||
# proxy will be handled correctly by default.
|
||||
trustedDownstream:
|
||||
- 192.168.1.254
|
||||
- 192.168.23.42
|
||||
|
||||
# Settings for file uploads to OctoPrint, such as maximum allowed file size and
|
||||
# header suffixes to use for streaming uploads. OctoPrint does some nifty things internally in
|
||||
# order to allow streaming of large file uploads to the application rather than just storing
|
||||
@@ -1092,7 +1100,12 @@ System
|
||||
|
||||
Use the following settings to add custom system commands to the "System" dropdown within OctoPrint's top bar.
|
||||
|
||||
Commands consist of a name, an action identifier, the commandline to execute and an optional confirmation message to
|
||||
Commands consist of a ``name`` shown to the user, an ``action`` identifier used by the code and the actual
|
||||
``command`` including any argument needed for its execution.
|
||||
By default OctoPrint blocks until the command has returned so that the exit code can be used to show a success
|
||||
or failure message; use the flag ``async: true`` for commands that don't return.
|
||||
|
||||
Optionally you can add a confirmation message to
|
||||
display before actually executing the command (should be set to False if a confirmation dialog is not desired).
|
||||
|
||||
The following example defines a command for shutting down the system under Linux. It assumes that the user under which
|
||||
|
||||
@@ -16,7 +16,7 @@ import octoprint_setuptools
|
||||
INSTALL_REQUIRES = [
|
||||
"flask>=0.12,<0.13",
|
||||
"werkzeug>=0.11.1,<0.12",
|
||||
"tornado>=4.4.2,<4.5",
|
||||
"tornado>=5.0.1,<6",
|
||||
"Jinja2>=2.8,<2.9", # Jinja 2.9 has breaking changes WRT template scope - we can't
|
||||
# guarantee backwards compatibility for plugins and such with that
|
||||
# version, hence we need to pin to a lower version for now. See #1697
|
||||
|
||||
@@ -198,7 +198,7 @@ def init_logging(settings, use_logging_file=True, logging_file=None, default_con
|
||||
},
|
||||
"handlers": {
|
||||
"console": {
|
||||
"class": "logging.StreamHandler",
|
||||
"class": "octoprint.logging.handlers.OctoPrintStreamHandler",
|
||||
"level": "DEBUG",
|
||||
"formatter": "simple",
|
||||
"stream": "ext://sys.stdout"
|
||||
|
||||
@@ -83,8 +83,8 @@ class EnvironmentDetector(object):
|
||||
|
||||
# try to find pip version
|
||||
try:
|
||||
import pip
|
||||
result["pip"] = pip.__version__
|
||||
import pkg_resources
|
||||
result["pip"] = pkg_resources.get_distribution("pip").version
|
||||
except:
|
||||
self._logger.exception("Error detecting pip version")
|
||||
|
||||
|
||||
@@ -153,7 +153,8 @@ class StorageInterface(object):
|
||||
from root of base folder
|
||||
:param function filter: a filter that matches the files that are to be returned, may be left out in which case no
|
||||
filtering will take place
|
||||
:param bool recursive: will also step into sub folders for building the complete list if set to True
|
||||
:param bool recursive: will also step into sub folders for building the complete list if set to True, otherwise will only
|
||||
do one step down into sub folders to be able to populate the ``children``.
|
||||
:return: a dictionary mapping entry names to entry data that represents the whole file list
|
||||
"""
|
||||
raise NotImplementedError()
|
||||
@@ -1277,7 +1278,7 @@ class LocalFileStorage(StorageInterface):
|
||||
if metadata_dirty:
|
||||
self._save_metadata(path, metadata)
|
||||
|
||||
def _list_folder(self, path, base="", entry_filter=None, recursive=True, **kwargs):
|
||||
def _list_folder(self, path, base="", entry_filter=None, recursive=True, include_children=True, **kwargs):
|
||||
if entry_filter is None:
|
||||
entry_filter = kwargs.get("filter", None)
|
||||
|
||||
@@ -1385,8 +1386,14 @@ class LocalFileStorage(StorageInterface):
|
||||
sub_result = self._list_folder(entry_path, base=path_in_location + "/", entry_filter=entry_filter,
|
||||
recursive=recursive)
|
||||
entry_data["children"] = sub_result
|
||||
elif include_children:
|
||||
sub_result = self._list_folder(entry_path, base=path_in_location + "/", entry_filter=entry_filter,
|
||||
recursive=False, include_children=False)
|
||||
entry_data["children"] = sub_result
|
||||
|
||||
if not entry_filter or entry_filter(entry_name, entry_data):
|
||||
# only add folders passing the optional filter
|
||||
|
||||
def get_size():
|
||||
total_size = 0
|
||||
for element in entry_data["children"].values():
|
||||
@@ -1395,7 +1402,6 @@ class LocalFileStorage(StorageInterface):
|
||||
|
||||
return total_size
|
||||
|
||||
# only add folders passing the optional filter
|
||||
extended_entry_data = dict()
|
||||
extended_entry_data.update(entry_data)
|
||||
if recursive:
|
||||
|
||||
@@ -6,10 +6,30 @@ import os
|
||||
import re
|
||||
import time
|
||||
|
||||
# noinspection PyCompatibility
|
||||
import concurrent.futures
|
||||
|
||||
|
||||
class AsyncLogHandlerMixin(logging.Handler):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self._executor = concurrent.futures.ThreadPoolExecutor(max_workers=1)
|
||||
super(AsyncLogHandlerMixin, self).__init__(*args, **kwargs)
|
||||
|
||||
def emit(self, record):
|
||||
try:
|
||||
self._executor.submit(self._emit, record)
|
||||
except:
|
||||
self.handleError(record)
|
||||
|
||||
def _emit(self, record):
|
||||
# noinspection PyUnresolvedReferences
|
||||
super(AsyncLogHandlerMixin, self).emit(record)
|
||||
|
||||
|
||||
class CleaningTimedRotatingFileHandler(logging.handlers.TimedRotatingFileHandler):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
logging.handlers.TimedRotatingFileHandler.__init__(self, *args, **kwargs)
|
||||
super(CleaningTimedRotatingFileHandler, self).__init__(*args, **kwargs)
|
||||
|
||||
# clean up old files on handler start
|
||||
if self.backupCount > 0:
|
||||
@@ -17,7 +37,7 @@ class CleaningTimedRotatingFileHandler(logging.handlers.TimedRotatingFileHandler
|
||||
os.remove(s)
|
||||
|
||||
|
||||
class OctoPrintLogHandler(CleaningTimedRotatingFileHandler):
|
||||
class OctoPrintLogHandler(AsyncLogHandlerMixin, CleaningTimedRotatingFileHandler):
|
||||
rollover_callbacks = []
|
||||
|
||||
@classmethod
|
||||
@@ -25,32 +45,33 @@ class OctoPrintLogHandler(CleaningTimedRotatingFileHandler):
|
||||
cls.rollover_callbacks.append((callback, args, kwargs))
|
||||
|
||||
def doRollover(self):
|
||||
CleaningTimedRotatingFileHandler.doRollover(self)
|
||||
super(OctoPrintLogHandler, self).doRollover()
|
||||
|
||||
for rcb in self.rollover_callbacks:
|
||||
callback, args, kwargs = rcb
|
||||
callback(*args, **kwargs)
|
||||
|
||||
|
||||
class SerialLogHandler(logging.handlers.RotatingFileHandler):
|
||||
class OctoPrintStreamHandler(AsyncLogHandlerMixin, logging.StreamHandler):
|
||||
pass
|
||||
|
||||
_do_rollover = False
|
||||
_suffix_template = "%Y-%m-%d_%H-%M-%S"
|
||||
_file_pattern = re.compile(r"^\d{4}-\d{2}-\d{2}_\d{2}-\d{2}-\d{2}$")
|
||||
|
||||
class SerialLogHandler(AsyncLogHandlerMixin, logging.handlers.RotatingFileHandler):
|
||||
|
||||
do_rollover = False
|
||||
suffix_template = "%Y-%m-%d_%H-%M-%S"
|
||||
file_pattern = re.compile(r"^\d{4}-\d{2}-\d{2}_\d{2}-\d{2}-\d{2}$")
|
||||
|
||||
@classmethod
|
||||
def on_open_connection(cls):
|
||||
cls._do_rollover = True
|
||||
cls.do_rollover = True
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
logging.handlers.RotatingFileHandler.__init__(self, *args, **kwargs)
|
||||
super(SerialLogHandler, self).__init__(*args, **kwargs)
|
||||
self.cleanupFiles()
|
||||
|
||||
def emit(self, record):
|
||||
logging.handlers.RotatingFileHandler.emit(self, record)
|
||||
|
||||
def shouldRollover(self, record):
|
||||
return self.__class__._do_rollover
|
||||
return type(self).do_rollover
|
||||
|
||||
def getFilesToDelete(self):
|
||||
"""
|
||||
@@ -64,7 +85,7 @@ class SerialLogHandler(logging.handlers.RotatingFileHandler):
|
||||
for fileName in fileNames:
|
||||
if fileName[:plen] == prefix:
|
||||
suffix = fileName[plen:]
|
||||
if self.__class__._file_pattern.match(suffix):
|
||||
if type(self).file_pattern.match(suffix):
|
||||
result.append(os.path.join(dirName, fileName))
|
||||
result.sort()
|
||||
if len(result) < self.backupCount:
|
||||
@@ -88,7 +109,7 @@ class SerialLogHandler(logging.handlers.RotatingFileHandler):
|
||||
if os.path.exists(self.baseFilename):
|
||||
# figure out creation date/time to use for file suffix
|
||||
t = time.localtime(os.stat(self.baseFilename).st_mtime)
|
||||
dfn = self.baseFilename + "." + time.strftime(self.__class__._suffix_template, t)
|
||||
dfn = self.baseFilename + "." + time.strftime(type(self).suffix_template, t)
|
||||
if os.path.exists(dfn):
|
||||
os.remove(dfn)
|
||||
os.rename(self.baseFilename, dfn)
|
||||
@@ -98,8 +119,8 @@ class SerialLogHandler(logging.handlers.RotatingFileHandler):
|
||||
self.stream = self._open()
|
||||
|
||||
class RecordingLogHandler(logging.Handler):
|
||||
def __init__(self, target=None, level=logging.NOTSET):
|
||||
logging.Handler.__init__(self, level=level)
|
||||
def __init__(self, target=None, *args, **kwargs):
|
||||
super(RecordingLogHandler, self).__init__(*args, **kwargs)
|
||||
self._buffer = []
|
||||
self._target = target
|
||||
|
||||
@@ -133,6 +154,7 @@ class RecordingLogHandler(logging.Handler):
|
||||
return len(self._buffer)
|
||||
|
||||
|
||||
# noinspection PyAbstractClass
|
||||
class CombinedLogHandler(logging.Handler):
|
||||
def __init__(self, *handlers):
|
||||
logging.Handler.__init__(self)
|
||||
|
||||
@@ -1443,7 +1443,7 @@ class SettingsPlugin(OctoPrintPlugin):
|
||||
|
||||
Make sure to protect sensitive information stored by your plugin that only logged in administrators (or users)
|
||||
should have access to via :meth:`~octoprint.plugin.SettingsPlugin.get_settings_restricted_paths`. OctoPrint will
|
||||
return its settings on the REST API even to anonymous clients, but will filter out fields it know are restricted,
|
||||
return its settings on the REST API even to anonymous clients, but will filter out fields it knows are restricted,
|
||||
therefore you **must** make sure that you specify sensitive information accordingly to limit access as required!
|
||||
"""
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
</form>
|
||||
<small>{% trans %}
|
||||
You can import your existing profile <code>.ini</code> files from <strong>Cura 15.04.x or older</strong>
|
||||
here. Anything but those are <strong>not supported</strong>. That especiallymeans that <code>.json</code>
|
||||
here. Anything but those are <strong>not supported</strong>. That especially means that <code>.json</code>
|
||||
profiles from Cura 15.06.x and <code>.curaprofile</code> profiles from Cura 2.x will not work, and neither
|
||||
will custom Cura profile formats that third party tools like e.g. Repetier create.
|
||||
{% endtrans %}</small>
|
||||
|
||||
@@ -214,7 +214,9 @@ class LoggingPlugin(octoprint.plugin.AssetPlugin,
|
||||
__plugin_name__ = "Logging"
|
||||
__plugin_author__ = "Shawn Bruce, based on work by Gina Häußge and Marc Hannappel"
|
||||
__plugin_description__ = "Provides access to OctoPrint's logs and logging configuration."
|
||||
|
||||
__plugin_disabling_discouraged__ = gettext("Without this plugin you will no longer be able to retrieve "
|
||||
"OctoPrint's logs or modify the current logging levels through "
|
||||
"the web interface.")
|
||||
def __plugin_load__():
|
||||
global __plugin_implementation__
|
||||
__plugin_implementation__ = LoggingPlugin()
|
||||
|
||||
@@ -350,7 +350,7 @@ class PluginManagerPlugin(octoprint.plugin.SimpleApiPlugin,
|
||||
raise ValueError("Either URL or path must be provided")
|
||||
|
||||
self._logger.info("Installing plugin from {}".format(source))
|
||||
pip_args = ["install", sarge.shell_quote(source)]
|
||||
pip_args = ["install", sarge.shell_quote(source), '--no-cache-dir']
|
||||
|
||||
if dependency_links or self._settings.get_boolean(["dependency_links"]):
|
||||
pip_args.append("--process-dependency-links")
|
||||
|
||||
@@ -1 +1 @@
|
||||
table td.settings_plugin_plugin_manager_plugins_name,table th.settings_plugin_plugin_manager_plugins_name{text-overflow:ellipsis;text-align:left}table td.settings_plugin_plugin_manager_plugins_actions,table th.settings_plugin_plugin_manager_plugins_actions{text-align:center;width:80px}table td.settings_plugin_plugin_manager_plugins_actions a,table th.settings_plugin_plugin_manager_plugins_actions a{text-decoration:none;color:#000}table td.settings_plugin_plugin_manager_plugins_actions a.disabled,table th.settings_plugin_plugin_manager_plugins_actions a.disabled{color:#ccc;cursor:default}#settings_plugin_pluginmanager_repositorydialog .slimScrollDiv{margin-bottom:20px;padding-right:12px}#settings_plugin_pluginmanager_repositorydialog h4{position:relative}#settings_plugin_pluginmanager_repositorydialog h4 a.dropdown-toggle{color:inherit;text-decoration:none;font-size:14px}#settings_plugin_pluginmanager_repositorydialog h4 ul.dropdown-menu{font-size:14px}#settings_plugin_pluginmanager_repositorydialog .form-search{text-align:center;margin-bottom:5px!important}#settings_plugin_pluginmanager_repositorydialog .form-inline{padding:5px 10px 5px 5px;margin-bottom:0}#settings_plugin_pluginmanager_repositorydialog .form-inline .help-block{margin-bottom:0;font-size:85%}#settings_plugin_pluginmanager_repositorydialog #settings_plugin_pluginmanager_repositorydialog_unavailable{overflow:hidden;width:100%;height:300px;background-image:url(../img/repo_unavailable.png);text-align:center;display:table}#settings_plugin_pluginmanager_repositorydialog #settings_plugin_pluginmanager_repositorydialog_unavailable div{display:table-cell;vertical-align:middle}#settings_plugin_pluginmanager_repositorydialog #settings_plugin_pluginmanager_repositorydialog_list{overflow:hidden;width:auto;height:300px}#settings_plugin_pluginmanager_repositorydialog #settings_plugin_pluginmanager_repositorydialog_list .entry{border-bottom:1px solid #ddd;padding:5px 10px 5px 5px}#settings_plugin_pluginmanager_workingdialog_output .message{font-weight:700}#settings_plugin_pluginmanager_workingdialog_output .error{font-weight:700;color:#900}#settings_plugin_pluginmanager_workingdialog_output .stdout{color:#333}#settings_plugin_pluginmanager_workingdialog_output .stderr{color:#900}#settings_plugin_pluginmanager_workingdialog_output .call{color:#009}
|
||||
table td.settings_plugin_plugin_manager_plugins_name,table th.settings_plugin_plugin_manager_plugins_name{text-overflow:ellipsis;text-align:left}table td.settings_plugin_plugin_manager_plugins_actions,table th.settings_plugin_plugin_manager_plugins_actions{text-align:center;width:80px}table td.settings_plugin_plugin_manager_plugins_actions a,table th.settings_plugin_plugin_manager_plugins_actions a{text-decoration:none;color:#000}table td.settings_plugin_plugin_manager_plugins_actions a.disabled,table th.settings_plugin_plugin_manager_plugins_actions a.disabled{color:#ccc;cursor:default}#settings_plugin_pluginmanager_repositorydialog h4{position:relative}#settings_plugin_pluginmanager_repositorydialog h4 a.dropdown-toggle{color:inherit;text-decoration:none;font-size:14px}#settings_plugin_pluginmanager_repositorydialog h4 ul.dropdown-menu{font-size:14px}#settings_plugin_pluginmanager_repositorydialog .form-search{text-align:center;margin-bottom:5px!important}#settings_plugin_pluginmanager_repositorydialog .form-inline{padding:5px 10px 5px 5px;margin-bottom:0}#settings_plugin_pluginmanager_repositorydialog .form-inline .help-block{margin-bottom:0;font-size:85%}#settings_plugin_pluginmanager_repositorydialog #settings_plugin_pluginmanager_repositorydialog_unavailable{overflow:hidden;width:100%;height:300px;background-image:url(../img/repo_unavailable.png);text-align:center;display:table}#settings_plugin_pluginmanager_repositorydialog #settings_plugin_pluginmanager_repositorydialog_unavailable div{display:table-cell;vertical-align:middle}#settings_plugin_pluginmanager_repositorydialog #settings_plugin_pluginmanager_repositorydialog_list{width:auto;height:300px;overflow-x:hidden;overflow-y:scroll;padding-right:2px}#settings_plugin_pluginmanager_repositorydialog #settings_plugin_pluginmanager_repositorydialog_list .entry{border-bottom:1px solid #ddd;padding:5px}#settings_plugin_pluginmanager_workingdialog_output .message{font-weight:700}#settings_plugin_pluginmanager_workingdialog_output .error{font-weight:700;color:#900}#settings_plugin_pluginmanager_workingdialog_output .stdout{color:#333}#settings_plugin_pluginmanager_workingdialog_output .stderr{color:#900}#settings_plugin_pluginmanager_workingdialog_output .call{color:#009}
|
||||
@@ -23,13 +23,6 @@ table {
|
||||
}
|
||||
|
||||
#settings_plugin_pluginmanager_repositorydialog {
|
||||
.slimScrollDiv {
|
||||
@scrollBar: 10px;
|
||||
|
||||
margin-bottom: 20px;
|
||||
padding-right: @scrollBar + 2px;
|
||||
}
|
||||
|
||||
h4 {
|
||||
position: relative;
|
||||
|
||||
@@ -75,14 +68,15 @@ table {
|
||||
}
|
||||
|
||||
#settings_plugin_pluginmanager_repositorydialog_list {
|
||||
overflow: hidden;
|
||||
width: auto;
|
||||
height: 300px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
padding-right: 2px;
|
||||
|
||||
.entry {
|
||||
border-bottom: 1px solid #ddd;
|
||||
padding: 5px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
</form>
|
||||
|
||||
<div data-bind="visible: repositoryAvailable()">
|
||||
<div id="settings_plugin_pluginmanager_repositorydialog_list" data-bind="slimScrolledForeach: {data: repositoryplugins.paginatedItems, slimscroll: {height: '306px', size: '10px', distance: 0, railVisible: true, alwaysVisible: true, scrollBy: '102px'} }">
|
||||
<div id="settings_plugin_pluginmanager_repositorydialog_list" data-bind="foreach: repositoryplugins.paginatedItems">
|
||||
<div class="entry">
|
||||
<div class="row-fluid">
|
||||
<div class="span9">
|
||||
@@ -245,57 +245,64 @@
|
||||
<form class="form-horizontal">
|
||||
<p>{% trans %}You should normally <strong>not</strong> have to change <strong>any</strong> of the following settings, they are purely provided for convenience here.{% endtrans %}</p>
|
||||
|
||||
<legend>{{ _('Plugin repository configuration') }}</legend>
|
||||
<fieldset>
|
||||
<legend>{{ _('Plugin repository configuration') }}</legend>
|
||||
|
||||
<div class="control-group" title="{{ _('URL of the Plugin Repository to use. You should normally not have to change this.') }}">
|
||||
<label class="control-label">{{ _('Repository URL') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: config_repositoryUrl">
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group" title="{{ _('How long to cache repository data, in minutes. You should normally not have to change this.') }}">
|
||||
<label class="control-label">{{ _('Repository cache TTL') }}</label>
|
||||
<div class="controls">
|
||||
<div class="input-append">
|
||||
<input type="number" class="input-mini" data-bind="value: config_repositoryTtl">
|
||||
<span class="add-on">min</span>
|
||||
<div class="control-group" title="{{ _('URL of the Plugin Repository to use. You should normally not have to change this.') }}">
|
||||
<label class="control-label">{{ _('Repository URL') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: config_repositoryUrl">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<legend>{{ _('Notices configuration') }}</legend>
|
||||
|
||||
<div class="control-group" title="{{ _('URL of the Notices source to use. You should normally not have to change this.') }}">
|
||||
<label class="control-label">{{ _('Notices URL') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: config_noticesUrl">
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group" title="{{ _('How long to cache notices, in minutes. You should normally not have to change this.') }}">
|
||||
<label class="control-label">{{ _('Notices cache TTL') }}</label>
|
||||
<div class="controls">
|
||||
<div class="input-append">
|
||||
<input type="number" class="input-mini" data-bind="value: config_noticesTtl">
|
||||
<span class="add-on">min</span>
|
||||
<div class="control-group" title="{{ _('How long to cache repository data, in minutes. You should normally not have to change this.') }}">
|
||||
<label class="control-label">{{ _('Repository cache TTL') }}</label>
|
||||
<div class="controls">
|
||||
<div class="input-append">
|
||||
<input type="number" class="input-mini" data-bind="value: config_repositoryTtl">
|
||||
<span class="add-on">min</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<legend>{{ _('pip configuration') }}</legend>
|
||||
<fieldset>
|
||||
<legend>{{ _('Notices configuration') }}</legend>
|
||||
|
||||
<div class="control-group" title="{{ _('Additional arguments for the pip command. You should normally not have to change this.') }}">
|
||||
<label class="control-label">{{ _('Additional arguments') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: config_pipAdditionalArgs">
|
||||
<div class="control-group" title="{{ _('URL of the Notices source to use. You should normally not have to change this.') }}">
|
||||
<label class="control-label">{{ _('Notices URL') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: config_noticesUrl">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: config_pipForceUser"> {{ _('Force the use of the <code>--user</code> flag with <code>pip install</code>') }}
|
||||
</label>
|
||||
<div class="control-group" title="{{ _('How long to cache notices, in minutes. You should normally not have to change this.') }}">
|
||||
<label class="control-label">{{ _('Notices cache TTL') }}</label>
|
||||
<div class="controls">
|
||||
<div class="input-append">
|
||||
<input type="number" class="input-mini" data-bind="value: config_noticesTtl">
|
||||
<span class="add-on">min</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{{ _('pip configuration') }}</legend>
|
||||
|
||||
<div class="control-group" title="{{ _('Additional arguments for the pip command. You should normally not have to change this.') }}">
|
||||
<label class="control-label">{{ _('Additional arguments') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" data-bind="value: config_pipAdditionalArgs">
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: config_pipForceUser"> {{ _('Force the use of the <code>--user</code> flag with <code>pip install</code>') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
+1
-1
@@ -2,6 +2,6 @@
|
||||
<label class="control-label">{{ _('OctoPrint Release Channel') }}</label>
|
||||
<div class="controls">
|
||||
<select data-bind="value: config_releaseChannel, options: config_availableReleaseChannels, optionsText: 'name', optionsValue: 'key'"></select>
|
||||
<span class="help-inline">{{ _('Make sure you have read <a href="%(url)s" target="_blank" rel="noreferrer noopener">"Using Release Channels"</a> before switching to a release channel other than "Stable"', url="https://github.com/foosel/OctoPrint/wiki/Using-Release-Channels") }}</span>
|
||||
<span class="help-inline">{{ _('Make sure you have read <a href="%(url)s" target="_blank" rel="noreferrer noopener">"How to use the release channels to help test release candidates"</a> before switching to a release channel other than "Stable"', url="https://faq.octoprint.org/using-release-channels") }}</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -5,9 +5,10 @@ __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agp
|
||||
__copyright__ = "Copyright (C) 2018 The OctoPrint Project - Released under terms of the AGPLv3 License"
|
||||
|
||||
|
||||
import monotonic
|
||||
import time
|
||||
|
||||
from octoprint.util import monotonic_time
|
||||
|
||||
def can_perform_update(target, check, online=True):
|
||||
return True
|
||||
|
||||
@@ -15,9 +16,9 @@ def can_perform_update(target, check, online=True):
|
||||
def perform_update(target, check, target_version, log_cb=None, online=True):
|
||||
duration = check.get("duration", 30)
|
||||
|
||||
now = monotonic.monotonic()
|
||||
now = monotonic_time()
|
||||
end = now + duration
|
||||
while now < end:
|
||||
log_cb(["{}s left...".format(end - now)], prefix=">", stream="output")
|
||||
time.sleep(5)
|
||||
now = monotonic.monotonic()
|
||||
now = monotonic_time()
|
||||
@@ -29,6 +29,7 @@ class VirtualPrinter(object):
|
||||
prepare_ok_regex = re.compile("prepare_ok (.*)")
|
||||
send_regex = re.compile("send (.*)")
|
||||
set_ambient_regex = re.compile("set_ambient ([-+]?[0-9]*\.?[0-9]+)")
|
||||
start_sd_regex = re.compile("start_sd (.*)")
|
||||
|
||||
def __init__(self, seriallog_handler=None, read_timeout=5.0, write_timeout=10.0):
|
||||
import logging
|
||||
@@ -102,10 +103,12 @@ class VirtualPrinter(object):
|
||||
self._selectedSdFile = None
|
||||
self._selectedSdFileSize = None
|
||||
self._selectedSdFilePos = None
|
||||
|
||||
self._writingToSd = False
|
||||
self._writingToSdHandle = None
|
||||
self._newSdFilePos = None
|
||||
self._heatupThread = None
|
||||
|
||||
self._heatingUp = False
|
||||
|
||||
self._okBeforeCommandOutput = settings().getBoolean(["devel", "virtualPrinter", "okBeforeCommandOutput"])
|
||||
self._supportM112 = settings().getBoolean(["devel", "virtualPrinter", "supportM112"])
|
||||
@@ -164,6 +167,74 @@ class VirtualPrinter(object):
|
||||
return "VIRTUAL(read_timeout={read_timeout},write_timeout={write_timeout},options={options})"\
|
||||
.format(read_timeout=self._read_timeout, write_timeout=self._write_timeout, options=settings().get(["devel", "virtualPrinter"]))
|
||||
|
||||
def _reset(self):
|
||||
self._clearQueue(self.incoming)
|
||||
self._clearQueue(self.outgoing)
|
||||
self._clearQueue(self.buffered)
|
||||
|
||||
self._relative = True
|
||||
self._lastX = 0.0
|
||||
self._lastY = 0.0
|
||||
self._lastZ = 0.0
|
||||
self._lastE = [0.0] * self.extruderCount
|
||||
self._lastF = 200
|
||||
|
||||
self._unitModifier = 1
|
||||
self._feedrate_multiplier = 100
|
||||
self._flowrate_multiplier = 100
|
||||
|
||||
self._sdCardReady = True
|
||||
self._sdPrinting = False
|
||||
if self._sdPrinter:
|
||||
self._sdPrinting = False
|
||||
self._sdPrintingSemaphore.set()
|
||||
self._sdPrinter = None
|
||||
self._selectedSdFile = None
|
||||
self._selectedSdFileSize = None
|
||||
self._selectedSdFilePos = None
|
||||
|
||||
if self._writingToSdHandle:
|
||||
try:
|
||||
self._writingToSdHandle.close()
|
||||
except:
|
||||
pass
|
||||
self._writingToSd = False
|
||||
self._writingToSdHandle = None
|
||||
self._newSdFilePos = None
|
||||
|
||||
self._heatingUp = False
|
||||
|
||||
self.currentLine = 0
|
||||
self.lastN = 0
|
||||
|
||||
self._debug_awol = False
|
||||
self._debug_sleep = None
|
||||
self._sleepAfterNext.clear()
|
||||
self._sleepAfter.clear()
|
||||
|
||||
self._dont_answer = False
|
||||
|
||||
self._debug_drop_connection = False
|
||||
|
||||
self._killed = False
|
||||
|
||||
self._triggerResendAt100 = True
|
||||
self._triggerResendWithTimeoutAt105 = True
|
||||
self._triggerResendWithMissingLinenoAt110 = True
|
||||
self._triggerResendWithChecksumMismatchAt115 = True
|
||||
|
||||
if self._temperature_reporter is not None:
|
||||
self._temperature_reporter.cancel()
|
||||
self._temperature_reporter = None
|
||||
|
||||
if self._sdstatus_reporter is not None:
|
||||
self._sdstatus_reporter.cancel()
|
||||
self._sdstatus_reporter = None
|
||||
|
||||
if settings().getBoolean(["devel", "virtualPrinter", "simulateReset"]):
|
||||
for item in settings().get(["devel", "virtualPrinter", "resetLines"]):
|
||||
self._send(item + "\n")
|
||||
|
||||
@property
|
||||
def timeout(self):
|
||||
return self._read_timeout
|
||||
@@ -182,9 +253,10 @@ class VirtualPrinter(object):
|
||||
self._logger.debug("Setting write timeout to {}s".format(value))
|
||||
self._write_timeout = value
|
||||
|
||||
def _clearQueue(self, queue):
|
||||
def _clearQueue(self, q):
|
||||
try:
|
||||
while queue.get(block=False):
|
||||
while q.get(block=False):
|
||||
q.task_done()
|
||||
continue
|
||||
except queue.Empty:
|
||||
pass
|
||||
@@ -195,6 +267,10 @@ class VirtualPrinter(object):
|
||||
while self.incoming is not None and not self._killed:
|
||||
self._simulateTemps()
|
||||
|
||||
if self._heatingUp:
|
||||
time.sleep(1)
|
||||
continue
|
||||
|
||||
try:
|
||||
data = self.incoming.get(timeout=0.01)
|
||||
self.incoming.task_done()
|
||||
@@ -294,7 +370,7 @@ class VirtualPrinter(object):
|
||||
continue
|
||||
|
||||
# shortcut for writing to SD
|
||||
if self._writingToSdHandle is not None and not "M29" in data:
|
||||
if self._writingToSd and self._writingToSdHandle is not None and not "M29" in data:
|
||||
self._writingToSdHandle.write(data)
|
||||
self._sendOk()
|
||||
continue
|
||||
@@ -658,10 +734,19 @@ class VirtualPrinter(object):
|
||||
sleep_after_next <str:command> <int:seconds>
|
||||
| Sleeps <seconds> s after execution of next <command>
|
||||
|
||||
# SD printing
|
||||
|
||||
start_sd <str:file>
|
||||
| Start printing file <file> from SD
|
||||
cancel_sd
|
||||
| Cancels an ongoing SD print
|
||||
|
||||
# Misc
|
||||
|
||||
send <str:message>
|
||||
| Sends back <message>
|
||||
reset
|
||||
| Simulates a reset. Internal state will be lost.
|
||||
"""
|
||||
for line in usage.split("\n"):
|
||||
self._send("echo: {}".format(line.strip()))
|
||||
@@ -683,6 +768,8 @@ class VirtualPrinter(object):
|
||||
self._prepared_errors.append(lambda cur, last, line: self._send(self._error("lineno_missing", last)))
|
||||
elif data == "drop_connection":
|
||||
self._debug_drop_connection = True
|
||||
elif data == "reset":
|
||||
self._reset()
|
||||
elif data == "mintemp_error":
|
||||
self._send(self._error("mintemp"))
|
||||
elif data == "maxtemp_error":
|
||||
@@ -690,6 +777,13 @@ class VirtualPrinter(object):
|
||||
elif data == "go_awol":
|
||||
self._send("// Going AWOL")
|
||||
self._debug_awol = True
|
||||
elif data == "cancel_sd":
|
||||
if self._sdPrinting and self._sdPrinter:
|
||||
self._pauseSdPrint()
|
||||
self._sdPrinting = False
|
||||
self._sdPrintingSemaphore.set()
|
||||
self._sdPrinter.join()
|
||||
self._finishSdPrint()
|
||||
else:
|
||||
try:
|
||||
sleep_match = VirtualPrinter.sleep_regex.match(data)
|
||||
@@ -699,6 +793,7 @@ class VirtualPrinter(object):
|
||||
prepare_ok_match = VirtualPrinter.prepare_ok_regex.match(data)
|
||||
send_match = VirtualPrinter.send_regex.match(data)
|
||||
set_ambient_match = VirtualPrinter.set_ambient_regex.match(data)
|
||||
start_sd_match = VirtualPrinter.start_sd_regex.match(data)
|
||||
|
||||
if sleep_match is not None:
|
||||
interval = int(sleep_match.group(1))
|
||||
@@ -727,6 +822,9 @@ class VirtualPrinter(object):
|
||||
elif set_ambient_match is not None:
|
||||
self._ambient_temperature = float(set_ambient_match.group(1))
|
||||
self._send("// set ambient temperature to {}".format(self._ambient_temperature))
|
||||
elif start_sd_match is not None:
|
||||
self._selectSdFile(start_sd_match.group(1))
|
||||
self._startSdPrint()
|
||||
except:
|
||||
pass
|
||||
|
||||
@@ -764,6 +862,7 @@ class VirtualPrinter(object):
|
||||
def _startSdPrint(self):
|
||||
if self._selectedSdFile is not None:
|
||||
if self._sdPrinter is None:
|
||||
self._sdPrinting = True
|
||||
self._sdPrinter = threading.Thread(target=self._sdPrintingWorker)
|
||||
self._sdPrinter.start()
|
||||
self._sdPrintingSemaphore.set()
|
||||
@@ -877,7 +976,7 @@ class VirtualPrinter(object):
|
||||
matchE = re.search("E([0-9.]+)", line)
|
||||
matchF = re.search("F([0-9.]+)", line)
|
||||
|
||||
duration = 0
|
||||
duration = 0.0
|
||||
if matchF is not None:
|
||||
try:
|
||||
self._lastF = float(matchF.group(1))
|
||||
@@ -946,6 +1045,7 @@ class VirtualPrinter(object):
|
||||
pass
|
||||
|
||||
if duration:
|
||||
duration *= 0.1
|
||||
if duration > self._read_timeout:
|
||||
slept = 0
|
||||
while duration - slept > self._read_timeout and not self._killed:
|
||||
@@ -1025,7 +1125,7 @@ class VirtualPrinter(object):
|
||||
try:
|
||||
with open(self._selectedSdFile, "r") as f:
|
||||
for line in iter(f.readline, ""):
|
||||
if self._killed:
|
||||
if self._killed or not self._sdPrinting:
|
||||
break
|
||||
|
||||
# reset position if requested by client
|
||||
@@ -1038,12 +1138,14 @@ class VirtualPrinter(object):
|
||||
|
||||
# if we are paused, wait for unpausing
|
||||
self._sdPrintingSemaphore.wait()
|
||||
if self._killed or not self._sdPrinting:
|
||||
break
|
||||
|
||||
# set target temps
|
||||
if 'M104' in line or 'M109' in line:
|
||||
self._parseHotendCommand(line)
|
||||
self._parseHotendCommand(line, wait='M109' in line)
|
||||
elif 'M140' in line or 'M190' in line:
|
||||
self._parseBedCommand(line)
|
||||
self._parseBedCommand(line, wait='M190' in line)
|
||||
elif line.startswith("G0") or line.startswith("G1") or line.startswith("G2") or line.startswith("G3"):
|
||||
# simulate reprap buffered commands via a Queue with maxsize which internally simulates the moves
|
||||
self.buffered.put(line)
|
||||
@@ -1052,9 +1154,13 @@ class VirtualPrinter(object):
|
||||
if self.outgoing is not None:
|
||||
raise
|
||||
|
||||
self._finishSdPrint()
|
||||
|
||||
def _finishSdPrint(self):
|
||||
if not self._killed:
|
||||
self._sdPrintingSemaphore.clear()
|
||||
self._selectedSdFilePos = 0
|
||||
self._sdPrinting = False
|
||||
self._sdPrinter = None
|
||||
self._output("Done printing file")
|
||||
|
||||
@@ -1063,6 +1169,7 @@ class VirtualPrinter(object):
|
||||
delay = 1
|
||||
last_busy = time.time()
|
||||
|
||||
self._heatingUp = True
|
||||
try:
|
||||
if heater.startswith("tool"):
|
||||
toolNum = int(heater[len("tool"):])
|
||||
@@ -1074,7 +1181,7 @@ class VirtualPrinter(object):
|
||||
else:
|
||||
return
|
||||
|
||||
while not self._killed and test():
|
||||
while not self._killed and self._heatingUp and test():
|
||||
self._simulateTemps(delta=delta)
|
||||
self._output(output())
|
||||
if self._sendBusy and time.time() - last_busy >= self._busyInterval:
|
||||
@@ -1084,6 +1191,8 @@ class VirtualPrinter(object):
|
||||
except AttributeError:
|
||||
if self.outgoing is not None:
|
||||
raise
|
||||
finally:
|
||||
self._heatingUp = False
|
||||
|
||||
def _deleteSdFile(self, filename):
|
||||
if filename.startswith("/"):
|
||||
@@ -1246,6 +1355,10 @@ class CharCountingQueue(queue.Queue):
|
||||
self._size = 0
|
||||
self._name = name
|
||||
|
||||
def clear(self):
|
||||
with self.mutex:
|
||||
self.queue.clear()
|
||||
|
||||
def put(self, item, block=True, timeout=None, partial=False):
|
||||
self.not_full.acquire()
|
||||
|
||||
|
||||
@@ -555,11 +555,11 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
|
||||
return self._comm.getStateId(state=state)
|
||||
|
||||
def get_current_data(self, *args, **kwargs):
|
||||
return self._stateMonitor.get_current_data()
|
||||
return util.thaw_frozendict(self._stateMonitor.get_current_data())
|
||||
|
||||
def get_current_job(self, *args, **kwargs):
|
||||
currentData = self._stateMonitor.get_current_data()
|
||||
return currentData["job"]
|
||||
return util.thaw_frozendict(currentData["job"])
|
||||
|
||||
def get_current_temperatures(self, *args, **kwargs):
|
||||
if self._comm is not None:
|
||||
@@ -1054,17 +1054,22 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
|
||||
with self._selectedFileMutex:
|
||||
if self._selectedFile is not None:
|
||||
if state == comm.MachineCom.STATE_CLOSED or state == comm.MachineCom.STATE_ERROR or state == comm.MachineCom.STATE_CLOSED_WITH_ERROR:
|
||||
def log_print():
|
||||
self._fileManager.log_print(FileDestinations.SDCARD if self._selectedFile["sd"] else FileDestinations.LOCAL,
|
||||
self._selectedFile["filename"],
|
||||
time.time(),
|
||||
self._comm.getPrintTime(),
|
||||
False,
|
||||
self._printerProfileManager.get_current_or_default()["id"])
|
||||
payload = self._payload_for_print_job_event()
|
||||
if payload:
|
||||
payload["time"] = self._comm.getPrintTime()
|
||||
|
||||
thread = threading.Thread(target=log_print)
|
||||
thread.daemon = True
|
||||
thread.start()
|
||||
def finalize():
|
||||
self._fileManager.log_print(payload["origin"],
|
||||
payload["path"],
|
||||
time.time(),
|
||||
payload["time"],
|
||||
False,
|
||||
self._printerProfileManager.get_current_or_default()["id"])
|
||||
eventManager().fire(Events.PRINT_FAILED, payload)
|
||||
|
||||
thread = threading.Thread(target=finalize)
|
||||
thread.daemon = True
|
||||
thread.start()
|
||||
self._analysisQueue.resume() # printing done, put those cpu cycles to good use
|
||||
elif state == comm.MachineCom.STATE_PRINTING:
|
||||
self._analysisQueue.pause() # do not analyse files while printing
|
||||
@@ -1176,7 +1181,8 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
|
||||
|
||||
def on_comm_print_job_failed(self):
|
||||
payload = self._payload_for_print_job_event()
|
||||
eventManager().fire(Events.PRINT_FAILED, payload)
|
||||
if payload:
|
||||
eventManager().fire(Events.PRINT_FAILED, payload)
|
||||
|
||||
def on_comm_print_job_cancelling(self, firmware_error=None):
|
||||
payload = self._payload_for_print_job_event()
|
||||
|
||||
@@ -244,6 +244,8 @@ class Server(object):
|
||||
pluginManager = self._plugin_manager
|
||||
|
||||
# monkey patch some stuff
|
||||
util.sockjs.fix_tornado5_compatibility()
|
||||
util.tornado.fix_json_encode()
|
||||
util.flask.enable_additional_translations(additional_folders=[self._settings.getBaseFolder("translations")])
|
||||
|
||||
# setup app
|
||||
@@ -675,7 +677,15 @@ class Server(object):
|
||||
self._stop_intermediary_server()
|
||||
|
||||
# initialize and bind the server
|
||||
self._server = util.tornado.CustomHTTPServer(self._tornado_app, max_body_sizes=max_body_sizes, default_max_body_size=self._settings.getInt(["server", "maxSize"]))
|
||||
trusted_downstream = self._settings.get(["server", "reverseProxy", "trustedDownstream"])
|
||||
if not isinstance(trusted_downstream, list):
|
||||
self._logger.warn("server.reverseProxy.trustedDownstream is not a list, skipping")
|
||||
trusted_downstreams = []
|
||||
self._server = util.tornado.CustomHTTPServer(self._tornado_app,
|
||||
max_body_sizes=max_body_sizes,
|
||||
default_max_body_size=self._settings.getInt(["server", "maxSize"]),
|
||||
xheaders=True,
|
||||
trusted_downstream=trusted_downstream)
|
||||
self._server.listen(self._port, address=self._host)
|
||||
|
||||
### From now on it's ok to launch subprocesses again
|
||||
@@ -843,7 +853,7 @@ class Server(object):
|
||||
|
||||
def _setup_app(self, app):
|
||||
from octoprint.server.util.flask import ReverseProxiedEnvironment, OctoPrintFlaskRequest, \
|
||||
OctoPrintFlaskResponse, OctoPrintJsonEncoder
|
||||
OctoPrintFlaskResponse, OctoPrintJsonEncoder, OctoPrintSessionInterface
|
||||
|
||||
s = settings()
|
||||
|
||||
@@ -880,6 +890,7 @@ class Server(object):
|
||||
OctoPrintFlaskRequest.environment_wrapper = reverse_proxied
|
||||
app.request_class = OctoPrintFlaskRequest
|
||||
app.response_class = OctoPrintFlaskResponse
|
||||
app.session_interface = OctoPrintSessionInterface()
|
||||
|
||||
@app.before_request
|
||||
def before_request():
|
||||
@@ -1375,25 +1386,13 @@ class Server(object):
|
||||
js_filters = ["sourcemap_remove", "js_delimiter_bundler"]
|
||||
js_plugin_filters = ["sourcemap_remove", "js_delimiter_bundler"]
|
||||
|
||||
if self._settings.getBoolean(["feature", "legacyPluginAssets"]):
|
||||
# TODO remove again in 1.3.8
|
||||
def js_bundles_for_plugins(collection, filters=None):
|
||||
"""Produces Bundle instances"""
|
||||
result = OrderedDict()
|
||||
for plugin, assets in collection.items():
|
||||
if len(assets):
|
||||
result[plugin] = Bundle(*assets, filters=filters)
|
||||
return result
|
||||
|
||||
else:
|
||||
def js_bundles_for_plugins(collection, filters=None):
|
||||
"""Produces JsPluginBundle instances that output IIFE wrapped assets"""
|
||||
result = OrderedDict()
|
||||
for plugin, assets in collection.items():
|
||||
if len(assets):
|
||||
result[plugin] = JsPluginBundle(plugin, *assets, filters=filters)
|
||||
return result
|
||||
|
||||
def js_bundles_for_plugins(collection, filters=None):
|
||||
"""Produces JsPluginBundle instances that output IIFE wrapped assets"""
|
||||
result = OrderedDict()
|
||||
for plugin, assets in collection.items():
|
||||
if len(assets):
|
||||
result[plugin] = JsPluginBundle(plugin, *assets, filters=filters)
|
||||
return result
|
||||
|
||||
js_core = dynamic_core_assets["js"] + \
|
||||
all_assets_for_plugins(dynamic_plugin_assets["bundled"]["js"]) + \
|
||||
@@ -1500,6 +1499,10 @@ class Server(object):
|
||||
assets.register("less_app", less_app_bundle)
|
||||
|
||||
def _setup_login_manager(self):
|
||||
util.flask.fix_flask_login_remote_address()
|
||||
|
||||
global loginManager
|
||||
|
||||
loginManager = LoginManager()
|
||||
loginManager.session_protection = "strong"
|
||||
loginManager.user_callback = load_user
|
||||
|
||||
@@ -124,8 +124,7 @@ def getSettings():
|
||||
"modelSizeDetection": s.getBoolean(["feature", "modelSizeDetection"]),
|
||||
"printCancelConfirmation": s.getBoolean(["feature", "printCancelConfirmation"]),
|
||||
"g90InfluencesExtruder": s.getBoolean(["feature", "g90InfluencesExtruder"]),
|
||||
"autoUppercaseBlacklist": s.get(["feature", "autoUppercaseBlacklist"]),
|
||||
"legacyPluginAssets": s.getBoolean(["feature", "legacyPluginAssets"])
|
||||
"autoUppercaseBlacklist": s.get(["feature", "autoUppercaseBlacklist"])
|
||||
},
|
||||
"serial": {
|
||||
"port": connectionOptions["portPreference"],
|
||||
@@ -142,6 +141,7 @@ def getSettings():
|
||||
"timeoutTemperatureAutoreport": s.getFloat(["serial", "timeout", "temperatureAutoreport"]),
|
||||
"timeoutSdStatus": s.getFloat(["serial", "timeout", "sdStatus"]),
|
||||
"timeoutSdStatusAutoreport": s.getFloat(["serial", "timeout", "sdStatusAutoreport"]),
|
||||
"timeoutBaudrateDetectionPause": s.getFloat(["serial", "timeout", "baudrateDetectionPause"]),
|
||||
"log": s.getBoolean(["serial", "log"]),
|
||||
"additionalPorts": s.get(["serial", "additionalPorts"]),
|
||||
"additionalBaudrates": s.get(["serial", "additionalBaudrates"]),
|
||||
@@ -363,7 +363,6 @@ def _saveSettings(data):
|
||||
if "modelSizeDetection" in data["feature"]: s.setBoolean(["feature", "modelSizeDetection"], data["feature"]["modelSizeDetection"])
|
||||
if "printCancelConfirmation" in data["feature"]: s.setBoolean(["feature", "printCancelConfirmation"], data["feature"]["printCancelConfirmation"])
|
||||
if "g90InfluencesExtruder" in data["feature"]: s.setBoolean(["feature", "g90InfluencesExtruder"], data["feature"]["g90InfluencesExtruder"])
|
||||
if "legacyPluginAssets" in data["feature"]: s.setBoolean(["feature", "legacyPluginAssets"], data["feature"]["legacyPluginAssets"])
|
||||
if "autoUppercaseBlacklist" in data["feature"] and isinstance(data["feature"]["autoUppercaseBlacklist"], (list, tuple)): s.set(["feature", "autoUppercaseBlacklist"], data["feature"]["autoUppercaseBlacklist"])
|
||||
|
||||
if "serial" in data.keys():
|
||||
@@ -379,6 +378,7 @@ def _saveSettings(data):
|
||||
if "timeoutTemperatureAutoreport" in data["serial"]: s.setFloat(["serial", "timeout", "temperatureAutoreport"], data["serial"]["timeoutTemperatureAutoreport"])
|
||||
if "timeoutSdStatus" in data["serial"]: s.setFloat(["serial", "timeout", "sdStatus"], data["serial"]["timeoutSdStatus"])
|
||||
if "timeoutSdStatusAutoreport" in data["serial"]: s.setFloat(["serial", "timeout", "sdStatusAutoreport"], data["serial"]["timeoutSdStatusAutoreport"])
|
||||
if "timeoutBaudrateDetectionPause" in data["serial"]: s.setFloat(["serial", "timeout", "baudrateDetectionPause"], data["serial"]["timeoutBaudrateDetectionPause"])
|
||||
if "additionalPorts" in data["serial"] and isinstance(data["serial"]["additionalPorts"], (list, tuple)): s.set(["serial", "additionalPorts"], data["serial"]["additionalPorts"])
|
||||
if "additionalBaudrates" in data["serial"] and isinstance(data["serial"]["additionalBaudrates"], (list, tuple)): s.set(["serial", "additionalBaudrates"], data["serial"]["additionalBaudrates"])
|
||||
if "longRunningCommands" in data["serial"] and isinstance(data["serial"]["longRunningCommands"], (list, tuple)): s.set(["serial", "longRunningCommands"], data["serial"]["longRunningCommands"])
|
||||
@@ -430,7 +430,16 @@ def _saveSettings(data):
|
||||
if "watched" in data["folder"]: s.setBaseFolder("watched", data["folder"]["watched"])
|
||||
|
||||
if "temperature" in data.keys():
|
||||
if "profiles" in data["temperature"]: s.set(["temperature", "profiles"], data["temperature"]["profiles"])
|
||||
if "profiles" in data["temperature"]:
|
||||
result = []
|
||||
for profile in data["temperature"]["profiles"]:
|
||||
try:
|
||||
profile["bed"] = int(profile["bed"])
|
||||
profile["extruder"] = int(profile["extruder"])
|
||||
except ValueError:
|
||||
pass
|
||||
result.append(profile)
|
||||
s.set(["temperature", "profiles"], result)
|
||||
if "cutoff" in data["temperature"]:
|
||||
try:
|
||||
cutoff = int(data["temperature"]["cutoff"])
|
||||
|
||||
@@ -75,6 +75,8 @@ def loginFromApiKeyRequestHandler():
|
||||
if not loginUser(user):
|
||||
return _flask.make_response("Invalid API key", 403)
|
||||
|
||||
_flask.g.login_via_apikey = True
|
||||
|
||||
|
||||
def loginFromAuthorizationHeaderRequestHandler():
|
||||
"""
|
||||
|
||||
@@ -499,6 +499,14 @@ class OctoPrintFlaskResponse(flask.Response):
|
||||
flask.Response.set_cookie(self, key, expires=0, max_age=0, path=path, domain=domain)
|
||||
|
||||
|
||||
class OctoPrintSessionInterface(flask.sessions.SecureCookieSessionInterface):
|
||||
|
||||
def save_session(self, app, session, response):
|
||||
if flask.g.get("login_via_apikey", False):
|
||||
return
|
||||
return super(OctoPrintSessionInterface, self).save_session(app, session, response)
|
||||
|
||||
|
||||
#~~ passive login helper
|
||||
|
||||
def passive_login():
|
||||
@@ -1422,4 +1430,7 @@ def collect_plugin_assets(enable_gcodeviewer=True, preferred_stylesheet="css"):
|
||||
|
||||
class OctoPrintJsonEncoder(flask.json.JSONEncoder):
|
||||
def default(self, obj):
|
||||
return JsonEncoding.encode(obj)
|
||||
try:
|
||||
return JsonEncoding.encode(obj)
|
||||
except TypeError:
|
||||
return flask.json.JSONEncoder.default(self, obj)
|
||||
@@ -30,6 +30,100 @@ import wrapt
|
||||
import json
|
||||
|
||||
|
||||
def fix_tornado5_compatibility():
|
||||
"""
|
||||
Monkey patches sockjs tornado dependency to fix tornado 5.x compatibility
|
||||
|
||||
See https://github.com/mrjoes/sockjs-tornado/issues/113 for reason.
|
||||
|
||||
We need to first patch StatsCollector since that also gets used by SockJSRouter.
|
||||
"""
|
||||
|
||||
import sockjs.tornado.router
|
||||
import sockjs.tornado.stats
|
||||
from tornado import ioloop, version_info
|
||||
|
||||
def fixed_stats_init(self, io_loop):
|
||||
### Copied from sockjs.tornado.stats.StatsCollector.__init__
|
||||
|
||||
# Sessions
|
||||
self.sess_active = 0
|
||||
|
||||
# Avoid circular reference
|
||||
self.sess_transports = dict()
|
||||
|
||||
# Connections
|
||||
self.conn_active = 0
|
||||
self.conn_ps = sockjs.tornado.stats.MovingAverage()
|
||||
|
||||
# Packets
|
||||
self.pack_sent_ps = sockjs.tornado.stats.MovingAverage()
|
||||
self.pack_recv_ps = sockjs.tornado.stats.MovingAverage()
|
||||
|
||||
self._callback = ioloop.PeriodicCallback(self._update,
|
||||
1000)
|
||||
self._callback.start()
|
||||
|
||||
sockjs.tornado.stats.StatsCollector.__init__ = fixed_stats_init
|
||||
|
||||
def fixed_router_init(self, connection, prefix="", user_settings=dict(), io_loop=None, session_kls=None):
|
||||
### Copied from sockjs.tornado.router.SockJSRouter.__init__
|
||||
|
||||
# TODO: Version check
|
||||
if version_info[0] < 2:
|
||||
raise Exception('sockjs-tornado requires Tornado 2.0 or higher.')
|
||||
|
||||
# Store connection class
|
||||
self._connection = connection
|
||||
|
||||
# Initialize io_loop
|
||||
self.io_loop = io_loop or ioloop.IOLoop.instance()
|
||||
|
||||
# Settings
|
||||
self.settings = sockjs.tornado.router.DEFAULT_SETTINGS.copy()
|
||||
if user_settings:
|
||||
self.settings.update(user_settings)
|
||||
|
||||
self.websockets_enabled = 'websocket' not in self.settings['disabled_transports']
|
||||
self.cookie_needed = self.settings['jsessionid']
|
||||
|
||||
# Sessions
|
||||
self._session_kls = session_kls if session_kls else sockjs.tornado.router.session.Session
|
||||
self._sessions = sockjs.tornado.router.sessioncontainer.SessionContainer()
|
||||
|
||||
check_interval = self.settings['session_check_interval'] * 1000
|
||||
self._sessions_cleanup = ioloop.PeriodicCallback(self._sessions.expire,
|
||||
check_interval)
|
||||
self._sessions_cleanup.start()
|
||||
|
||||
# Stats
|
||||
self.stats = sockjs.tornado.stats.StatsCollector(self.io_loop)
|
||||
|
||||
# Initialize URLs
|
||||
base = prefix + r'/[^/.]+/(?P<session_id>[^/.]+)'
|
||||
|
||||
# Generate global handler URLs
|
||||
self._transport_urls = [('%s/%s$' % (base, p[0]), p[1], dict(server=self))
|
||||
for p in sockjs.tornado.router.GLOBAL_HANDLERS]
|
||||
|
||||
for k, v in sockjs.tornado.router.TRANSPORTS.items():
|
||||
if k in self.settings['disabled_transports']:
|
||||
continue
|
||||
|
||||
# Only version 1 is supported
|
||||
self._transport_urls.append(
|
||||
(r'%s/%s$' % (base, k),
|
||||
v,
|
||||
dict(server=self))
|
||||
)
|
||||
|
||||
# Generate static URLs
|
||||
self._transport_urls.extend([('%s%s' % (prefix, k), v, dict(server=self))
|
||||
for k, v in sockjs.tornado.router.STATIC_HANDLERS.items()])
|
||||
|
||||
sockjs.tornado.router.SockJSRouter.__init__ = fixed_router_init
|
||||
|
||||
|
||||
class ThreadSafeSession(sockjs.tornado.session.Session):
|
||||
def __init__(self, conn, server, session_id, expiry=None):
|
||||
sockjs.tornado.session.Session.__init__(self, conn, server, session_id, expiry=expiry)
|
||||
@@ -59,15 +153,7 @@ class ThreadSafeSession(sockjs.tornado.session.Session):
|
||||
|
||||
|
||||
class JsonEncodingSessionWrapper(wrapt.ObjectProxy):
|
||||
|
||||
def send_message(self, msg, stats=True, binary=False):
|
||||
"""Send or queue outgoing message
|
||||
|
||||
`msg`
|
||||
Message to send
|
||||
`stats`
|
||||
If set to True, will update statistics after operation completes
|
||||
"""
|
||||
self.send_jsonified(json.dumps(sockjs.tornado.util.bytes_to_str(msg),
|
||||
separators=(',', ':'),
|
||||
default=JsonEncoding.encode),
|
||||
@@ -78,7 +164,8 @@ class PrinterStateConnection(sockjs.tornado.SockJSConnection,
|
||||
octoprint.printer.PrinterCallback,
|
||||
LoginStatusListener):
|
||||
def __init__(self, printer, fileManager, analysisQueue, userManager, groupManager, eventManager, pluginManager, session):
|
||||
session = JsonEncodingSessionWrapper(session)
|
||||
if isinstance(session, sockjs.tornado.session.Session):
|
||||
session = JsonEncodingSessionWrapper(session)
|
||||
sockjs.tornado.SockJSConnection.__init__(self, session)
|
||||
|
||||
self._logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -26,6 +26,22 @@ import octoprint.util
|
||||
|
||||
|
||||
|
||||
def fix_json_encode():
|
||||
"""
|
||||
This makes tornado.escape.json_encode use octoprint.util.JsonEncoding.encode as fallback in order to allow
|
||||
serialization of globally registered types like frozendict and others.
|
||||
"""
|
||||
|
||||
from octoprint.util.json import JsonEncoding
|
||||
import json
|
||||
|
||||
def fixed_json_encode(value):
|
||||
return json.dumps(value, default=JsonEncoding.encode).replace("</", "<\\/")
|
||||
|
||||
import tornado.escape
|
||||
tornado.escape.json_encode = fixed_json_encode
|
||||
|
||||
|
||||
#~~ More sensible logging
|
||||
|
||||
|
||||
@@ -695,7 +711,8 @@ class CustomHTTPServer(tornado.httpserver.HTTPServer):
|
||||
|
||||
def handle_stream(self, stream, address):
|
||||
context = tornado.httpserver._HTTPRequestContext(stream, address,
|
||||
self.protocol)
|
||||
self.protocol,
|
||||
self.trusted_downstream)
|
||||
conn = CustomHTTP1ServerConnection(stream, self.conn_params, context)
|
||||
self._connections.add(conn)
|
||||
conn.start_serving(self)
|
||||
@@ -742,6 +759,9 @@ class CustomHTTP1Connection(tornado.http1connection.HTTP1Connection):
|
||||
"""
|
||||
|
||||
def __init__(self, stream, is_client, params=None, context=None):
|
||||
if params is None:
|
||||
params = CustomHTTP1ConnectionParameters()
|
||||
|
||||
tornado.http1connection.HTTP1Connection.__init__(self, stream, is_client, params=params, context=context)
|
||||
|
||||
import re
|
||||
|
||||
@@ -91,7 +91,7 @@ default_settings = {
|
||||
"autoconnect": False,
|
||||
"log": False,
|
||||
"timeout": {
|
||||
"detection": 0.5,
|
||||
"detection": 1,
|
||||
"connection": 10,
|
||||
"communication": 30,
|
||||
"communicationBusy": 3,
|
||||
@@ -100,7 +100,8 @@ default_settings = {
|
||||
"temperatureAutoreport": 2,
|
||||
"sdStatus": 1,
|
||||
"sdStatusAutoreport": 1,
|
||||
"resendOk": .5
|
||||
"resendOk": .5,
|
||||
"baudrateDetectionPause": 1.0
|
||||
},
|
||||
"maxCommunicationTimeouts": {
|
||||
"idle": 2,
|
||||
@@ -163,7 +164,8 @@ default_settings = {
|
||||
"schemeFallback": None,
|
||||
"hostFallback": None,
|
||||
"serverFallback": None,
|
||||
"portFallback": None
|
||||
"portFallback": None,
|
||||
"trustedDownstream": []
|
||||
},
|
||||
"uploads": {
|
||||
"maxSize": 1 * 1024 * 1024 * 1024, # 1GB
|
||||
@@ -237,8 +239,7 @@ default_settings = {
|
||||
"modelSizeDetection": True,
|
||||
"printCancelConfirmation": True,
|
||||
"autoUppercaseBlacklist": ["M117"],
|
||||
"g90InfluencesExtruder": False,
|
||||
"legacyPluginAssets": False # TODO remove again in 1.3.8
|
||||
"g90InfluencesExtruder": False
|
||||
},
|
||||
"folder": {
|
||||
"uploads": None,
|
||||
@@ -923,7 +924,8 @@ class Settings(object):
|
||||
self._migrate_gcode_scripts,
|
||||
self._migrate_core_system_commands,
|
||||
self._migrate_serial_features,
|
||||
self._migrate_resend_without_ok
|
||||
self._migrate_resend_without_ok,
|
||||
self._migrate_string_temperature_profile_values
|
||||
)
|
||||
|
||||
for migrate in migrators:
|
||||
@@ -935,6 +937,8 @@ class Settings(object):
|
||||
def _migrate_gcode_scripts(self, config):
|
||||
"""
|
||||
Migrates an old development version of gcode scripts to the new template based format.
|
||||
|
||||
Added in 1.2.0
|
||||
"""
|
||||
|
||||
dirty = False
|
||||
@@ -959,6 +963,8 @@ class Settings(object):
|
||||
def _migrate_printer_parameters(self, config):
|
||||
"""
|
||||
Migrates the old "printer > parameters" data structure to the new printer profile mechanism.
|
||||
|
||||
Added in 1.2.0
|
||||
"""
|
||||
default_profile = config["printerProfiles"]["defaultProfile"] if "printerProfiles" in config and "defaultProfile" in config["printerProfiles"] else dict()
|
||||
dirty = False
|
||||
@@ -1024,6 +1030,8 @@ class Settings(object):
|
||||
"""
|
||||
Migrates the old "server > baseUrl" and "server > scheme" configuration entries to
|
||||
"server > reverseProxy > prefixFallback" and "server > reverseProxy > schemeFallback".
|
||||
|
||||
Added in 1.2.0
|
||||
"""
|
||||
if "server" in config.keys() and ("baseUrl" in config["server"] or "scheme" in config["server"]):
|
||||
prefix = ""
|
||||
@@ -1051,6 +1059,8 @@ class Settings(object):
|
||||
"""
|
||||
Migrates the old event configuration format of type "events > gcodeCommandTrigger" and
|
||||
"event > systemCommandTrigger" to the new events format.
|
||||
|
||||
Added in 1.2.0
|
||||
"""
|
||||
if "events" in config.keys() and ("gcodeCommandTrigger" in config["events"] or "systemCommandTrigger" in config["events"]):
|
||||
self._logger.info("Migrating config (event subscriptions)...")
|
||||
@@ -1146,6 +1156,8 @@ class Settings(object):
|
||||
|
||||
If server commands for action is not yet set, migrates command. Otherwise only
|
||||
deletes definition from custom system commands.
|
||||
|
||||
Added in 1.3.0
|
||||
"""
|
||||
changed = False
|
||||
|
||||
@@ -1192,6 +1204,8 @@ class Settings(object):
|
||||
Migrates feature flags identified as serial specific from the feature to the serial config tree and vice versa.
|
||||
|
||||
If a flag already exists in the target tree, only deletes the copy in the source tree.
|
||||
|
||||
Added in 1.3.7
|
||||
"""
|
||||
changed = False
|
||||
|
||||
@@ -1235,6 +1249,8 @@ class Settings(object):
|
||||
Migrates supportResendsWithoutOk flag from boolean to ("always", "detect", "never") value range.
|
||||
|
||||
True gets migrated to "always", False to "detect" (which is the new default).
|
||||
|
||||
Added in 1.3.7
|
||||
"""
|
||||
if "serial" in config and "supportResendsWithoutOk" in config["serial"] \
|
||||
and config["serial"]["supportResendsWithoutOk"] not in ("always", "detect", "never"):
|
||||
@@ -1246,6 +1262,28 @@ class Settings(object):
|
||||
return True
|
||||
return False
|
||||
|
||||
def _migrate_string_temperature_profile_values(self, config):
|
||||
"""
|
||||
Migrates/fixes temperature profile wrongly saved with strings instead of ints as temperature values.
|
||||
|
||||
Added in 1.3.8
|
||||
"""
|
||||
if "temperature" in config and "profiles" in config["temperature"]:
|
||||
profiles = config["temperature"]["profiles"]
|
||||
if any(map(lambda x: not isinstance(x.get("extruder", 0), int) or not isinstance(x.get("bed", 0), int),
|
||||
profiles)):
|
||||
result = []
|
||||
for profile in profiles:
|
||||
try:
|
||||
profile["extruder"] = int(profile["extruder"])
|
||||
profile["bed"] = int(profile["bed"])
|
||||
except ValueError:
|
||||
pass
|
||||
result.append(profile)
|
||||
config["temperature"]["profiles"] = result
|
||||
return True
|
||||
return False
|
||||
|
||||
def backup(self, suffix, path=None):
|
||||
import shutil
|
||||
|
||||
|
||||
@@ -558,7 +558,7 @@ class SlicingManager(object):
|
||||
raise SlicerNotConfigured(slicer)
|
||||
|
||||
slicer_profile_path = self.get_slicer_profile_path(slicer)
|
||||
return self.get_slicer(slicer).get_slicer_profiles(slicer_profile_path)
|
||||
return self.get_slicer(slicer, require_configured=False).get_slicer_profiles(slicer_profile_path)
|
||||
|
||||
def profiles_last_modified(self, slicer):
|
||||
"""
|
||||
@@ -575,7 +575,7 @@ class SlicingManager(object):
|
||||
raise UnknownSlicer(slicer)
|
||||
|
||||
slicer_profile_path = self.get_slicer_profile_path(slicer)
|
||||
return self.get_slicer(slicer).get_slicer_profiles_lastmodified(slicer_profile_path)
|
||||
return self.get_slicer(slicer, require_configured=False).get_slicer_profiles_lastmodified(slicer_profile_path)
|
||||
|
||||
def get_slicer_profile_path(self, slicer):
|
||||
"""
|
||||
|
||||
@@ -1 +1 @@
|
||||
.btn{display:inline-block;*display:inline;*zoom:1;padding:4px 12px;margin-bottom:0;font-size:14px;line-height:20px;text-align:center;vertical-align:middle;cursor:pointer;color:#333;text-shadow:0 1px 1px rgba(255,255,255,.75);background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;*background-color:#e6e6e6;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);border:1px solid #ccc;*border:0;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*margin-left:.3em;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}.btn.active,.btn.disabled,.btn:active,.btn:focus,.btn:hover,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn.active,.btn:active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:focus,.btn:hover{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:#333 dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn-large [class*=" icon-"],.btn-large [class^=icon-]{margin-top:4px}.btn-small{padding:2px 10px;font-size:11.9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-small [class*=" icon-"],.btn-small [class^=icon-]{margin-top:0}.btn-mini [class*=" icon-"],.btn-mini [class^=icon-]{margin-top:-1px}.btn-mini{padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-block{display:block;width:100%;padding-left:0;padding-right:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#04c;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-primary.active,.btn-primary.disabled,.btn-primary:active,.btn-primary:focus,.btn-primary:hover,.btn-primary[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.btn-primary.active,.btn-primary:active{background-color:#039 \9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#f89406;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-warning.active,.btn-warning.disabled,.btn-warning:active,.btn-warning:focus,.btn-warning:hover,.btn-warning[disabled]{color:#fff;background-color:#f89406;*background-color:#df8505}.btn-warning.active,.btn-warning:active{background-color:#c67605 \9}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#da4f49;background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to bottom,#ee5f5b,#bd362f);background-repeaLine truncated
|
||||
.btn{display:inline-block;*display:inline;*zoom:1;padding:4px 12px;margin-bottom:0;font-size:14px;line-height:20px;text-align:center;vertical-align:middle;cursor:pointer;color:#333;text-shadow:0 1px 1px rgba(255,255,255,.75);background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;*background-color:#e6e6e6;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);border:1px solid #ccc;*border:0;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*margin-left:.3em;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}.btn.active,.btn.disabled,.btn:active,.btn:focus,.btn:hover,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn.active,.btn:active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:focus,.btn:hover{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:#333 dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn-large [class*=" icon-"],.btn-large [class^=icon-]{margin-top:4px}.btn-small{padding:2px 10px;font-size:11.9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-small [class*=" icon-"],.btn-small [class^=icon-]{margin-top:0}.btn-mini [class*=" icon-"],.btn-mini [class^=icon-]{margin-top:-1px}.btn-mini{padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-block{display:block;width:100%;padding-left:0;padding-right:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#04c;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-primary.active,.btn-primary.disabled,.btn-primary:active,.btn-primary:focus,.btn-primary:hover,.btn-primary[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.btn-primary.active,.btn-primary:active{background-color:#039 \9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#f89406;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-warning.active,.btn-warning.disabled,.btn-warning:active,.btn-warning:focus,.btn-warning:hover,.btn-warning[disabled]{color:#fff;background-color:#f89406;*background-color:#df8505}.btn-warning.active,.btn-warning:active{background-color:#c67605 \9}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#da4f49;background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to bottom,#ee5f5b,#bd362f);background-repeaLine truncated
|
||||
@@ -91,6 +91,14 @@
|
||||
return params;
|
||||
};
|
||||
|
||||
var replaceUndefinedWithNull = function(key, value) {
|
||||
if (value === undefined) {
|
||||
return null;
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
};
|
||||
|
||||
OctoPrintClient.prototype.getBaseUrl = function() {
|
||||
var url = this.options.baseurl;
|
||||
if (!_.endsWith(url, "/")) {
|
||||
@@ -167,7 +175,7 @@
|
||||
};
|
||||
|
||||
OctoPrintClient.prototype.postJson = function(url, data, opts) {
|
||||
return this.post(url, JSON.stringify(data), contentTypeJson(opts));
|
||||
return this.post(url, JSON.stringify(data, replaceUndefinedWithNull), contentTypeJson(opts));
|
||||
};
|
||||
|
||||
OctoPrintClient.prototype.put = function(url, data, opts) {
|
||||
@@ -175,7 +183,7 @@
|
||||
};
|
||||
|
||||
OctoPrintClient.prototype.putJson = function(url, data, opts) {
|
||||
return this.put(url, JSON.stringify(data), contentTypeJson(opts));
|
||||
return this.put(url, JSON.stringify(data, replaceUndefinedWithNull), contentTypeJson(opts));
|
||||
};
|
||||
|
||||
OctoPrintClient.prototype.patch = function(url, data, opts) {
|
||||
@@ -183,7 +191,7 @@
|
||||
};
|
||||
|
||||
OctoPrintClient.prototype.patchJson = function(url, data, opts) {
|
||||
return this.patch(url, JSON.stringify(data), contentTypeJson(opts));
|
||||
return this.patch(url, JSON.stringify(data, replaceUndefinedWithNull), contentTypeJson(opts));
|
||||
};
|
||||
|
||||
OctoPrintClient.prototype.delete = function(url, opts) {
|
||||
|
||||
@@ -248,17 +248,17 @@ function DataUpdater(allViewModels, connectCallback, disconnectCallback) {
|
||||
case "resend":
|
||||
case "timeout": {
|
||||
title = gettext("Communication error");
|
||||
text = gettext("There was a communication error while talking to your printer. Please consult the terminal output and octoprint.log for details. Error: %(error)s", payload);
|
||||
text = _.sprintf(gettext("There was a communication error while talking to your printer. Please consult the terminal output and octoprint.log for details. Error: %(error)s"), payload);
|
||||
break;
|
||||
}
|
||||
case "connection": {
|
||||
title = gettext("Error connecting to printer");
|
||||
text = gettext("There was an error while trying to connect to your printer. Error: %(error)s", payload);
|
||||
text = _.sprintf(gettext("There was an error while trying to connect to your printer. Error: %(error)s"), payload);
|
||||
break;
|
||||
}
|
||||
case "start_print": {
|
||||
title = gettext("Error starting a print");
|
||||
text = gettext("There was an error while trying to start a print job. Error: %(error)s", payload);
|
||||
text = _.sprintf(gettext("There was an error while trying to start a print job. Error: %(error)s"), payload);
|
||||
break;
|
||||
}
|
||||
case "autodetect_port":
|
||||
@@ -268,7 +268,7 @@ function DataUpdater(allViewModels, connectCallback, disconnectCallback) {
|
||||
}
|
||||
default: {
|
||||
title = gettext("Unknown error");
|
||||
text = gettext("There was an unknown error while talking to your printer. Please consult the terminal output and octoprint.log for details. Error: %(error)s", payload);
|
||||
text = _.sprintf(gettext("There was an unknown error while talking to your printer. Please consult the terminal output and octoprint.log for details. Error: %(error)s"), payload);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -911,15 +911,12 @@ function splitTextToArray(text, sep, stripEmpty, filter) {
|
||||
* and is optimized to check for value changes, not key updates.
|
||||
*/
|
||||
function hasDataChanged(data, oldData) {
|
||||
if (data == undefined) {
|
||||
// noinspection EqualityComparisonWithCoercionJS
|
||||
if (data == oldData && data == undefined) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (oldData == undefined) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (_.isPlainObject(data)) {
|
||||
if (_.isPlainObject(data) && _.isPlainObject(oldData)) {
|
||||
return _.any(_.keys(data), function(key) {return hasDataChanged(data[key], oldData[key]);});
|
||||
} else {
|
||||
return !_.isEqual(data, oldData);
|
||||
@@ -956,10 +953,12 @@ function hasDataChanged(data, oldData) {
|
||||
* and is optimized to check for value changes, not key updates.
|
||||
*/
|
||||
function getOnlyChangedData(data, oldData) {
|
||||
// noinspection EqualityComparisonWithCoercionJS
|
||||
if (data == undefined) {
|
||||
return {};
|
||||
}
|
||||
|
||||
// noinspection EqualityComparisonWithCoercionJS
|
||||
if (oldData == undefined) {
|
||||
return data;
|
||||
}
|
||||
@@ -972,17 +971,20 @@ function getOnlyChangedData(data, oldData) {
|
||||
var retval = {};
|
||||
_.forOwn(root, function(value, key) {
|
||||
var oldValue = undefined;
|
||||
// noinspection EqualityComparisonWithCoercionJS
|
||||
if (oldRoot != undefined && oldRoot.hasOwnProperty(key)) {
|
||||
oldValue = oldRoot[key];
|
||||
}
|
||||
if (_.isPlainObject(value)) {
|
||||
// noinspection EqualityComparisonWithCoercionJS
|
||||
if (oldValue == undefined) {
|
||||
retval[key] = value;
|
||||
} else if (hasDataChanged(value, oldValue)) {
|
||||
retval[key] = f(value, oldValue);
|
||||
}
|
||||
} else {
|
||||
if (!_.isEqual(value, oldValue)) {
|
||||
// noinspection EqualityComparisonWithCoercionJS
|
||||
if (!(value == oldValue && value == undefined) && !_.isEqual(value, oldValue)) {
|
||||
retval[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -302,10 +302,7 @@ $(function() {
|
||||
var entryElement = self.getEntryElement({path: focus.path, origin: focus.location});
|
||||
if (entryElement) {
|
||||
// scroll to uploaded element
|
||||
var entryOffset = entryElement.offsetTop;
|
||||
self.listElement.slimScroll({
|
||||
scrollTo: entryOffset + "px"
|
||||
});
|
||||
self.listElement.scrollTop(entryElement.offsetTop);
|
||||
|
||||
// highlight uploaded element
|
||||
var element = $(entryElement);
|
||||
@@ -815,7 +812,7 @@ $(function() {
|
||||
}
|
||||
});
|
||||
|
||||
self.listElement = $(".gcode_files");
|
||||
self.listElement = $("#files").find(".scroll-wrapper");
|
||||
|
||||
self.addFolderDialog = $("#add_folder_dialog");
|
||||
self.addFolderDialog.on("shown", function() {
|
||||
|
||||
@@ -147,7 +147,6 @@ $(function() {
|
||||
self.feature_printCancelConfirmation = ko.observable(undefined);
|
||||
self.feature_g90InfluencesExtruder = ko.observable(undefined);
|
||||
self.feature_autoUppercaseBlacklist = ko.observable(undefined);
|
||||
self.feature_legacyPluginAssets = ko.observable(undefined);
|
||||
|
||||
self.serial_port = ko.observable();
|
||||
self.serial_baudrate = ko.observable();
|
||||
@@ -163,6 +162,7 @@ $(function() {
|
||||
self.serial_timeoutTemperatureAutoreport = ko.observable(undefined);
|
||||
self.serial_timeoutSdStatus = ko.observable(undefined);
|
||||
self.serial_timeoutSdStatusAutoreport = ko.observable(undefined);
|
||||
self.serial_timeoutBaudrateDetectionPause = ko.observable(undefined);
|
||||
self.serial_log = ko.observable(undefined);
|
||||
self.serial_additionalPorts = ko.observable(undefined);
|
||||
self.serial_additionalBaudrates = ko.observable(undefined);
|
||||
@@ -733,6 +733,23 @@ $(function() {
|
||||
});
|
||||
return result;
|
||||
}
|
||||
},
|
||||
temperature: {
|
||||
profiles: function() {
|
||||
var result = [];
|
||||
_.each(self.temperature_profiles(), function(profile) {
|
||||
try {
|
||||
result.push({
|
||||
name: profile.name,
|
||||
extruder: Math.floor(_.isNumber(profile.extruder) ? profile.extruder : parseInt(profile.extruder)),
|
||||
bed: Math.floor(_.isNumber(profile.bed) ? profile.bed : parseInt(profile.bed))
|
||||
});
|
||||
} catch (ex) {
|
||||
// ignore
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -686,10 +686,14 @@ ul.dropdown-menu li a {
|
||||
#files {
|
||||
.gcode_files {
|
||||
@padding: 5px;
|
||||
@scrollBar: 10px;
|
||||
@line-height: 20px;
|
||||
|
||||
padding-right: @scrollBar + 2px;
|
||||
.scroll-wrapper {
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
height: 306px;
|
||||
padding-right: 2px;
|
||||
}
|
||||
|
||||
.entry {
|
||||
padding: @padding;
|
||||
@@ -929,6 +933,13 @@ ul.dropdown-menu li a {
|
||||
}
|
||||
}
|
||||
|
||||
#settings_appearance_managelanguagesdialog_list {
|
||||
width: auto;
|
||||
height: 300px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
padding-right: 2px;
|
||||
}
|
||||
|
||||
#settings_appearance_managelanguagesdialog_emptylist {
|
||||
overflow: hidden;
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<div id="forgot_password_dialog" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="forgot_password_dialog_label" aria-hidden="true">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h3 id="forgot_password_dialog_label">{{ _('Forgot password?') }}</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>{{ _('See detailed instructions at <a href="https://discourse.octoprint.org/t/i-forgot-my-octoprint-password-how-can-i-reset-it/215">I forgot my OctoPrint password, how can I reset it?</a>') }}</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-block" data-dismiss="modal" aria-hidden="true">{{ _('Close') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -61,7 +61,7 @@
|
||||
<h4>{{ _('Available Language Packs') }}</h4>
|
||||
|
||||
<div data-bind="visible: languagePacksAvailable()">
|
||||
<div id="settings_appearance_managelanguagesdialog_list" data-bind="slimScrolledForeach: translations.paginatedItems" style="height: 300px">
|
||||
<div id="settings_appearance_managelanguagesdialog_list" data-bind="foreach: translations.paginatedItems">
|
||||
<div class="entry">
|
||||
<strong><a href="#" class="fa" data-bind="toggleContent: { class: 'fa-caret-right fa-caret-down', parent: '.entry', container: '.packs' }"><i class="fa fa-caret-down"></i> <span data-bind="text: $root.languagePackDisplay($data)"></span></a></strong>
|
||||
<div class="packs">
|
||||
|
||||
@@ -1,18 +1,4 @@
|
||||
<form class="form-horizontal">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: feature_legacyPluginAssets" id="settings-legacyPluginAssets"> {{ _('Enable legacy plugin asset bundling') }} <span class="label label-info">Compatibility</span>
|
||||
<span class="help-block">{% trans url="https://octoprint.org/blog/2017/12/01/heads-up-plugin-authors/" %}
|
||||
Enable this, save and restart your server if you are running into issues with plugins with OctoPrint
|
||||
1.3.6 or later that used to work with OctoPrint up to version 1.3.5. See <a href="{{ url }}">here</a>
|
||||
for details on why this is happening. Note that this legacy flag will be removed in a future
|
||||
OctoPrint version (currently planned for 1.3.8), so urge the authors of affected plugins to push
|
||||
an update with a fix.
|
||||
{% endtrans %}</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<label class="control-label" for="settings-serialAdditionalBaudrates">{{ _('Additional baud rates') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level" id="settings-serialAdditionalBaudrates" data-bind="value: serial_additionalBaudrates">
|
||||
<span class="help-inline">{{ _('Use this to define additional serial port baud rates to list for connecting with, e.g. <code>123456</code>. Comma separated.')|format(glob_url="http://docs.python.org/2/library/glob.html") }}</span>
|
||||
<span class="help-inline">{{ _('Use this to define additional serial port baud rates to list for connecting with, e.g. <code>123456</code>. Comma separated.') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
@@ -146,6 +146,16 @@
|
||||
<div>
|
||||
<div><small><a href="#" class="muted" data-bind="toggleContent: { class: 'fa-caret-right fa-caret-down', container: '#settings_serial_timeouts_timeouts .hide' }"><i class="fa fa-caret-right"></i> {{ _('Advanced options') }}</a></small></div>
|
||||
<div class="hide">
|
||||
<div class="control-group" title="{{ _('Time to wait after opening the serial connection before starting baudrate detection') }}">
|
||||
<label class="control-label" for="settings-serialTimeoutBaudrateDetectionPause">{{ _('Initial baudrate detection pause') }}</label>
|
||||
<div class="controls">
|
||||
<div class="input-append">
|
||||
<input type="number" step="any" min="0" class="input-mini text-right" data-bind="value: serial_timeoutBaudrateDetectionPause" id="settings-serialTimeoutBaudrateDetectionPause">
|
||||
<span class="add-on">s</span>
|
||||
</div>
|
||||
<span class="help-block">{{ _('Some controllers need a bit of a breather before baudrate detection after initial connect. If baudrate detection fails due to a hanging controller, try increasing this value.') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group" title="{{ _('Maximum consecutive communication timeouts while idle. More than this and the printer will be considered to be gone. Set to 0 to disable.') }}">
|
||||
<label class="control-label" for="settings-serialMaxTimeoutsIdle">{{ _('Max. consecutive timeouts while idle') }}</label>
|
||||
<div class="controls">
|
||||
@@ -271,7 +281,7 @@
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: serial_triggerOkForM29" id="settings-serialTriggerOkForM29"> {{ _('Simulate <code>ok</code> for <code>M29</code>') }}
|
||||
<span class="help-block">{{ _('Most Marlin forks that were derived from Marlin versions < v1.1.0 do not send an acknowledging <code>ok</code> for a <code>M29</code>. Check this if you run into communication stalls following streaming of a file to your printer\'s SD.') }}</span>
|
||||
<span class="help-block">{{ _('Most Marlin forks that were derived from Marlin versions < v1.1.0 do not send an acknowledging <code>ok</code> for a <code>M29</code>. Check this if you run into communication stalls following streaming of a file to your printer\'s SD.') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -299,7 +309,7 @@
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: serial_waitForStart" id="settings-serialWaitForStart"> {{ _('Wait for <code>start</code> on connect') }}
|
||||
<span class="help-block">{{ _('Try checking this if you run into connection timeouts due to your printer taking too long to respond to OctoPrint\' handshake attempts on connect.') }}</span>
|
||||
<span class="help-block">{{ _('Try checking this if you run into connection timeouts due to your printer taking too long to respond to OctoPrint\'s handshake attempts on connect.') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -40,11 +40,11 @@
|
||||
<input type="text" class="span12 text-right" data-bind="value: name">
|
||||
</div>
|
||||
<div class="input-append span3">
|
||||
<input type="number" class="input-mini text-right" data-bind="value: extruder">
|
||||
<input type="number" min="0" step="1" class="input-mini text-right" data-bind="value: extruder">
|
||||
<span class="add-on">°C</span>
|
||||
</div>
|
||||
<div class="input-append span3">
|
||||
<input type="number" class="input-mini text-right" data-bind="value: bed">
|
||||
<input type="number" min="0" step="1" class="input-mini text-right" data-bind="value: bed">
|
||||
<span class="add-on">°C</span>
|
||||
</div>
|
||||
<div class="span2">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<script lang="javascript">
|
||||
<script type="text/javascript">
|
||||
var BASEURL = "{{ url_for('index') }}";
|
||||
var API_BASEURL = BASEURL + "api/";
|
||||
var PLUGIN_BASEURL = BASEURL + "plugin/";
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<form id="loginForm" data-bind="event: {'submit': loginState.prepareLogin }" onsubmit="return false; // this gets overwritten on view model bind">
|
||||
<label for="login_user">{{ _('Username') }}</label>
|
||||
<input type="text" id="login_user" name="username" data-bind="valueWithInit: loginState.loginUser" placeholder="{{ _('Username') }}" autocapitalize="none" autocorrect="off">
|
||||
<span class="pull-right"><small><a href="#forgot_password_dialog" data-toggle="modal">{{ _('Forgot password?') }}</a></small></span>
|
||||
<label for="login_pass">{{ _('Password') }}</label>
|
||||
<input type="password" id="login_pass" name="password" data-bind="valueWithInit: loginState.loginPass" placeholder="{{ _('Password') }}">
|
||||
<label class="checkbox">
|
||||
@@ -18,3 +19,5 @@
|
||||
<li><a href="#" id="usersettings_button" data-bind="click: function() { usersettings.show(); }">{{ _('User Settings') }}</a></li>
|
||||
<li><a href="#" id="logout_button" data-bind="click: loginState.logout">{{ _('Logout') }}</a></li>
|
||||
</ul>
|
||||
|
||||
{% include 'dialogs/forgot_password.jinja2' %}
|
||||
@@ -7,9 +7,9 @@
|
||||
<div class="back-path"><small class="muted">{{ _('Currently in') }} <span data-bind="text: currentPath"></span></small></div>
|
||||
</div>
|
||||
|
||||
<!-- ko slimScrolledForeach: {data: filesAndFolders, slimscroll: {height: "306px", size: "10px", distance: 0, railVisible: true, alwaysVisible: true, scrollBy: "102px"} } -->
|
||||
<div class="entry" data-bind="attr: { id: $root.getEntryId($data) }, template: { name: $root.templateFor($data), data: $data }, css: $data.type"></div>
|
||||
<!-- /ko -->
|
||||
<div class="scroll-wrapper" data-bind="foreach: filesAndFolders">
|
||||
<div class="entry" data-bind="attr: { id: $root.getEntryId($data) }, template: { name: $root.templateFor($data), data: $data }, css: $data.type"></div>
|
||||
</div>
|
||||
|
||||
<script type="text/html" id="files_template_machinecode">
|
||||
<div class="title clickable" data-bind="click: function() { if ($root.enableSelect($data)) { $root.loadFile($data, false); } else { return; } }, css: $root.getSuccessClass($data), style: { 'font-weight': $root.listHelper.isSelected($data) ? 'bold' : 'normal' }, text: display"></div>
|
||||
|
||||
@@ -83,10 +83,10 @@
|
||||
</p>
|
||||
<p>
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: reader_hideEmptyLayers">{{ _('Hide empty layers') }} <label class="label">{{ _('Causes reload') }}</label>
|
||||
<input type="checkbox" data-bind="checked: reader_hideEmptyLayers">{{ _('Hide empty layers') }} <span class="label">{{ _('Causes reload') }}</span>
|
||||
</label>
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: reader_sortLayers">{{ _('Sort layers') }} <label class="label">{{ _('Causes reload') }}</label>
|
||||
<input type="checkbox" data-bind="checked: reader_sortLayers">{{ _('Sort layers') }} <span class="label">{{ _('Causes reload') }}</span>
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
Binary file not shown.
@@ -7,8 +7,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OctoPrint\n"
|
||||
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
|
||||
"POT-Creation-Date: 2018-03-16 13:18+0100\n"
|
||||
"PO-Revision-Date: 2018-03-16 14:07+0100\n"
|
||||
"POT-Creation-Date: 2018-04-03 17:40+0200\n"
|
||||
"PO-Revision-Date: 2018-04-03 17:40+0200\n"
|
||||
"Last-Translator: Gina Häußge <osd@foosel.net>\n"
|
||||
"Language: de\n"
|
||||
"Language-Team: German (http://www.transifex.com/projects/p/octoprint/language/de/)\n"
|
||||
@@ -576,7 +576,7 @@ msgstr "Vorhandene Datei überschreiben"
|
||||
#: src/octoprint/plugins/cura/templates/snippets/settings/cura/profileImporter.jinja2:53
|
||||
msgid "\n"
|
||||
" You can import your existing profile <code>.ini</code> files from <strong>Cura 15.04.x or older</strong>\n"
|
||||
" here. Anything but those are <strong>not supported</strong>. That especiallymeans that <code>.json</code>\n"
|
||||
" here. Anything but those are <strong>not supported</strong>. That especially means that <code>.json</code>\n"
|
||||
" profiles from Cura 15.06.x and <code>.curaprofile</code> profiles from Cura 2.x will not work, and neither\n"
|
||||
" will custom Cura profile formats that third party tools like e.g. Repetier create.\n"
|
||||
" "
|
||||
@@ -624,6 +624,10 @@ msgstr "Profil entfernen"
|
||||
msgid "Without this plugin your OctoPrint instance will no longer be discoverable on the network via Bonjour and uPnP."
|
||||
msgstr "Ohne dieses Plugin wird deine OctoPrint Instanz nicht mehr in deinem Netzwerk mittels Bonjour oder uPnP automatisch auffindbar sein."
|
||||
|
||||
#: src/octoprint/plugins/logging/__init__.py:204
|
||||
msgid "Without this plugin you will no longer be able to retrieve OctoPrint's logs or modify the current logging levels through the web interface."
|
||||
msgstr "Ohne dieses Plugin kannst du OctoPrints Logfiles nicht mehr über das Webinterface herunterladen und auch die aktuellen Loglevel modifizieren."
|
||||
|
||||
#: src/octoprint/plugins/logging/templates/logging_settings.jinja2:1
|
||||
msgid "Logs"
|
||||
msgstr "Logs"
|
||||
@@ -1196,6 +1200,22 @@ msgstr "Abbruch"
|
||||
msgid "Save"
|
||||
msgstr "Speichern"
|
||||
|
||||
#: src/octoprint/plugins/printer_safety_check/__init__.py:44
|
||||
msgid "Printer Safety Warning"
|
||||
msgstr "Druckersicherheitswarnung"
|
||||
|
||||
#: src/octoprint/plugins/printer_safety_check/__init__.py:105
|
||||
msgid "Without this plugin OctoPrint will no longer be able to check if the printer it is connected to has a known safetyissue and inform you about that fact."
|
||||
msgstr "Ohne dieses Plugin wird OctoPrint nicht länger in der Lage sein, dich über bekannte Sicherheitsprobleme mit verbundenen Druckern zu informieren."
|
||||
|
||||
#: src/octoprint/plugins/printer_safety_check/templates/printer_safety_check_sidebar.jinja2:1
|
||||
msgid "Warning!"
|
||||
msgstr "Warnung!"
|
||||
|
||||
#: src/octoprint/plugins/printer_safety_check/templates/printer_safety_check_sidebar.jinja2:5
|
||||
msgid "Learn more..."
|
||||
msgstr "Mehr erfahren..."
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:570
|
||||
#: src/octoprint/plugins/softwareupdate/templates/softwareupdate_wizard.jinja2:1
|
||||
msgid "Software Update"
|
||||
@@ -1516,8 +1536,8 @@ msgstr "OctoPrint Release Channel"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/templates/snippets/plugins/softwareupdate/releaseChannel.jinja2:5
|
||||
#, python-format
|
||||
msgid "Make sure you have read <a href=\"%(url)s\" target=\"_blank\" rel=\"noreferrer noopener\">\"Using Release Channels\"</a> before switching to a release channel other than \"Stable\""
|
||||
msgstr "Stelle sicher, dass du <a href=\"%(url)s\" target=\"_blank\" rel=\"noreferrer noopener\">\"Using Release Channels\"</a> gelesen hast, bevor du einen anderen Release Channel als \"Stable\" auswählst."
|
||||
msgid "Make sure you have read <a href=\"%(url)s\" target=\"_blank\" rel=\"noreferrer noopener\">\"How to use the release channels to help test release candidates\"</a> before switching to a release channel other than \"Stable\""
|
||||
msgstr "Stelle sicher, dass du <a href=\"%(url)s\" target=\"_blank\" rel=\"noreferrer noopener\">\"How to use the release channels to help test release candidates\"</a> gelesen hast, bevor du einen anderen Release Channel als \"Stable\" auswählst."
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/templates/snippets/plugins/softwareupdate/versionTracking.jinja2:2
|
||||
msgid "OctoPrint version tracking"
|
||||
@@ -1840,7 +1860,7 @@ msgid "off"
|
||||
msgstr "Aus"
|
||||
|
||||
#: src/octoprint/static/js/app/helpers.js:654
|
||||
#: src/octoprint/static/js/app/viewmodels/connection.js:133
|
||||
#: src/octoprint/static/js/app/viewmodels/connection.js:135
|
||||
msgid "Are you sure?"
|
||||
msgstr "Bist Du sicher?"
|
||||
|
||||
@@ -1902,19 +1922,19 @@ msgid "Connect"
|
||||
msgstr "Verbinden"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/connection.js:44
|
||||
#: src/octoprint/static/js/app/viewmodels/connection.js:142
|
||||
#: src/octoprint/static/js/app/viewmodels/connection.js:144
|
||||
msgid "Disconnect"
|
||||
msgstr "Trennen"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/connection.js:134
|
||||
#: src/octoprint/static/js/app/viewmodels/connection.js:136
|
||||
msgid "<p><strong>You are about to disconnect from the printer while a print is in progress.</strong></p><p>Disconnecting while a print is in progress will prevent OctoPrint from completing the print. If you're printing from an SD card attached directly to the printer, any attempt to restart OctoPrint or reconnect to the printer could interrupt the print.<p>"
|
||||
msgstr "<p><strong>Du bist im Begriff, die Verbindung zu deinem Drucker zu trennen während ein Druck läuft.</strong></p><p>Das Trennen der Verbindung während eines Drucks wird OctoPrint daran hindern, diesen zu vollenden. Falls du von der SD deines Druckers druckst, könnte jeglicher Versuch, OctoPrint neuzustarten oder erneut mit dem Drucker zu verbinden den Druck unterbrechen.<p>"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/connection.js:140
|
||||
#: src/octoprint/static/js/app/viewmodels/connection.js:142
|
||||
msgid "Are you sure you want to disconnect from the printer?"
|
||||
msgstr "Bist Du sicher, dass du die Verbindung zum Drucker trennen willst?"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/connection.js:141
|
||||
#: src/octoprint/static/js/app/viewmodels/connection.js:143
|
||||
msgid "Stay Connected"
|
||||
msgstr "Verbunden bleiben"
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@ from functools import wraps
|
||||
import warnings
|
||||
import contextlib
|
||||
import collections
|
||||
import frozendict
|
||||
import copy
|
||||
|
||||
try:
|
||||
import queue
|
||||
@@ -1036,6 +1038,20 @@ except RuntimeError:
|
||||
monotonic_time = time.time
|
||||
|
||||
|
||||
def thaw_frozendict(obj):
|
||||
if not isinstance(obj, (dict, frozendict.frozendict)):
|
||||
raise ValueError("obj must be a dict or frozendict instance")
|
||||
|
||||
# only true love can thaw a frozen dict
|
||||
letitgo = dict()
|
||||
for key, value in obj.items():
|
||||
if isinstance(value, (dict, frozendict.frozendict)):
|
||||
letitgo[key] = thaw_frozendict(value)
|
||||
else:
|
||||
letitgo[key] = copy.deepcopy(value)
|
||||
return letitgo
|
||||
|
||||
|
||||
def utmify(link, source=None, medium=None, name=None, term=None, content=None):
|
||||
if source is None:
|
||||
return link
|
||||
|
||||
+68
-50
@@ -28,7 +28,7 @@ try:
|
||||
except AttributeError:
|
||||
# pyserial < 3.2: add backported Timeout abstraction, slightly modified since we have monotonic available
|
||||
|
||||
import monotonic
|
||||
from octoprint.util import monotonic_time
|
||||
class _Timeout(object):
|
||||
def __init__(self, duration):
|
||||
"""Initialize a timeout with given duration"""
|
||||
@@ -36,7 +36,7 @@ except AttributeError:
|
||||
self.is_non_blocking = (duration == 0)
|
||||
self.duration = duration
|
||||
if duration is not None:
|
||||
self.target_time = monotonic.monotonic() + duration
|
||||
self.target_time = monotonic_time() + duration
|
||||
else:
|
||||
self.target_time = None
|
||||
|
||||
@@ -51,10 +51,10 @@ except AttributeError:
|
||||
elif self.is_infinite:
|
||||
return None
|
||||
else:
|
||||
delta = self.target_time - monotonic.monotonic()
|
||||
delta = self.target_time - monotonic_time()
|
||||
if delta > self.duration:
|
||||
# clock jumped, recalculate
|
||||
self.target_time = monotonic.monotonic() + self.duration
|
||||
self.target_time = monotonic_time() + self.duration
|
||||
return self.duration
|
||||
else:
|
||||
return max(0, delta)
|
||||
@@ -65,7 +65,7 @@ except AttributeError:
|
||||
before.
|
||||
"""
|
||||
self.duration = duration
|
||||
self.target_time = monotonic.monotonic() + duration
|
||||
self.target_time = monotonic_time() + duration
|
||||
|
||||
serial.Timeout = _Timeout
|
||||
del _Timeout
|
||||
@@ -418,7 +418,7 @@ class MachineCom(object):
|
||||
self._printerProfileManager = printerProfileManager
|
||||
self._state = self.STATE_NONE
|
||||
self._serial = None
|
||||
self._baudrateDetectList = baudrateList()
|
||||
self._baudrateDetectList = []
|
||||
self._baudrateDetectRetry = 0
|
||||
self._temperatureTargetSetThreshold = 25
|
||||
self._tempOffsets = dict()
|
||||
@@ -851,7 +851,6 @@ class MachineCom(object):
|
||||
self._monitoring_active = False
|
||||
self._send_queue_active = False
|
||||
|
||||
printing = self.isPrinting() or self.isPaused()
|
||||
if self._serial is not None:
|
||||
if not is_error:
|
||||
self.sendGcodeScript("beforePrinterDisconnected")
|
||||
@@ -884,6 +883,7 @@ class MachineCom(object):
|
||||
self._logger.exception("Error while trying to close serial port")
|
||||
is_error = True
|
||||
|
||||
# if we are printing, this will also make sure of firing PRINT_FAILED
|
||||
if is_error:
|
||||
self._changeState(self.STATE_CLOSED_WITH_ERROR)
|
||||
else:
|
||||
@@ -895,9 +895,6 @@ class MachineCom(object):
|
||||
if settings().getBoolean(["feature", "sdSupport"]):
|
||||
self._sdFileList = []
|
||||
|
||||
if printing:
|
||||
self._callback.on_comm_print_job_failed()
|
||||
|
||||
def setTemperatureOffset(self, offsets):
|
||||
self._tempOffsets.update(offsets)
|
||||
|
||||
@@ -912,7 +909,7 @@ class MachineCom(object):
|
||||
if not cmd:
|
||||
return False
|
||||
|
||||
if self.isPrinting() and not self.isSdFileSelected() and not self.job_on_hold:
|
||||
if self.isPrinting() and not self.isSdFileSelected() and not self.job_on_hold and not force:
|
||||
try:
|
||||
self._command_queue.put((cmd, cmd_type, on_sent, tags), item_type=cmd_type)
|
||||
return True
|
||||
@@ -1004,7 +1001,7 @@ class MachineCom(object):
|
||||
if self._currentFile is None:
|
||||
raise ValueError("No file selected for printing")
|
||||
|
||||
self._heatupWaitStartTime = None
|
||||
self._heatupWaitStartTime = None if not self._heating else time.time()
|
||||
self._heatupWaitTimeLost = 0.0
|
||||
self._pauseWaitStartTime = 0
|
||||
self._pauseWaitTimeLost = 0.0
|
||||
@@ -1414,10 +1411,15 @@ class MachineCom(object):
|
||||
|
||||
self._log("Connected to: %s, starting monitor" % self._serial)
|
||||
if self._baudrate == 0:
|
||||
self._serial.timeout = 0.01
|
||||
try_hello = False
|
||||
self._log("Starting baud rate detection")
|
||||
self._log("Starting baud rate detection...")
|
||||
self._changeState(self.STATE_DETECT_BAUDRATE)
|
||||
|
||||
# Some controllers (e.g. Original Prusa) don't appear to like too fast serial interaction after
|
||||
# open, so let's wait a bit before the first baudrate detection step
|
||||
time.sleep(settings().getFloat(["serial", "timeout", "baudrateDetectionPause"]))
|
||||
|
||||
self._perform_baudrate_detection_step(init=True)
|
||||
else:
|
||||
self._changeState(self.STATE_CONNECTING)
|
||||
|
||||
@@ -1429,9 +1431,6 @@ class MachineCom(object):
|
||||
supportRepetierTargetTemp = settings().getBoolean(["serial", "repetierTargetTemp"])
|
||||
supportWait = settings().getBoolean(["serial", "supportWait"])
|
||||
|
||||
connection_timeout = settings().getFloat(["serial", "timeout", "connection"])
|
||||
detection_timeout = settings().getFloat(["serial", "timeout", "detection"])
|
||||
|
||||
# enqueue the "hello command" first thing
|
||||
if try_hello:
|
||||
self.sayHello()
|
||||
@@ -1544,7 +1543,7 @@ class MachineCom(object):
|
||||
handled = False
|
||||
|
||||
# process oks
|
||||
if line.startswith("ok") or (self.isPrinting() and supportWait and line == "wait"):
|
||||
if line.startswith("ok") or (self.isPrinting() and not self.job_on_hold and supportWait and line == "wait"):
|
||||
# ok only considered handled if it's alone on the line, might be
|
||||
# a response to an M105 or an M114
|
||||
self._handle_ok()
|
||||
@@ -1632,7 +1631,7 @@ class MachineCom(object):
|
||||
if not disable_external_heatup_detection and not self._temperature_autoreporting \
|
||||
and not line.strip().startswith("ok") and not self._heating \
|
||||
and self._firmware_info_received:
|
||||
self._logger.debug("Externally triggered heatup detected")
|
||||
self._logger.info("Externally triggered heatup detected")
|
||||
self._heating = True
|
||||
self._heatupWaitStartTime = time.time()
|
||||
|
||||
@@ -1874,30 +1873,8 @@ class MachineCom(object):
|
||||
### Baudrate detection
|
||||
if self._state == self.STATE_DETECT_BAUDRATE:
|
||||
if line == '' or time.time() > self._timeout:
|
||||
if self._baudrateDetectRetry > 0:
|
||||
self._serial.timeout = detection_timeout
|
||||
self._baudrateDetectRetry -= 1
|
||||
self._serial.write('\n')
|
||||
self._log("Baudrate test retry: %d" % (self._baudrateDetectRetry))
|
||||
self.sayHello(tags={"trigger:baudrate_detection",})
|
||||
elif len(self._baudrateDetectList) > 0:
|
||||
baudrate = self._baudrateDetectList.pop(0)
|
||||
try:
|
||||
self._serial.baudrate = baudrate
|
||||
if self._serial.timeout != connection_timeout:
|
||||
self._serial.timeout = connection_timeout
|
||||
self._log("Trying baudrate: %d" % (baudrate))
|
||||
self._baudrateDetectRetry = 5
|
||||
self._timeout = get_new_timeout("communicationBusy" if self._busy_protocol_detected else "communication", self._timeout_intervals)
|
||||
self._serial.write('\n')
|
||||
self.sayHello(tags={"trigger:baudrate_detection",})
|
||||
except:
|
||||
self._log("Unexpected error while setting baudrate {}: {}".format(baudrate, get_exception_string()))
|
||||
self._logger.exception("Unexpceted error while setting baudrate {}".format(baudrate))
|
||||
else:
|
||||
error_text = "No more baudrates to test, and no suitable baudrate found."
|
||||
self._trigger_error(error_text, "autodetect_baudrate")
|
||||
elif 'start' in line or 'ok' in line:
|
||||
self._perform_baudrate_detection_step()
|
||||
elif 'start' in line or line.startswith('ok'):
|
||||
self._onConnected()
|
||||
if 'start' in line:
|
||||
self._clear_to_send.set()
|
||||
@@ -2043,10 +2020,48 @@ class MachineCom(object):
|
||||
self._log(message + " " + general_message)
|
||||
self._clear_to_send.set()
|
||||
|
||||
def _perform_baudrate_detection_step(self, init=False):
|
||||
if init:
|
||||
timeout = settings().getFloat(["serial", "timeout", "connection"])
|
||||
self._baudrateDetectList = baudrateList()
|
||||
else:
|
||||
timeout = settings().getFloat(["serial", "timeout", "detection"])
|
||||
|
||||
if self._baudrateDetectRetry > 0:
|
||||
if self._serial.timeout != timeout:
|
||||
self._serial.timeout = timeout
|
||||
self._timeout = time.time() + timeout
|
||||
|
||||
self._log("Baudrate test retry #{}".format(5 - self._baudrateDetectRetry))
|
||||
self._baudrateDetectRetry -= 1
|
||||
self._do_send_without_checksum("", log=False) # new line to reset things
|
||||
self.sayHello(tags={"trigger:baudrate_detection", })
|
||||
|
||||
elif len(self._baudrateDetectList) > 0:
|
||||
baudrate = self._baudrateDetectList.pop(0)
|
||||
try:
|
||||
self._serial.baudrate = baudrate
|
||||
if self._serial.timeout != timeout:
|
||||
self._serial.timeout = timeout
|
||||
self._timeout = time.time() + timeout
|
||||
|
||||
self._log("Trying baudrate: {}".format(baudrate))
|
||||
self._baudrateDetectRetry = 4
|
||||
self._do_send_without_checksum("", log=False) # new line to reset things
|
||||
self.sayHello(tags={"trigger:baudrate_detection", })
|
||||
except:
|
||||
self._log("Unexpected error while setting baudrate {}: {}".format(baudrate, get_exception_string()))
|
||||
self._logger.exception("Unexpected error while setting baudrate {}".format(baudrate))
|
||||
|
||||
else:
|
||||
error_text = "No more baudrates to test, and no suitable baudrate found."
|
||||
self._trigger_error(error_text, "autodetect_baudrate")
|
||||
|
||||
def _finish_heatup(self):
|
||||
if self._heatupWaitStartTime:
|
||||
self._heatupWaitTimeLost = self._heatupWaitTimeLost + (time.time() - self._heatupWaitStartTime)
|
||||
self._heatupWaitStartTime = None
|
||||
if self._heating:
|
||||
if self._heatupWaitStartTime:
|
||||
self._heatupWaitTimeLost = self._heatupWaitTimeLost + (time.time() - self._heatupWaitStartTime)
|
||||
self._heatupWaitStartTime = None
|
||||
self._heating = False
|
||||
|
||||
def _continue_sending(self):
|
||||
@@ -2285,7 +2300,7 @@ class MachineCom(object):
|
||||
if baudrate == 0:
|
||||
baudrates = baudrateList()
|
||||
serial_obj = serial.Serial(str(port),
|
||||
115200 if 115200 in baudrates else baudrates[0],
|
||||
baudrates[0],
|
||||
timeout=read_timeout,
|
||||
writeTimeout=10000, # TODO 1.3.8 rename to write_timeout for pyserial >= 3.x
|
||||
parity=serial.PARITY_ODD)
|
||||
@@ -2914,7 +2929,9 @@ class MachineCom(object):
|
||||
modified = True
|
||||
else:
|
||||
new_results.append((command, command_type, gcode, subcode, tags))
|
||||
modified = True
|
||||
else:
|
||||
new_results.append((command, command_type, gcode, subcode, tags))
|
||||
|
||||
if modified:
|
||||
if not new_results:
|
||||
# gcode handler returned None or empty list for all commands, so we'll stop here and return a full out empty result
|
||||
@@ -2985,11 +3002,12 @@ class MachineCom(object):
|
||||
command_to_send = command_to_send + "*" + str(checksum)
|
||||
self._do_send_without_checksum(command_to_send)
|
||||
|
||||
def _do_send_without_checksum(self, cmd):
|
||||
def _do_send_without_checksum(self, cmd, log=True):
|
||||
if self._serial is None:
|
||||
return
|
||||
|
||||
self._log("Send: " + str(cmd))
|
||||
if log:
|
||||
self._log("Send: " + str(cmd))
|
||||
|
||||
cmd += "\n"
|
||||
written = 0
|
||||
|
||||
@@ -11,6 +11,7 @@ import sys
|
||||
import logging
|
||||
import site
|
||||
import threading
|
||||
import os
|
||||
|
||||
import pkg_resources
|
||||
|
||||
@@ -237,6 +238,10 @@ class PipCaller(CommandlineCaller):
|
||||
@classmethod
|
||||
def autodetect_pip(cls):
|
||||
commands = [[sys.executable, "-m", "pip"],
|
||||
[os.path.join(os.path.dirname(sys.executable), "pip.exe" if sys.platform == "win32" else "pip")],
|
||||
|
||||
# this should be our last resort since it might fail thanks to using pip programmatically like
|
||||
# that is not officially supported or sanctioned by the pip developers
|
||||
[sys.executable, "-c", "import sys; sys.argv = ['pip'] + sys.argv[1:]; import pip; pip.main()"]]
|
||||
|
||||
for command in commands:
|
||||
|
||||
@@ -7,6 +7,7 @@ __copyright__ = "Copyright (C) 2017 The OctoPrint Project - Released under terms
|
||||
|
||||
import unittest
|
||||
import ddt
|
||||
from frozendict import frozendict
|
||||
|
||||
import octoprint.util
|
||||
|
||||
@@ -45,3 +46,25 @@ class MiscTestCase(unittest.TestCase):
|
||||
def test_utmify(self, link, kwargs, expected):
|
||||
actual = octoprint.util.utmify(link, **kwargs)
|
||||
self.assertEqual(actual, expected)
|
||||
|
||||
@ddt.data(
|
||||
(frozendict(a=1, b=2, c=3), dict(a=1, b=2, c=3)),
|
||||
(frozendict(a=1, b=2, c=frozendict(c1=1, c2=2)), dict(a=1, b=2, c=dict(c1=1, c2=2))),
|
||||
(dict(a=1, b=2, c=3), dict(a=1, b=2, c=3)),
|
||||
(dict(a=1, b=2, c=frozendict(c1=1, c2=2)), dict(a=1, b=2, c=dict(c1=1, c2=2))),
|
||||
(dict(a=1, b=2, c=dict(c1=1, c2=2, c3=frozendict(c11=11, c12=12))), dict(a=1, b=2, c=dict(c1=1, c2=2, c3=dict(c11=11, c12=12))))
|
||||
)
|
||||
@ddt.unpack
|
||||
def test_unfreeze_frozendict(self, input, expected):
|
||||
result = octoprint.util.thaw_frozendict(input)
|
||||
self.assertIsInstance(result, dict)
|
||||
self.assertDictEqual(result, expected)
|
||||
|
||||
@ddt.data(None, "invalid", 3, [1, 2], (3, 4))
|
||||
def test_unfreeze_frozendict_invalid(self, input):
|
||||
try:
|
||||
octoprint.util.thaw_frozendict(input)
|
||||
self.fail("expected ValueError")
|
||||
except ValueError:
|
||||
# expected
|
||||
pass
|
||||
Binary file not shown.
@@ -7,8 +7,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OctoPrint\n"
|
||||
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
|
||||
"POT-Creation-Date: 2018-03-19 13:41+0100\n"
|
||||
"PO-Revision-Date: 2018-03-19 13:42+0100\n"
|
||||
"POT-Creation-Date: 2018-04-03 17:40+0200\n"
|
||||
"PO-Revision-Date: 2018-04-03 17:40+0200\n"
|
||||
"Last-Translator: Gina Häußge <osd@foosel.net>\n"
|
||||
"Language: de\n"
|
||||
"Language-Team: German (http://www.transifex.com/projects/p/octoprint/language/de/)\n"
|
||||
@@ -624,6 +624,10 @@ msgstr "Profil entfernen"
|
||||
msgid "Without this plugin your OctoPrint instance will no longer be discoverable on the network via Bonjour and uPnP."
|
||||
msgstr "Ohne dieses Plugin wird deine OctoPrint Instanz nicht mehr in deinem Netzwerk mittels Bonjour oder uPnP automatisch auffindbar sein."
|
||||
|
||||
#: src/octoprint/plugins/logging/__init__.py:204
|
||||
msgid "Without this plugin you will no longer be able to retrieve OctoPrint's logs or modify the current logging levels through the web interface."
|
||||
msgstr "Ohne dieses Plugin kannst du OctoPrints Logfiles nicht mehr über das Webinterface herunterladen und auch die aktuellen Loglevel modifizieren."
|
||||
|
||||
#: src/octoprint/plugins/logging/templates/logging_settings.jinja2:1
|
||||
msgid "Logs"
|
||||
msgstr "Logs"
|
||||
@@ -1532,8 +1536,8 @@ msgstr "OctoPrint Release Channel"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/templates/snippets/plugins/softwareupdate/releaseChannel.jinja2:5
|
||||
#, python-format
|
||||
msgid "Make sure you have read <a href=\"%(url)s\" target=\"_blank\" rel=\"noreferrer noopener\">\"Using Release Channels\"</a> before switching to a release channel other than \"Stable\""
|
||||
msgstr "Stelle sicher, dass du <a href=\"%(url)s\" target=\"_blank\" rel=\"noreferrer noopener\">\"Using Release Channels\"</a> gelesen hast, bevor du einen anderen Release Channel als \"Stable\" auswählst."
|
||||
msgid "Make sure you have read <a href=\"%(url)s\" target=\"_blank\" rel=\"noreferrer noopener\">\"How to use the release channels to help test release candidates\"</a> before switching to a release channel other than \"Stable\""
|
||||
msgstr "Stelle sicher, dass du <a href=\"%(url)s\" target=\"_blank\" rel=\"noreferrer noopener\">\"How to use the release channels to help test release candidates\"</a> gelesen hast, bevor du einen anderen Release Channel als \"Stable\" auswählst."
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/templates/snippets/plugins/softwareupdate/versionTracking.jinja2:2
|
||||
msgid "OctoPrint version tracking"
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OctoPrint 1.3.7.dev166+g8a3a87efa.dirty\n"
|
||||
"Project-Id-Version: OctoPrint 1.3.7rc4.dev6+g2c77614b3.dirty\n"
|
||||
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
|
||||
"POT-Creation-Date: 2018-03-19 13:41+0100\n"
|
||||
"POT-Creation-Date: 2018-04-03 17:40+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@@ -699,6 +699,12 @@ msgid ""
|
||||
"discoverable on the network via Bonjour and uPnP."
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/logging/__init__.py:204
|
||||
msgid ""
|
||||
"Without this plugin you will no longer be able to retrieve OctoPrint's "
|
||||
"logs or modify the current logging levels through the web interface."
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/logging/templates/logging_settings.jinja2:1
|
||||
msgid "Logs"
|
||||
msgstr ""
|
||||
@@ -1703,8 +1709,9 @@ msgstr ""
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Make sure you have read <a href=\"%(url)s\" target=\"_blank\" "
|
||||
"rel=\"noreferrer noopener\">\"Using Release Channels\"</a> before "
|
||||
"switching to a release channel other than \"Stable\""
|
||||
"rel=\"noreferrer noopener\">\"How to use the release channels to help "
|
||||
"test release candidates\"</a> before switching to a release channel other"
|
||||
" than \"Stable\""
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/templates/snippets/plugins/softwareupdate/versionTracking.jinja2:2
|
||||
|
||||
Reference in new issue
Block a user