Compare commits

..
14 Commits
Author SHA1 Message Date
Gina Häußge 7f5d03d054 Preparing release of 1.3.0 2016-12-08 09:25:13 +01:00
Gina Häußge 558a8957f9 Fix docs for OctoPrint.upload method 2016-12-07 10:59:16 +01:00
Gina Häußge 8d2681ae3f Make OctoPrint.upload's url behave like others
So far only was interpreted relatively to the defined base url.
We want this to behave like other requests from the client lib
though, so now it does.
2016-12-07 10:54:20 +01:00
Gina Häußge 0de6718af3 Fix filesize not being defined 2016-12-07 10:53:48 +01:00
Gina Häußge 229f3a2744 Preparing release of 1.3.0rc3 2016-12-02 12:39:28 +01:00
Gina Häußge c00b3de40c Fix temperature history on server reconnect
Two problems solved:

  * Make sure to only process temperature data once we
    have printer profile information on hand to evaluate
    the heater data. If we don't have that yet, create a client
    side backlog and process that once we have the necessary
    data on hand.
  * Do not use uninitialized history cutoff values - if our cutoff
    value hasn't yet synced (no settings response arrived yet),
    just don't perform the cutoff.
2016-12-02 11:06:01 +01:00
Gina Häußge 3d3c93c67d Fix yet another settings caching issue
That api endpoint really is a tough nut. ETag calculation now also
takes full settings dump from settings plugins into account, because
those might be providing custom keys through custom on_settings_load
implementations, for which we will not notice any changes if we are
only looking at the effective config.

Of course, the more we put into that ETag calculation, the slower it will
be and the less sense it will make. Somewhat annoying :/
2016-12-01 13:47:41 +01:00
Gina Häußge 1e84f2ee6e Fix handling of new structures in getOnlyChangedData
Not testing if oldRoot was actually set and contained the
key in question could cause issues if a completely new data
structure was sent to the backend that was not mirrored by
the default settings. Things like e.g. complex configuration
items in a by default empty object.
2016-12-01 13:46:20 +01:00
Gina Häußge 4541148aa5 Merge branch 'maintenance' into devel
# Conflicts:
#	CHANGELOG.md
2016-11-30 14:34:21 +01:00
Gina Häußge e8a4750379 Improved (manually to run) doc test for latest release selector 2016-11-30 14:33:36 +01:00
Gina Häußge 1d0657a8eb Preparing release of 1.2.18 2016-11-30 11:24:50 +01:00
Gina Häußge 65377b396f Added note that jquery and lodash are dependencies of the js client lib 2016-11-28 11:29:17 +01:00
Gina Häußge a66e6b603f Make sure our command line calls always exit
sarge's "wait_events" is unreliable. If an asynchronous
job is started but stops immediately and raises a sarge
Exception (inside the async thread), the associated
command's event will never be set event though the
process finished. So we'd wait indefinitely here.

We circumvent this by first waiting until the commands
are parsed and processed (p.commands contains
elements), then until said commands are started and then
making sure the command's process is actually set. Only
then do we actually have a background process running
that we'll be able to monitor further down, otherwise
the command immediately failed.
2016-11-25 15:45:43 +01:00
Gina Häußge 528e99898f Better error and subprocess handling
Removed a potential deadlock, added logging for all
raised exceptions, made _to_error more solid and
removed another potential encoding issue when
creating diffs
2016-11-25 14:58:09 +01:00
17 changed files with 327 additions and 194 deletions

No files matched your search

+59 -78
View File
@@ -1,68 +1,9 @@
# OctoPrint Changelog
## 1.3.0rc2 (2016-11-24)
## 1.3.0 (2016-12-08)
### Features
* OctoPrint will now track the current print head position on pause and cancel and provide it as new template variables ``pause_position``/``cancel_position`` for the relevant GCODE scripts. This will allow more intelligent pause codes that park the print head at a rest position during pause and move it back to the exact position it was before the pause on resume ([Example](https://gist.github.com/foosel/1c09e269b1c0bb7a471c20eef50c8d3e)). Note that this is NOT enabled by default and for now will necessitate adjusting the pause and resume GCODE scripts yourself since position tracking with multiple extruders or when printing from SD is currently not fool proof thanks to firmware limitations regarding reliable tracking of the various ``E`` values and the currently selected tool ``T``. In order to fully implement this feature, the following improvements were also done:
* New ``PositionUpdated`` event when OctoPrint receives a response to an ``M114`` position query.
* Extended ``PrintPaused`` and ``PrintCancelled`` events with position data from ``M114`` position query on print interruption/end.
* Added (optional) firmware auto detection. If enabled (which it is by default), OctoPrint will now send an ``M115`` to the printer on initial connection in order to try to figure out what kind of firmware it is. For FIRMWARE_NAME values containing "repetier" (case insensitive), all Repetier-specific flags will be set on the comm layer. For FIRMWARE_NAME values containing "reprapfirmware" (also case insensitive), all RepRapFirmware-specific flags will be set on the comm layer. For now no other handling will be performed.
* Added safe mode flag ``--safe`` and config setting ``startOnceInSafeMode`` that disables all third party plugins when active. The config setting will automatically be removed from `config.yaml` after the server has started through successfully.
* Added ``octoprint config`` CLI that allows easier manipulation of config.yaml entries from the command line. Example: ``octoprint config set --bool server.startOnceInSafeMode true``
### Improvements
* [#1422](https://github.com/foosel/OctoPrint/issues/1422) - Added option for post roll for timed timelapse to duplicate last frame instead of capturing new frames. That makes for a faster render at the cost of a still frame at the end of the rendered video. See also [#1553](https://github.com/foosel/OctoPrint/pull/1553).
* [#1551](https://github.com/foosel/OctoPrint/issues/1551) - Allow to define a custom bounding box for valid printer head movements in the printer profile, to make print dimension check more flexible.
* [#1583](https://github.com/foosel/OctoPrint/pull/1583) - Strip invalid `pip` arguments from `pip uninstall` commands, if provided by the user as additional pip arguments.
* [#1593](https://github.com/foosel/OctoPrint/issues/1593) - Automatically migrate old manual system commands for restarting OctoPrint and rebooting or shutting down the server to the new system wide configuration settings. Make a backup copy of the old `config.yaml` before doing so in case a manual rollback is required.
* Support ``M114`` responses without whitespace between coordinates (protocol consistency - who needs it?).
* Don't focus files in the file list after deleting a file - made the list too jumpy.
* Better error resilience against errors in UI components.
* `M600` is now marked as a long running command by default.
* Plugin Manager: Allow closing of all notifications and close them automatically on detected server disconnect. No need to keep a "Restart needed" message around if a restart is in progress.
* Software Update: "busy" spinner on check buttons while already checking for updates.
* Software Update: Prevent update notification when wizard is open.
* Plugin Manager / Software Update: The "There's a new version of pip" message during plugin installs and software updates is no longer displayed like an error.
* Plugin Manager / Software Update: The "busy" dialog can no longer be closed accidentally.
### Bug fixes
* [#1148](https://github.com/foosel/OctoPrint/issues/1148) - Fixed retraction z hop setting for Z-triggered timelapses. Was not correctly propagated to the backend and hence not taking effect.
* [#1567](https://github.com/foosel/OctoPrint/issues/1567) - Invalidate ``/api/settings`` cache on change of the user's login state (include user roles into ETag calculation).
* [#1586](https://github.com/foosel/OctoPrint/issues/1586) - Fixed incompatibility of update script and command line helper with non-ASCII output from called commands.
* [#1588](https://github.com/foosel/OctoPrint/issues/1588) - Fixed feedback controls again.
* Invalidate ``/api/settings`` cache on change of the currently enabled plugins (by including plugin names into ETag calculation) and/or on change of the current effective config.
* Invalidate ``/api/timelapse`` cache on change of the current timelapse configuration.
* Fixed an issue causing the version number not to be properly extracted from ``sdist`` tarballs generated under Windows.
* Get rid of double scroll bar in printer profile editor.
* Fixed tracking of current byte position in file being streamed from disk. Turns out that ``self._handle.tell`` lied to us thanks to line buffering.
* Fixed select & print not working anymore for SD files thanks to a timing issue.
* Fixed ``PrintFailed`` event payload (was still missing new folder relevant data).
* Fixed premature parse stop on ``M114`` and ``M115`` responses with ``ok``-prefix.
* Make sure `?l10n` request parameter gets also propagated to API calls as `X-Locale` header in case of locale sensitive API responses.
* Fix language mixture due to cached template configs including localized strings; cache per locale.
* Only insert divider in system menu after core commands if there are custom commands.
* Fix update of webcam stream URL not being applied due to caching.
* Fixed a rare race condition causing the new "The settings changed, reload?" popup to show up even when the settings change originated in the same client instance.
* Fixed a bunch of missing translations.
* Pinned Tornado version to 4.0.2. Former version requirement was able to pull in a beta version causing issues with websockets due to a bug in `permessage-deflate` handling. The Tornado requirement needs an update, but we'll leave it at 4.0.2 for 1.3.0 since we'll need to do some migration work for compatibility with anything newer. Potentially related to [#1523](https://github.com/foosel/OctoPrint/issues/1523).
### Changes from `maintenance` not yet released as part of a stable release
#### Bug fixes
* [#1567](https://github.com/foosel/OctoPrint/issues/1567) - Fix issue with restricted settings getting parsed to the wrong data structure in the frontend if loaded anonymously first.
* [#1571](https://github.com/foosel/OctoPrint/issues/1571) - Fix parsing of port number from HTTP Host header for IPv6 addresses
* Fix issue with settings restriction causing internal settings defaults to be changed.
([Commits](https://github.com/foosel/OctoPrint/compare/1.3.0rc1...1.3.0rc2))
## 1.3.0rc1 (2016-10-19)
### New Features
* You can now create folders in the file list, upload files into said folders and thus better manage your projects' files.
* New wizard dialog for system setups that can also be extended by plugins. Replaces the first run dialog for setting up access control and can also be triggered in other cases than only the first run, e.g. if plugins necessitate user input to function properly. Added wizards to help configuring the following components in OctoPrint on first run: access control, webcam URLs & ffmpeg path, server commands (restart, shutdown, reboot), printer profile. Also extended the bundled Cura plugin to add a wizard for its first setup to adjust path and import a slicing profile, and the bundled Software Update plugin to ask the user for details regarding the OctoPrint update configuration. Also see below.
* New command line interface (CLI). Offers the same functionality as the old one plus:
@@ -72,17 +13,27 @@
* New features within the plugin system:
* Plugins may now give hints in which order various hooks or mixin methods should be called by optionally providing an integer value that will be used for sorting the callbacks prior to execution.
* Plugins may now define configuration overlays to be applied on top of the default configuration but before ``config.yaml``.
* New mixin ``UiPlugin` for plugins that want to provide an alternative web interface delivered by the server.
* New mixin `UiPlugin` for plugins that want to provide an alternative web interface delivered by the server.
* New mixin ``WizardPlugin`` for plugins that want to provide wizard components to OctoPrint's new wizard dialog.
* New hook ``octoprint.cli.commands`` for registering a command with the new OctoPrint CLI
* New hook ``octoprint.comm.protocol.gcode.received`` for receiving messages from the printer
* New hook ``octoprint.printer.factory`` for providing a custom factory to contruct the global ``PrinterInterface`` implementation.
* New ``TemplatePlugin`` template type: ``wizard``
* New Javascript client library for utilizing the server's API, can be reused by `UiPlugin`s.
* OctoPrint will now track the current print head position on pause and cancel and provide it as new template variables ``pause_position``/``cancel_position`` for the relevant GCODE scripts. This will allow more intelligent pause codes that park the print head at a rest position during pause and move it back to the exact position it was before the pause on resume ([Example](https://gist.github.com/foosel/1c09e269b1c0bb7a471c20eef50c8d3e)). Note that this is NOT enabled by default and for now will necessitate adjusting the pause and resume GCODE scripts yourself since position tracking with multiple extruders or when printing from SD is currently not fool proof thanks to firmware limitations regarding reliable tracking of the various ``E`` values and the currently selected tool ``T``. In order to fully implement this feature, the following improvements were also done:
* New ``PositionUpdated`` event when OctoPrint receives a response to an ``M114`` position query.
* Extended ``PrintPaused`` and ``PrintCancelled`` events with position data from ``M114`` position query on print interruption/end.
* Added (optional) firmware auto detection. If enabled (which it is by default), OctoPrint will now send an ``M115`` to the printer on initial connection in order to try to figure out what kind of firmware it is. For FIRMWARE_NAME values containing "repetier" (case insensitive), all Repetier-specific flags will be set on the comm layer. For FIRMWARE_NAME values containing "reprapfirmware" (also case insensitive), all RepRapFirmware-specific flags will be set on the comm layer. For now no other handling will be performed.
* Added safe mode flag ``--safe`` and config setting ``startOnceInSafeMode`` that disables all third party plugins when active. The config setting will automatically be removed from `config.yaml` after the server has started through successfully.
* Added ``octoprint config`` CLI that allows easier manipulation of config.yaml entries from the command line. Example: ``octoprint config set --bool server.startOnceInSafeMode true``
### Improvements
* [#1048](https://github.com/foosel/OctoPrint/issues/1048) - Added "Last print time" to extended file information (see also [#1522](https://github.com/foosel/OctoPrint/pull/1522))
* [#1422](https://github.com/foosel/OctoPrint/issues/1422) - Added option for post roll for timed timelapse to duplicate last frame instead of capturing new frames. That makes for a faster render at the cost of a still frame at the end of the rendered video. See also [#1553](https://github.com/foosel/OctoPrint/pull/1553).
* [#1551](https://github.com/foosel/OctoPrint/issues/1551) - Allow to define a custom bounding box for valid printer head movements in the printer profile, to make print dimension check more flexible.
* [#1583](https://github.com/foosel/OctoPrint/pull/1583) - Strip invalid `pip` arguments from `pip uninstall` commands, if provided by the user as additional pip arguments.
* [#1593](https://github.com/foosel/OctoPrint/issues/1593) - Automatically migrate old manual system commands for restarting OctoPrint and rebooting or shutting down the server to the new system wide configuration settings. Make a backup copy of the old `config.yaml` before doing so in case a manual rollback is required.
* New central configuration option for commands to restart OctoPrint and to restart and shut down the system OctoPrint is running on. This allows plugins (like the Software Update Plugin or the Plugin Manager) and core functionality to perform these common administrative tasks without the user needing to define everything redundantly.
* `pip` helper now adjusts `pip install` parameters corresponding to detected `pip` version:
* Removes `--process-dependency-links` when it's not needed
@@ -112,6 +63,9 @@
* Renamed ``GcodeFilesViewModel`` to ``FilesViewModel`` - plugin authors should accordingly update their dependencies from ``gcodeFilesViewModel`` to ``filesViewModel``. Using the old name still works, but will log a warning and stop working with 1.4.x.
* Make sure ``volume.depth`` for circular beds is forced to ``volume.width`` in printer profiles
* Support for `M116`
* Support ``M114`` responses without whitespace between coordinates (protocol consistency - who needs it?).
* `M600` is now marked as a long running command by default.
* Don't focus files in the file list after deleting a file - made the list too jumpy.
* Cura plugin: "Test" button to check if path to cura engine is valid.
* Cura plugin: Wizard component for configuring the path to the CuraEngine binary and for importing the first slicing profile
* GCODE viewer: Added Layer Up/Down buttons (see also [#1306] (https://github.com/foosel/OctoPrint/pull/1306))
@@ -124,46 +78,69 @@
* Plugin Manager: Track managable vs not managable plugins
* Plugin Manager: Allow hiding plugins from Plugin Manager via ``config.yaml``.
* Plugin Manager: Limit upload dialog for plugin archives to .zip, .tar.gz, .tgz and .tar extensions.
* Plugin Manager: Allow closing of all notifications and close them automatically on detected server disconnect. No need to keep a "Restart needed" message around if a restart is in progress.
* Software Update plugin: More verbose output for logged in administrators. Will now log the update commands and their output similar to the Plugin Manager install and uninstall dialog.
* Software Update plugin: CLI for checking for and applying updates
* Software Update plugin: Wizard component for configuring OctoPrint's update mechanism
* Software Update plugin: "busy" spinner on check buttons while already checking for updates.
* Software Update plugin: Prevent update notification when wizard is open.
* Plugin Manager / Software Update plugin: The "There's a new version of pip" message during plugin installs and software updates is no longer displayed like an error.
* Plugin Manager / Software Update plugin: The "busy" dialog can no longer be closed accidentally.
* Timelapse: Better (& earlier) reporting to the user when something's up with the snapshot URL causing issues with capturing timelapse frames and hence making it impossible to render a timelapse movie on print completion.
* Virtual printer: Usage screen for the ``!!DEBUG`` commands on ``!!DEBUG", ``!!DEBUG:help`` or ``!!DEBUG:?``
* Virtual printer: Usage screen for the ``!!DEBUG`` commands on ``!!DEBUG``, ``!!DEBUG:help`` or ``!!DEBUG:?``
* Updated frontend dependencies (possibly relevant for plugin authors):
* Bootstrap to 2.3.2
* JQuery to 2.2.4
* Lodash to 3.10.1
* SockJS to 1.1.1
* Better error resilience against errors in UI components.
* Various improvements in the GCODE interpreter which performs the GCODE analysis
* Various adjustments towards Python 3 compatibility (still a work in progress though, see also [#1411](https://github.com/foosel/OctoPrint/pull/1411), [#1412](https://github.com/foosel/OctoPrint/pull/1412), [#1413](https://github.com/foosel/OctoPrint/pull/1413), [#1414](https://github.com/foosel/OctoPrint/pull/1414))
* Various code refactorings
* Various small UI improvements
* Various documentation improvements
### Bug Fixes
### Bug fixes
* [#1047](https://github.com/foosel/OctoPrint/issues/1047) - Fixed 90 degree webcam rotation for iOS Safari.
* [#1148](https://github.com/foosel/OctoPrint/issues/1148) - Fixed retraction z hop setting for Z-triggered timelapses. Was not correctly propagated to the backend and hence not taking effect.
* [#1567](https://github.com/foosel/OctoPrint/issues/1567) - Invalidate ``/api/settings`` cache on change of the user's login state (include user roles into ETag calculation).
* [#1586](https://github.com/foosel/OctoPrint/issues/1586) - Fixed incompatibility of update script and command line helper with non-ASCII output from called commands.
* [#1588](https://github.com/foosel/OctoPrint/issues/1588) - Fixed feedback controls again.
* [#1599](https://github.com/foosel/OctoPrint/issues/1599) - Properly handle exceptions that arise within the update script during runtime.
* It's not possible anymore to select files that are not machinecode files (e.g. GCODE) for printing on the file API.
* Changes to a user's personal settings via the UI now propagate across sessions.
* Improved compatibility of webcam rotation CSS across newer browsers (see also [#1436](https://github.com/foosel/OctoPrint/pull/1436))
* Fix for system menu not getting properly reloaded after entries changed
* Invalidate ``/api/settings`` cache on change of the currently enabled plugins (by including plugin names into ETag calculation) and/or on change of the current effective config.
* Fix for `/api/settings` not being properly invalidated for plugin settings that do not have a representation in `config.yaml` but are only added at runtime (and hence are not captured by `config.effective`).
* Invalidate ``/api/timelapse`` cache on change of the current timelapse configuration.
* Fixed an issue causing the version number not to be properly extracted from ``sdist`` tarballs generated under Windows.
* Get rid of double scroll bar in printer profile editor.
* Fixed tracking of current byte position in file being streamed from disk. Turns out that ``self._handle.tell`` lied to us thanks to line buffering.
* Fixed select & print not working anymore for SD files thanks to a timing issue.
* Fixed ``PrintFailed`` event payload (was still missing new folder relevant data).
* Fixed premature parse stop on ``M114`` and ``M115`` responses with ``ok``-prefix.
* Make sure `?l10n` request parameter gets also propagated to API calls as `X-Locale` header in case of locale sensitive API responses.
* Fix language mixture due to cached template configs including localized strings; cache per locale.
* Only insert divider in system menu after core commands if there are custom commands.
* Fix update of webcam stream URL not being applied due to caching.
* Fixed a rare race condition causing the new "The settings changed, reload?" popup to show up even when the settings change originated in the same client instance.
* Fixed a bunch of missing translations.
* Pinned Tornado version to 4.0.2. Former version requirement was able to pull in a beta version causing issues with websockets due to a bug in `permessage-deflate` handling. The Tornado requirement needs an update, but we'll leave it at 4.0.2 for 1.3.0 since we'll need to do some migration work for compatibility with anything newer. Potentially related to [#1523](https://github.com/foosel/OctoPrint/issues/1523).
* Fix a rare race condition in the command line helper and the update script that could cause the code to hang due to waiting on an event that would never be set.
* Fix issue with handling new settings substructures when they are compared to existing settings data in order to find the structural diff.
* Fix for the temperature graph not displaying the data history on site reload.
### Changes from `maintenance` not yet released as part of a stable release
### More information
#### Improvements
* [Commits](https://github.com/foosel/OctoPrint/compare/1.2.18...1.3.0)
* Release Candidates:
* [1.3.0rc1](https://github.com/foosel/OctoPrint/releases/tag/1.3.0rc1)
* [1.3.0rc2](https://github.com/foosel/OctoPrint/releases/tag/1.3.0rc2)
* [1.3.0rc3](https://github.com/foosel/OctoPrint/releases/tag/1.3.0rc3)
* Allow arbitrary frame rates for creating timelapses. Before, the entered fps value was also directly used as frame rate for the actual video, which could cause problems with any frame rates not specified in the MPEG2 standard. Now OctoPrint will use a standard frame rate for the rendered video and render the timelapse stills into the finished movie with the configured frame rate.
* Limit Cura profile importer to `.ini` files and clarified the supported versions
* Add support for the `R` parameter for `M109` and `M190`
#### Bug fixes
* [#1541](https://github.com/foosel/OctoPrint/issues/1541) - Fix selecting the printer profile to use by default
* [#1543](https://github.com/foosel/OctoPrint/issues/1543) - Fix target temperature propagation from communication layer
([Commits](https://github.com/foosel/OctoPrint/compare/1.2.16...1.3.0rc1))
## 1.2.18rc1 (2016-11-22)
## 1.2.18 (2016-11-30)
### Improvements
@@ -179,7 +156,11 @@
* [#1571](https://github.com/foosel/OctoPrint/issues/1571) - Fix parsing of port number from HTTP Host header for IPv6 addresses
* Fix issue with settings restriction causing internal settings defaults to be changed.
([Commits](https://github.com/foosel/OctoPrint/compare/1.2.17...1.2.18))
### More information
* [Commits](https://github.com/foosel/OctoPrint/compare/1.2.17...1.2.18)
* Release Candidates:
* [1.2.18rc1](https://github.com/foosel/OctoPrint/releases/tag/1.2.18rc1)
## 1.2.17 (2016-11-08)
+3 -4
View File
@@ -14,7 +14,6 @@ thanks to everyone who contributed!
* Bart Zudell
* Boris Hussein
* Brad Jackson
* Brad Mooneyham
* Brent Fiegle
* Brian E. Tyler
* Charles Mitchell
@@ -34,6 +33,7 @@ thanks to everyone who contributed!
* Gary N McKinney
* George Robles
* J. Eckert
* Jamie van Dyke
* Jason Galarneau
* Josh Daniels
* Joshua David Gregory
@@ -41,13 +41,12 @@ thanks to everyone who contributed!
* Kale Stedman
* Kazuhiro Ogura
* Lamin Kivelä
* M Khorakiwala
* Makespace Madrid
* Marcus Ackermann
* Mark Qvist
* Mark Walker
* Masayoshi Mitsui
* Michael Aumock
* Michael McDargh Sr
* Miles Flavel
* Noe Ruiz
* Patrick McGinnis
@@ -70,4 +69,4 @@ thanks to everyone who contributed!
* Thomas Hatley
* Trent Shumay
and 989 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel)!
and 972 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel)!
+7 -3
View File
@@ -255,14 +255,18 @@
**Example:**
Uploading a file from a file input element, updating a label with the current upload progress.
Uploading a file to ``some/path`` on the blueprint of plugin ``myplugin``, from a file input element,
updating a label with the current upload progress.
.. code-block:: javascript
var fileInput = $("#my-file-input");
var progressOutput = $("#progress-output");
OctoPrint.upload("/plugins/myplugin/some/path", fileInput, "myfilename.dat", {"somekey": "somevalue"})
OctoPrint.upload(OctoPrint.getBlueprintUrl("myplugin") + "some/path",
fileInput,
"myfilename.dat",
{"somekey": "somevalue"})
.progress(function(data) {
if (data.total) {
var percentage = Math.round(data.loaded * 100 / data.total);
@@ -277,7 +281,7 @@
progressOutput.text("Uploaded!");
});
:param string url: The URL to ``POST`` the upload to
:param string url: URL to which to POST the upload, relative to base url or absolute
:param object file: The file to object, see description for details
:param string filename: An optional file name to use for the upload
:param object additional: An optional object of additional key/value pairs to set on the uploaded form data
+11 -2
View File
@@ -5,7 +5,8 @@ JavaScript Client Library
#########################
The JS Client Library provides an interface to all of OctoPrint's API, including the SockJS based socket to send
push messages from the server to connected clients. It is available as packed web asset file at ``/static/webassets/packed_client.js`` or as individual
push messages from the server to connected clients. It is available as packed web
asset file at ``/static/webassets/packed_client.js`` or as individual
component files at ``/static/js/app/client/<component>.js`` relative to your
OctoPrint instance's base URL (e.g. ``http://octopi.local/static/webassets/packed_client.js``).
@@ -27,10 +28,18 @@ correct URL prefix:
<script type="text/javascript" src="{{ url_for("static", filename="webassets/packed_client.js") }}"></script>
<!--
individual components
individual components (do not forget base!)
-->
<script type="text/javascript" src="{{ url_for("static", filename="js/app/client/<component>.js") }}"></script>
Regardless of which way you use to include the library, you'll also need to make sure you included JQuery and lodash,
because the library depends on those to be available (as ``$`` and ``_``). You can embed those like this:
.. code-block:: html
<script src="{{ url_for("static", filename="js/lib/jquery/jquery.min.js") }}"></script>
<script src="{{ url_for("static", filename="js/lib/lodash.min.js") }}"></script>
Note that all components depend on the ``base`` component to be present, so if you are only including a select
number of components, make sure to at the very least include that one to be able to utilize the client.
@@ -8,6 +8,8 @@ __copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms
import errno
import sys
import traceback
import time
def _log_call(*lines):
_log(lines, prefix=">", stream="call")
@@ -61,39 +63,54 @@ def _execute(command, **kwargs):
try:
p = sarge.run(command, **kwargs)
p.wait_events()
except Exception as e:
import traceback
exception_lines = traceback.format_exc()
error = "Error while trying to run command {}: {}\n{}".format(joined_command, str(e), exception_lines)
return None, "", error
while len(p.commands) == 0:
# somewhat ugly... we can't use wait_events because
# the events might not be all set if an exception
# by sarge is triggered within the async process
# thread
time.sleep(0.01)
# by now we should have a command, let's wait for its
# process to have been prepared
p.commands[0].process_ready.wait()
if not p.commands[0].process:
# the process might have been set to None in case of any exception
print("Error while trying to run command {}".format(joined_command), file=sys.stderr)
return None, [], []
except:
print("Error while trying to run command {}".format(joined_command), file=sys.stderr)
traceback.print_exc(file=sys.stderr)
return None, [], []
all_stdout = []
all_stderr = []
try:
while p.returncode is None:
while p.commands[0].poll() is None:
lines = p.stderr.readlines(timeout=0.5)
if lines:
lines = map(lambda x: _to_unicode(x, errors="replace"), lines)
_log_stderr(*lines)
all_stderr += list(lines)
lines = p.stdout.readlines(timeout=0.5)
if lines:
lines = map(lambda x: _to_unicode(x, errors="replace"), lines)
_log_stdout(*lines)
all_stdout += list(lines)
p.commands[0].poll()
finally:
p.close()
lines = p.stderr.readlines()
if lines:
lines = map(lambda x: _to_unicode(x, errors="replace"), lines)
_log_stderr(*lines)
all_stderr += lines
lines = p.stdout.readlines()
if lines:
lines = map(lambda x: _to_unicode(x, errors="replace"), lines)
_log_stdout(*lines)
all_stdout += lines
@@ -107,27 +124,31 @@ def _get_git_executables():
return GITS
def _git(args, cwd, verbose=False, git_executable=None):
def _git(args, cwd, git_executable=None):
if git_executable is not None:
commands = [git_executable]
else:
commands = _get_git_executables()
for c in commands:
command = [c] + args
try:
return _execute([c] + args, cwd=cwd)
return _execute(command, cwd=cwd)
except EnvironmentError:
e = sys.exc_info()[1]
if e.errno == errno.ENOENT:
continue
if verbose:
print("unable to run %s" % args[0])
print(e)
return None, None, None
print("Error while trying to run command {}".format(" ".join(command)), file=sys.stderr)
traceback.print_exc(file=sys.stderr)
return None, [], []
except:
print("Error while trying to run command {}".format(" ".join(command)), file=sys.stderr)
traceback.print_exc(file=sys.stderr)
return None, [], []
else:
if verbose:
print("unable to find command, tried %s" % (commands,))
return None, None, None
print("Unable to find git command, tried {}".format(", ".join(commands)), file=sys.stderr)
return None, [], []
def _python(args, cwd, python_executable, sudo=False):
@@ -137,31 +158,40 @@ def _python(args, cwd, python_executable, sudo=False):
try:
return _execute(command, cwd=cwd)
except:
return None, None, None
import traceback
print("Error while trying to run command {}".format(" ".join(command)), file=sys.stderr)
traceback.print_exc(file=sys.stderr)
return None, [], []
def _to_error(*lines):
return u"".join(map(lambda x: _to_unicode(x, errors="replace"), lines))
if len(lines) == 1:
if isinstance(lines[0], (list, tuple)):
lines = lines[0]
elif not isinstance(lines[0], (str, unicode)):
lines = [repr(lines[0]),]
return u"\n".join(map(lambda x: _to_unicode(x, errors="replace"), lines))
def _rescue_changes(git_executable, folder):
print(">>> Running: git diff --shortstat")
returncode, stdout, stderr = _git(["diff", "--shortstat"], folder, git_executable=git_executable)
if returncode != 0:
raise RuntimeError("Could not update, \"git diff\" failed with returncode %d: %s" % (returncode, _to_error(*stdout)))
if stdout and "".join(stdout).strip():
if returncode is None or returncode != 0:
raise RuntimeError("Could not update, \"git diff\" failed with returncode {}".format(returncode))
if stdout and u"".join(stdout).strip():
# we got changes in the working tree, maybe from the user, so we'll now rescue those into a patch
import time
import os
timestamp = time.strftime("%Y%m%d%H%M")
patch = os.path.join(folder, "%s-preupdate.patch" % timestamp)
patch = os.path.join(folder, "{}-preupdate.patch".format(timestamp))
print(">>> Running: git diff and saving output to %s" % timestamp)
print(">>> Running: git diff and saving output to {}".format(patch))
returncode, stdout, stderr = _git(["diff"], folder, git_executable=git_executable)
if returncode != 0:
raise RuntimeError("Could not update, installation directory was dirty and state could not be persisted as a patch to %s" % patch)
if returncode is None or returncode != 0:
raise RuntimeError("Could not update, installation directory was dirty and state could not be persisted as a patch to {}".format(patch))
with open(patch, "wb") as f:
import codecs
with codecs.open(patch, "w", encoding="utf-8", errors="replace") as f:
for line in stdout:
f.write(line)
@@ -174,46 +204,45 @@ def update_source(git_executable, folder, target, force=False, branch=None):
if _rescue_changes(git_executable, folder):
print(">>> Running: git reset --hard")
returncode, stdout, stderr = _git(["reset", "--hard"], folder, git_executable=git_executable)
if returncode != 0:
raise RuntimeError("Could not update, \"git reset --hard\" failed with returncode %d: %s" % (returncode, _to_error(*stdout)))
if returncode is None or returncode != 0:
raise RuntimeError("Could not update, \"git reset --hard\" failed with returncode {}".format(returncode))
print(">>> Running: git clean -f -d -e *-preupdate.patch")
returncode, stdout, stderr = _git(["clean", "-f", "-d", "-e", "*-preupdate.patch"], folder, git_executable=git_executable)
if returncode != 0:
raise RuntimeError("Could not update, \"git clean -f\" failed with returcode %d: %s" % (returncode, _to_error(*stdout)))
if returncode is None or returncode != 0:
raise RuntimeError("Could not update, \"git clean -f\" failed with returncode {}".format(returncode))
print(">>> Running: git fetch")
returncode, stdout, stderr = _git(["fetch"], folder, git_executable=git_executable)
if returncode != 0:
raise RuntimeError("Could not update, \"git fetch\" failed with returncode %d: %s" % (returncode, _to_error(*stdout)))
print(stdout)
if returncode is None or returncode != 0:
raise RuntimeError("Could not update, \"git fetch\" failed with returncode {}".format(returncode))
if branch is not None and branch.strip() != "":
print(">>> Running: git checkout {}".format(branch))
returncode, stdout, stderr = _git(["checkout", branch], folder, git_executable=git_executable)
if returncode != 0:
raise RuntimeError("Could not update, \"git checkout\" failed with returncode %d: %s" % (returncode, _to_error(*stdout)))
if returncode is None or returncode != 0:
raise RuntimeError("Could not update, \"git checkout\" failed with returncode {}".format(returncode))
print(">>> Running: git pull")
returncode, stdout, stderr = _git(["pull"], folder, git_executable=git_executable)
if returncode != 0:
raise RuntimeError("Could not update, \"git pull\" failed with returncode %d: %s" % (returncode, _to_error(*stdout)))
if returncode is None or returncode != 0:
raise RuntimeError("Could not update, \"git pull\" failed with returncode {}".format(returncode))
if force:
reset_command = ["reset", "--hard"]
reset_command += [target]
print(">>> Running: git %s" % " ".join(reset_command))
print(">>> Running: git {}".format(" ".join(reset_command)))
returncode, stdout, stderr = _git(reset_command, folder, git_executable=git_executable)
if returncode != 0:
raise RuntimeError("Error while updating, \"git %s\" failed with returncode %d: %s" % (" ".join(reset_command), returncode, _to_error(*stdout)))
if returncode is None or returncode != 0:
raise RuntimeError("Error while updating, \"git {}\" failed with returncode {}".format(" ".join(reset_command), returncode))
def install_source(python_executable, folder, user=False, sudo=False):
print(">>> Running: python setup.py clean")
returncode, stdout, stderr = _python(["setup.py", "clean"], folder, python_executable)
if returncode != 0:
print("\"python setup.py clean\" failed with returncode %d: %s" % (returncode, stdout))
if returncode is None or returncode != 0:
print("\"python setup.py clean\" failed with returncode {}".format(returncode))
print("Continuing anyways")
print(">>> Running: python setup.py install")
@@ -221,15 +250,14 @@ def install_source(python_executable, folder, user=False, sudo=False):
if user:
args.append("--user")
returncode, stdout, stderr = _python(args, folder, python_executable, sudo=sudo)
if returncode != 0:
raise RuntimeError("Could not update, \"python setup.py install\" failed with returncode %d: %s" % (returncode, _to_error(*stdout)))
if returncode is None or returncode != 0:
raise RuntimeError("Could not update, \"python setup.py install\" failed with returncode {}".format(returncode))
def parse_arguments():
import argparse
boolean_trues = ["true", "yes", "1"]
boolean_falses = ["false", "no", "0"]
parser = argparse.ArgumentParser(prog="update-octoprint.py")
@@ -28,6 +28,7 @@ def _filter_out_latest(releases,
>>> release_1_2_16rc2 = dict(name="1.2.16rc2", tag_name="1.2.16rc2", html_url="some_url", published_at="2016-08-30T12:00:00Z", prerelease=True, draft=False, target_commitish="rc/maintenance")
>>> release_1_2_17rc1 = dict(name="1.2.17rc1", tag_name="1.2.17rc1", html_url="some_url", published_at="2016-08-31T12:00:00Z", prerelease=True, draft=True, target_commitish="rc/maintenance")
>>> release_1_3_0rc1 = dict(name="1.3.0rc1", tag_name="1.3.0rc1", html_url="some_url", published_at="2016-12-12T12:00:00Z", prerelease=True, draft=False, target_commitish="rc/devel")
>>> release_1_2_18 = dict(name="1.2.18", tag_name="1.2.18", html_url="some_url", published_at="2016-12-13T12:00:00Z", prerelease=False, draft=False, target_commitish="master")
>>> release_1_4_0rc1 = dict(name="1.4.0rc1", tag_name="1.4.0rc1", html_url="some_url", published_at="2017-12-12T12:00:00Z", prerelease=True, draft=False, target_commitish="rc/future")
>>> releases = [release_1_2_15, release_1_2_16rc1, release_1_2_16rc2, release_1_2_17rc1, release_1_3_0rc1, release_1_4_0rc1]
>>> _filter_out_latest(releases, include_prerelease=False, prerelease_channel=None)
@@ -44,6 +45,14 @@ def _filter_out_latest(releases,
(None, None, None)
>>> _filter_out_latest([release_1_2_16rc1, release_1_2_16rc2])
(None, None, None)
>>> comparable_factory = _get_comparable_factory("python", force_base=True)
>>> sort_key = lambda release: comparable_factory(_get_sanitized_version(release["tag_name"]))
>>> _filter_out_latest(releases + [release_1_2_18], include_prerelease=False, prerelease_channel=None, sort_key=sort_key)
('1.2.18', '1.2.18', 'some_url')
>>> _filter_out_latest(releases + [release_1_2_18], include_prerelease=True, prerelease_channel="rc/maintenance", sort_key=sort_key)
('1.2.18', '1.2.18', 'some_url')
>>> _filter_out_latest(releases + [release_1_2_18], include_prerelease=True, prerelease_channel="rc/devel", sort_key=sort_key)
('1.3.0rc1', '1.3.0rc1', 'some_url')
"""
nothing = None, None, None
+44 -11
View File
@@ -32,6 +32,13 @@ def _etag(lm=None):
connection_options = printer.__class__.get_connection_options()
plugins = sorted(octoprint.plugin.plugin_manager().enabled_plugins)
plugin_settings = _get_plugin_settings()
from collections import OrderedDict
sorted_plugin_settings = OrderedDict()
for key in sorted(plugin_settings.keys()):
sorted_plugin_settings[key] = plugin_settings.get(key, dict())
if current_user is not None and not current_user.is_anonymous():
roles = sorted(current_user.roles)
else:
@@ -39,11 +46,26 @@ def _etag(lm=None):
import hashlib
hash = hashlib.sha1()
# last modified timestamp
hash.update(str(lm))
# effective config from config.yaml + overlays
hash.update(repr(settings().effective))
# might duplicate settings().effective, but plugins might also inject additional keys into the settings
# output that are not stored in config.yaml
hash.update(repr(sorted_plugin_settings))
# connection options are also part of the settings
hash.update(repr(connection_options))
# if the list of plugins changes, the settings structure changes too
hash.update(repr(plugins))
# and likewise if the role of the user changes
hash.update(repr(roles))
return hash.hexdigest()
@api.route("/settings", methods=["GET"])
@@ -51,8 +73,6 @@ def _etag(lm=None):
lastmodified_factory=_lastmodified,
unless=lambda: request.values.get("force", "false") in valid_boolean_trues)
def getSettings():
logger = logging.getLogger(__name__)
s = settings()
connectionOptions = printer.__class__.get_connection_options()
@@ -180,32 +200,45 @@ def getSettings():
for name in gcode_scripts:
data["scripts"]["gcode"][name] = s.loadScript("gcode", name, source=True)
plugin_settings = _get_plugin_settings()
if len(plugin_settings):
data["plugins"] = plugin_settings
return jsonify(data)
def _get_plugin_settings():
logger = logging.getLogger(__name__)
data = dict()
def process_plugin_result(name, result):
if result:
try:
jsonify(test=result)
except:
logger.exception("Error while jsonifying settings from plugin {}, please contact the plugin author about this".format(name))
if not "plugins" in data:
data["plugins"] = dict()
if "__enabled" in result:
del result["__enabled"]
data["plugins"][name] = result
raise
else:
if "__enabled" in result:
del result["__enabled"]
data[name] = result
for plugin in octoprint.plugin.plugin_manager().get_implementations(octoprint.plugin.SettingsPlugin):
try:
result = plugin.on_settings_load()
process_plugin_result(plugin._identifier, result)
except TypeError:
logger.warn("Could not load settings for plugin {name} ({version}) since it called super(...)".format(name=plugin._plugin_name, version=plugin._plugin_version))
logger.warn("Could not load settings for plugin {name} ({version}) since it called super(...)".format(name=plugin._plugin_name,
version=plugin._plugin_version))
logger.warn("in a way which has issues due to OctoPrint's dynamic reloading after plugin operations.")
logger.warn("Please contact the plugin's author and ask to update the plugin to use a direct call like")
logger.warn("octoprint.plugin.SettingsPlugin.on_settings_load(self) instead.")
except:
logger.exception("Could not load settings for plugin {name} ({version})".format(version=plugin._plugin_version, name=plugin._plugin_name))
logger.exception("Could not load settings for plugin {name} ({version})".format(version=plugin._plugin_version,
name=plugin._plugin_name))
return jsonify(data)
return data
@api.route("/settings", methods=["POST"])
+7 -1
View File
@@ -168,6 +168,7 @@
}
filename = filename || fileData.name;
var filesize = fileData.size;
var form = new FormData();
form.append("file", fileData, filename);
@@ -221,7 +222,12 @@
var headers = OctoPrint.getRequestHeaders();
request.open("POST", OctoPrint.getBaseUrl() + url);
var urlToCall = url;
if (!_.startsWith(url, "http://") && !_.startsWith(url, "https://")) {
urlToCall = OctoPrint.getBaseUrl() + url;
}
request.open("POST", urlToCall);
_.each(headers, function(value, key) {
request.setRequestHeader(key, value);
});
+7 -2
View File
@@ -777,9 +777,14 @@ function getOnlyChangedData(data, oldData) {
var retval = {};
_.forOwn(root, function(value, key) {
var oldValue = oldRoot[key];
var oldValue = undefined;
if (oldRoot != undefined && oldRoot.hasOwnProperty(key)) {
oldValue = oldRoot[key];
}
if (_.isPlainObject(value)) {
if (hasDataChanged(value, oldValue)) {
if (oldValue == undefined) {
retval[key] = value;
} else if (hasDataChanged(value, oldValue)) {
retval[key] = f(value, oldValue);
}
} else {
@@ -36,6 +36,10 @@ $(function() {
self.heaterOptions = ko.observable({});
self._printerProfileInitialized = false;
self._currentTemperatureDataBacklog = [];
self._historyTemperatureDataBacklog = [];
self._printerProfileUpdated = function() {
var graphColors = ["red", "orange", "green", "brown", "purple"];
var heaterOptions = {};
@@ -81,6 +85,10 @@ $(function() {
// write back
self.heaterOptions(heaterOptions);
self.tools(tools);
if (!self._printerProfileInitialized) {
self._triggerBacklog();
}
self.updatePlot();
};
self.settingsViewModel.printerProfiles.currentProfileData.subscribe(function() {
@@ -126,16 +134,36 @@ $(function() {
self.fromCurrentData = function(data) {
self._processStateData(data.state);
self._processTemperatureUpdateData(data.serverTime, data.temps);
if (!self._printerProfileInitialized) {
self._currentTemperatureDataBacklog.push(data);
} else {
self._processTemperatureUpdateData(data.serverTime, data.temps);
}
self._processOffsetData(data.offsets);
};
self.fromHistoryData = function(data) {
self._processStateData(data.state);
self._processTemperatureHistoryData(data.serverTime, data.temps);
if (!self._printerProfileInitialized) {
self._historyTemperatureDataBacklog.push(data);
} else {
self._processTemperatureHistoryData(data.serverTime, data.temps);
}
self._processOffsetData(data.offsets);
};
self._triggerBacklog = function() {
_.each(self._historyTemperatureDataBacklog, function(data) {
self._processTemperatureHistoryData(data.serverTime, data.temps);
});
_.each(self._currentTemperatureDataBacklog, function(data) {
self._processTemperatureUpdateData(data.serverTime, data.temps);
});
self._historyTemperatureDataBacklog = [];
self._currentTemperatureDataBacklog = [];
self._printerProfileInitialized = true;
};
self._processStateData = function(data) {
self.isErrorOrClosed(data.flags.closedOrError);
self.isOperational(data.flags.operational);
@@ -217,14 +245,17 @@ $(function() {
})
});
var filterOld = function(item) {
return item[0] >= clientTime - self.temperature_cutoff() * 60 * 1000;
};
var temperature_cutoff = self.temperature_cutoff();
if (temperature_cutoff != undefined) {
var filterOld = function(item) {
return item[0] >= clientTime - temperature_cutoff * 60 * 1000;
};
_.each(_.keys(self.heaterOptions()), function(d) {
result[d].actual = _.filter(result[d].actual, filterOld);
result[d].target = _.filter(result[d].target, filterOld);
});
_.each(_.keys(self.heaterOptions()), function(d) {
result[d].actual = _.filter(result[d].actual, filterOld);
result[d].target = _.filter(result[d].target, filterOld);
});
}
return result;
};
@@ -7,6 +7,6 @@
<p>{% trans url='http://octoprint.org/support-octoprint/' %}
If you enjoy OctoPrint, please consider <a href="{{ url }}" target="_blank">supporting its ongoing
development</a>. You can find find this link also in the "About" dialog. Thank you!
development</a>, which is fully funded by users like you! You can also find this link in the "About" dialog. <strong>Thank you!</strong>
{% endtrans %}</p>
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: OctoPrint\n"
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
"POT-Creation-Date: 2016-11-24 12:53+0100\n"
"PO-Revision-Date: 2016-11-24 12:54+0100\n"
"POT-Creation-Date: 2016-12-02 12:37+0100\n"
"PO-Revision-Date: 2016-12-02 12:38+0100\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"
@@ -1570,12 +1570,12 @@ msgstr "Trennen"
#: src/octoprint/static/js/app/viewmodels/files.js:589
#: src/octoprint/static/js/app/viewmodels/gcode.js:482
#: src/octoprint/static/js/app/viewmodels/printerstate.js:231
#: src/octoprint/static/js/app/viewmodels/temperature.js:58
#: src/octoprint/static/js/app/viewmodels/temperature.js:62
msgid "Tool"
msgstr "Werkzeug"
#: src/octoprint/static/js/app/viewmodels/control.js:68
#: src/octoprint/static/js/app/viewmodels/temperature.js:69
#: src/octoprint/static/js/app/viewmodels/temperature.js:73
msgid "Hotend"
msgstr "Hotend"
@@ -2014,25 +2014,25 @@ msgid "Error"
msgstr "Fehler"
#: src/octoprint/static/js/app/viewmodels/temperature.js:23
#: src/octoprint/static/js/app/viewmodels/temperature.js:76
#: src/octoprint/static/js/app/viewmodels/temperature.js:80
#: src/octoprint/templates/dialogs/settings/temperatures.jinja2:16
msgid "Bed"
msgstr "Bett"
#: src/octoprint/static/js/app/viewmodels/temperature.js:115
#: src/octoprint/static/js/app/viewmodels/temperature.js:123
msgid "just now"
msgstr "gerade eben"
#: src/octoprint/static/js/app/viewmodels/temperature.js:117
#: src/octoprint/static/js/app/viewmodels/temperature.js:125
msgid "min"
msgstr "Min"
#: src/octoprint/static/js/app/viewmodels/temperature.js:261
#: src/octoprint/static/js/app/viewmodels/temperature.js:292
#: src/octoprint/templates/tabs/temperature.jinja2:11
msgid "Actual"
msgstr "Ist"
#: src/octoprint/static/js/app/viewmodels/temperature.js:266
#: src/octoprint/static/js/app/viewmodels/temperature.js:297
#: src/octoprint/templates/tabs/temperature.jinja2:12
msgid "Target"
msgstr "Soll"
@@ -2100,7 +2100,7 @@ msgstr "Zeitrafferaufnahme wird gerendert"
#: src/octoprint/static/js/app/viewmodels/timelapse.js:320
#, python-format
msgid "Now rendering timelapse %(movie_prefix)s. Due to performance reasons it is not recommended to start a print job while a movie is still rendering."
msgstr "Rendere jetzt die Zeitrafferaufnahme %(movie_prefix)s. Aus Gründen der Performance ist es nicht empfehlenswert, einen Druckauftrage zu starten, so lange die Aufnahme noch gerendert wird."
msgstr "Rendere jetzt die Zeitrafferaufnahme %(movie_prefix)s. Aus Gründen der Performance ist es nicht empfehlenswert, einen Druckauftrag zu starten, so lange die Aufnahme noch gerendert wird."
#: src/octoprint/static/js/app/viewmodels/timelapse.js:329
msgid "Cannot render timelapse"
@@ -2848,8 +2848,8 @@ msgstr "Deine OctoPrint Installation ist jetzt eingerichtet und es kann losgehen
msgid ""
"\n"
" If you enjoy OctoPrint, please consider <a href=\"%(url)s\" target=\"_blank\">supporting its ongoing\n"
" development</a>. You can find find this link also in the \"About\" dialog. Thank you!\n"
msgstr "Falls dir OctoPrint gefällt, bitte ziehe es in Betracht, <a href=\"%(url)s\" target=\"_blank\">seine fortlaufende Entwicklung zu unterstützen</a>. Du kannst diesen Link auch im \"Über\" Dialog finden. Danke!"
" development</a>, which is fully funded by users like you! You can also find this link in the \"About\" dialog. <strong>Thank you!</strong>\n"
msgstr "Falls Dir OctoPrint gefällt, bitte denke darüber nach, <a href=\"%(url)s\" target=\"_blank\">seine fortlaufende Entwicklung zu unterstützen</a>, welche vollständig durch User wie Dich finanziert wird! Du kannst diesen Link auch im \"Über\" Dialog finden. <strong>Vielen Dank!</strong>"
#: src/octoprint/templates/dialogs/wizard/firstrun_start.jinja2:1
msgid "Hello!"
@@ -3695,3 +3695,9 @@ msgstr "Zeitrafferaufnahme rendern"
#~ msgid "Reboot"
#~ msgstr "Neustart"
#~ msgid ""
#~ "\n"
#~ " If you enjoy OctoPrint, please consider <a href=\"%(url)s\" target=\"_blank\">supporting its ongoing\n"
#~ " development</a>. It's fully funded by users like you! You can also find this link in the \"About\" dialog. <strong>Thank you!</strong>\n"
#~ msgstr "Falls dir OctoPrint gefällt, bitte ziehe es in Betracht <a href=\"%(url)s\" target=\"_blank\">seine fortlaufende Entwicklung zu unterstützen</a>. Diese Entwicklung wird vollständig durch User wie Dich finanziert! Du kannst diesen Link auch im \"Über\" Dialog finden. <strong>Danke!</strong>"
+16 -1
View File
@@ -9,6 +9,7 @@ __copyright__ = "Copyright (C) 2015 The OctoPrint Project - Released under terms
import sarge
import logging
import re
import time
from . import to_unicode
@@ -80,7 +81,21 @@ class CommandlineCaller(object):
kwargs.update(dict(async=True, stdout=sarge.Capture(), stderr=sarge.Capture()))
p = sarge.run(command, **kwargs)
p.wait_events()
while len(p.commands) == 0:
# somewhat ugly... we can't use wait_events because
# the events might not be all set if an exception
# by sarge is triggered within the async process
# thread
time.sleep(0.01)
# by now we should have a command, let's wait for its
# process to have been prepared
p.commands[0].process_ready.wait()
if not p.commands[0].process:
# the process might have been set to None in case of any exception
self._logger.error(u"Error while trying to run command {}".format(joined_command))
return None, [], []
all_stdout = []
all_stderr = []
Binary file not shown.
+18 -12
View File
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: OctoPrint\n"
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
"POT-Creation-Date: 2016-11-24 12:53+0100\n"
"PO-Revision-Date: 2016-11-24 12:54+0100\n"
"POT-Creation-Date: 2016-12-02 12:37+0100\n"
"PO-Revision-Date: 2016-12-02 12:38+0100\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"
@@ -1570,12 +1570,12 @@ msgstr "Trennen"
#: src/octoprint/static/js/app/viewmodels/files.js:589
#: src/octoprint/static/js/app/viewmodels/gcode.js:482
#: src/octoprint/static/js/app/viewmodels/printerstate.js:231
#: src/octoprint/static/js/app/viewmodels/temperature.js:58
#: src/octoprint/static/js/app/viewmodels/temperature.js:62
msgid "Tool"
msgstr "Werkzeug"
#: src/octoprint/static/js/app/viewmodels/control.js:68
#: src/octoprint/static/js/app/viewmodels/temperature.js:69
#: src/octoprint/static/js/app/viewmodels/temperature.js:73
msgid "Hotend"
msgstr "Hotend"
@@ -2014,25 +2014,25 @@ msgid "Error"
msgstr "Fehler"
#: src/octoprint/static/js/app/viewmodels/temperature.js:23
#: src/octoprint/static/js/app/viewmodels/temperature.js:76
#: src/octoprint/static/js/app/viewmodels/temperature.js:80
#: src/octoprint/templates/dialogs/settings/temperatures.jinja2:16
msgid "Bed"
msgstr "Bett"
#: src/octoprint/static/js/app/viewmodels/temperature.js:115
#: src/octoprint/static/js/app/viewmodels/temperature.js:123
msgid "just now"
msgstr "gerade eben"
#: src/octoprint/static/js/app/viewmodels/temperature.js:117
#: src/octoprint/static/js/app/viewmodels/temperature.js:125
msgid "min"
msgstr "Min"
#: src/octoprint/static/js/app/viewmodels/temperature.js:261
#: src/octoprint/static/js/app/viewmodels/temperature.js:292
#: src/octoprint/templates/tabs/temperature.jinja2:11
msgid "Actual"
msgstr "Ist"
#: src/octoprint/static/js/app/viewmodels/temperature.js:266
#: src/octoprint/static/js/app/viewmodels/temperature.js:297
#: src/octoprint/templates/tabs/temperature.jinja2:12
msgid "Target"
msgstr "Soll"
@@ -2100,7 +2100,7 @@ msgstr "Zeitrafferaufnahme wird gerendert"
#: src/octoprint/static/js/app/viewmodels/timelapse.js:320
#, python-format
msgid "Now rendering timelapse %(movie_prefix)s. Due to performance reasons it is not recommended to start a print job while a movie is still rendering."
msgstr "Rendere jetzt die Zeitrafferaufnahme %(movie_prefix)s. Aus Gründen der Performance ist es nicht empfehlenswert, einen Druckauftrage zu starten, so lange die Aufnahme noch gerendert wird."
msgstr "Rendere jetzt die Zeitrafferaufnahme %(movie_prefix)s. Aus Gründen der Performance ist es nicht empfehlenswert, einen Druckauftrag zu starten, so lange die Aufnahme noch gerendert wird."
#: src/octoprint/static/js/app/viewmodels/timelapse.js:329
msgid "Cannot render timelapse"
@@ -2848,8 +2848,8 @@ msgstr "Deine OctoPrint Installation ist jetzt eingerichtet und es kann losgehen
msgid ""
"\n"
" If you enjoy OctoPrint, please consider <a href=\"%(url)s\" target=\"_blank\">supporting its ongoing\n"
" development</a>. You can find find this link also in the \"About\" dialog. Thank you!\n"
msgstr "Falls dir OctoPrint gefällt, bitte ziehe es in Betracht, <a href=\"%(url)s\" target=\"_blank\">seine fortlaufende Entwicklung zu unterstützen</a>. Du kannst diesen Link auch im \"Über\" Dialog finden. Danke!"
" development</a>, which is fully funded by users like you! You can also find this link in the \"About\" dialog. <strong>Thank you!</strong>\n"
msgstr "Falls Dir OctoPrint gefällt, bitte denke darüber nach, <a href=\"%(url)s\" target=\"_blank\">seine fortlaufende Entwicklung zu unterstützen</a>, welche vollständig durch User wie Dich finanziert wird! Du kannst diesen Link auch im \"Über\" Dialog finden. <strong>Vielen Dank!</strong>"
#: src/octoprint/templates/dialogs/wizard/firstrun_start.jinja2:1
msgid "Hello!"
@@ -3695,3 +3695,9 @@ msgstr "Zeitrafferaufnahme rendern"
#~ msgid "Reboot"
#~ msgstr "Neustart"
#~ msgid ""
#~ "\n"
#~ " If you enjoy OctoPrint, please consider <a href=\"%(url)s\" target=\"_blank\">supporting its ongoing\n"
#~ " development</a>. It's fully funded by users like you! You can also find this link in the \"About\" dialog. <strong>Thank you!</strong>\n"
#~ msgstr "Falls dir OctoPrint gefällt, bitte ziehe es in Betracht <a href=\"%(url)s\" target=\"_blank\">seine fortlaufende Entwicklung zu unterstützen</a>. Diese Entwicklung wird vollständig durch User wie Dich finanziert! Du kannst diesen Link auch im \"Über\" Dialog finden. <strong>Danke!</strong>"
+12 -11
View File
@@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: OctoPrint 1.3.0rc1.post95.dev0+g69412d0\n"
"Project-Id-Version: OctoPrint 1.3.0.dev1608+gefb2f99.dirty\n"
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
"POT-Creation-Date: 2016-11-24 12:53+0100\n"
"POT-Creation-Date: 2016-12-02 12:37+0100\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"
@@ -1675,12 +1675,12 @@ msgstr ""
#: src/octoprint/static/js/app/viewmodels/files.js:589
#: src/octoprint/static/js/app/viewmodels/gcode.js:482
#: src/octoprint/static/js/app/viewmodels/printerstate.js:231
#: src/octoprint/static/js/app/viewmodels/temperature.js:58
#: src/octoprint/static/js/app/viewmodels/temperature.js:62
msgid "Tool"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/control.js:68
#: src/octoprint/static/js/app/viewmodels/temperature.js:69
#: src/octoprint/static/js/app/viewmodels/temperature.js:73
msgid "Hotend"
msgstr ""
@@ -2145,25 +2145,25 @@ msgid "Error"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/temperature.js:23
#: src/octoprint/static/js/app/viewmodels/temperature.js:76
#: src/octoprint/static/js/app/viewmodels/temperature.js:80
#: src/octoprint/templates/dialogs/settings/temperatures.jinja2:16
msgid "Bed"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/temperature.js:115
#: src/octoprint/static/js/app/viewmodels/temperature.js:123
msgid "just now"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/temperature.js:117
#: src/octoprint/static/js/app/viewmodels/temperature.js:125
msgid "min"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/temperature.js:261
#: src/octoprint/static/js/app/viewmodels/temperature.js:292
#: src/octoprint/templates/tabs/temperature.jinja2:11
msgid "Actual"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/temperature.js:266
#: src/octoprint/static/js/app/viewmodels/temperature.js:297
#: src/octoprint/templates/tabs/temperature.jinja2:12
msgid "Target"
msgstr ""
@@ -3081,8 +3081,9 @@ msgid ""
"\n"
" If you enjoy OctoPrint, please consider <a href=\"%(url)s\" "
"target=\"_blank\">supporting its ongoing\n"
" development</a>. You can find find this link also in the \"About\" "
"dialog. Thank you!\n"
" development</a>, which is fully funded by users like you! You can "
"also find this link in the \"About\" dialog. <strong>Thank you!</strong>"
"\n"
msgstr ""
#: src/octoprint/templates/dialogs/wizard/firstrun_start.jinja2:1