Compare commits

...
49 Commits
Author SHA1 Message Date
Gina Häußge 9a6099ffc2 PMGR: Dependency links can make pip install take longer
Depending on the pip version pip might first fetch the full index of packages available
on PyPI instead of just directly processing the provided link.

Display corresponding message to user from backend to make sure they don't
think something broke.
2015-07-23 10:54:39 +02:00
Gina Häußge 25de95dc93 Preparing release of 1.2.4 2015-07-23 09:54:27 +02:00
Gina Häußge 57f6e1e1bc Some more hints where to find documentation and support 2015-07-23 08:48:11 +02:00
Gina Häußge edf9c40941 Re-added dependency_links option for create_plugin_setup_parameters
(cherry picked from commit a59642b)
2015-07-22 22:10:31 +02:00
Gina Häußge 4dd4a2cc9c Revert "Remove dependency_links support again"
This reverts commit be423e49fd.

Conflicts:
	src/octoprint/plugins/pluginmanager/__init__.py
	src/octoprint/plugins/softwareupdate/updaters/pip.py
(cherry picked from commit c24ba82)
2015-07-22 19:06:39 +02:00
Gina Häußge 81bc8c784a Don't reopen notification on mouse-over while closing
(cherry picked from commit 9839f4b)
2015-07-21 16:57:39 +02:00
Gina Häußge 294e7fc2db Patch for the js warnings referred to in #966 2015-07-21 11:54:06 +02:00
Marc 6e632d02a0 Fixes usersettings never reached the client's browser
(cherry picked from commit 8e235af)
2015-07-20 10:10:00 +02:00
Gina Häußge 50ff0d810f Fixed a missing self.buffer()
(cherry picked from commit 0fa22937e0)
2015-07-20 10:09:33 +02:00
Mark Walker d4be7f18e2 transpose=2 is counter clockwise, plus filter order should be rotation
last to match the css application order
(cherry picked from commit bdb55e0)
2015-07-20 09:37:56 +02:00
Nicanor Romero Venier 6d24a46e88 Fixed form field truncation in upload requests
(cherry picked from commit 1f6c852)
2015-07-15 10:35:59 +02:00
Gina Häußge db866d2310 Finally added a proper AUTHORS file
Also adjusted contribution guidelines to ask people to include themselves when filing
a PR.
(cherry picked from commit 1b594b2)
2015-07-15 10:35:38 +02:00
Gina Häußge bb7e15be84 Fixed a typo in the docs
logger => loggers in logging.yaml
(cherry picked from commit d0733d8)
2015-07-14 09:26:30 +02:00
Gina Häußge 7a007a6417 Stop RepeatedTimers on server shutdown by default
daemon flag was missing, leading to the timer staying active even when a shutdown
 was triggered. Added new daemon flag to timer constructor, defaulting to true, that
 fixes that behaviour.
(cherry picked from commit 48fe23b)
2015-07-14 09:26:25 +02:00
Gina Häußge 96aad9d34f Better resilience against errors within plugins
(cherry picked from commit 75992ef)
2015-07-14 09:26:20 +02:00
Gina Häußge 4d3334caf1 Updated README 2015-07-10 09:58:20 +02:00
Gina Häußge 2745f49d28 Fixed white panes in settings dialog on Safari 8
Absolute positioning caused panes to sometimes not render when being
selected. Switching to static positioning again makes the dialog look a bit
weird, but that's probably still preferable to no content showing. It seems
to be a browser bug that not's present with Safari 7, more tests to pinpoint
what exactly is causing this are probably necessary, but this at least is a
functional workaround for now.
(cherry picked from commit a18cbf7)
2015-07-09 21:52:59 +02:00
Gina Häußge 5470aaaa3a Set no-cache headers on page while firstRun is True
(cherry picked from commit f1afb70)
2015-07-09 09:45:35 +02:00
Gina Häußge f89cbc9133 Allow to not cache responses that set no-cache headers
(cherry picked from commit 163100b)
2015-07-09 09:45:29 +02:00
Gina Häußge 5dfffc36e3 maintenance branch is now 1.2.4-dev 2015-07-09 09:44:51 +02:00
Gina Häußge 3761995aff Removed unneeded parameter and added missing semicolon
(cherry picked from commit 29b3b62)
2015-07-08 17:42:47 +02:00
Gina Häußge e62cef590b Fixed preventDefault issues also for files search
(cherry picked from commit 4894c6e)
2015-07-08 17:42:41 +02:00
Mark Walker 677e583345 pluginmanager: case handling and submit binding
- Convert query term to lower case so that it is case insensitive both ways
    - Knockout submit binding takes the form element as parameter and return
    value determines whether the form submit occurs. See http://knockoutjs.com/documentation/submit-binding.html
(cherry picked from commit 4a2cc53)
2015-07-08 17:42:35 +02:00
Gina Häußge abbf937e7f Preparing release of 1.2.3 2015-07-08 17:22:18 +02:00
Gina Häußge 8d14ea6093 Rewrite urls in packed css and less files
See also #962
(cherry picked from commit 7ea2ee2)
2015-07-08 16:46:46 +02:00
Gina Häußge 97826b2f3b Fix: More resilience against missing plugin assets
Two changes:

  * Asset existence will now be checked before they get included
    in the assets to bundle by webassets, logging a warning if a
    file isn't present.
  * Monkey-patched webassets filter chain to not die when a file
    doesn't exist, but to log an error instead and just return
    an empty file instead.
(cherry picked from commit 2a5ec33)
2015-07-08 16:46:38 +02:00
Gina Häußge a1e0078ce5 Updated translation
(cherry picked from commit 7d43bca)
2015-07-07 19:00:11 +02:00
Gina Häußge a5bf3c3be1 Log serial write exceptions to octoprint.log
(cherry picked from commit 367ba06)
2015-07-07 18:39:54 +02:00
Gina Häußge 19a5613e59 Made "Software Update" and "CuraEngine" translateable
Also fixed a typo in a notification.
(cherry picked from commit 430e47d)
2015-07-07 18:39:47 +02:00
Gina Häußge ced286854c Fixed sorting by size of file list
(cherry picked from commit 6906584)
2015-07-07 18:39:06 +02:00
Gina Häußge 811ffc760f Added "pollWatched" setting to UI
(cherry picked from commit b8cf5ef)
2015-07-06 10:21:21 +02:00
Gina Häußge 549b60edb1 Allow polling for changes in watched folder
Some underlying file systems might not trigger change events (e.g.
mounted remote file systems). Added a feature flag to allow for
switching to a (less performant) polling method.
(cherry picked from commit f2df174)
2015-07-06 10:20:57 +02:00
Gina Häußge 8735b10653 Better resilience against senseless polling intervals
(cherry picked from commit 6600d24)
2015-07-05 16:50:33 +02:00
Gina Häußge 29d49179a9 SWU Fix: properly sanitize version strings for comparison 2015-07-05 10:04:06 +02:00
Gina Häußge 19b4a0f403 Fix: Always delete files from watched folder
Wasn't ensure previously when using file preprocessors.
2015-07-05 09:35:49 +02:00
Gina Häußge d854b41ffb Migrated access control docs from wiki 2015-07-05 00:09:13 +02:00
Gina Häußge 329a575031 Merge branch 'master' into maintenance 2015-07-04 23:51:58 +02:00
Gina Häußge 85ad85bdfa Also refer to wiki from docs until everything "official" is migrated 2015-07-04 23:51:29 +02:00
Gina Häußge 95c26a7850 Fix: Don't automatically persist or return _config_version
Should only ever be read or written by the plugin system itself, not
by on_settings_save or on_settings_load
(cherry picked from commit 77f7d59)
2015-07-02 15:27:35 +02:00
Gina Häußge 885e6f916c Fix: Don't persists checks when saving SWUpdate settings
(cherry picked from commit 8d10be6)
2015-07-02 15:27:27 +02:00
Gina Häußge d7a86a4d28 Use UTF-8 for _all_ output from sarge
Lines taking from the asynchronous processing of stdout/stderr where
left as str, leading to encoding problems when utf8 characters showed
up in the stream and were being interpreted as ascii encoding.
(cherry picked from commit 9373be3)
2015-07-02 15:27:17 +02:00
Gina Häußge 7b3e0563cc SWUpdate: Only use version cache from same version of OP
When using the version cache only use the version cache if the OctoPrint
version stored within it matches the one of the currently running
instance. Otherwise we might report false positives with regards to
available updates under some circumstances.
(cherry picked from commit bb7b0cb)
2015-07-02 15:26:02 +02:00
Gina Häußge 50a62bf00a maintenance branch is now 1.2.3-dev 2015-06-30 21:49:37 +02:00
Gina Häußge 1c6b0554c7 Preparing release of 1.2.2 2015-06-30 21:19:50 +02:00
Gina Häußge 537c205757 Use lowercase when matching extensions
(cherry picked from commit 29cee16)
2015-06-30 19:12:58 +02:00
Gina Häußge f07b2477f5 Fixed some comments that were outdated
(cherry picked from commit 18816b6)
2015-06-30 19:12:52 +02:00
Gina Häußge 5e5531f6d8 Verify extension of uploaded language packs & plugins
Should be valid zip archives/tarballs. Also use only the extension
of an uploaded plugin archive as suffix for the temporary file that's
used for installing it.
(cherry picked from commit a1ff698)
2015-06-30 19:12:45 +02:00
Gina Häußge eadc9ee795 Fix: We don't need the shell for pip
(cherry picked from commit 2db3228)
2015-06-30 19:12:37 +02:00
Gina Häußge 0b3f94b6bd maintenance branch is now 1.2.2-dev 2015-06-30 10:12:14 +02:00
53 changed files with 1416 additions and 1427 deletions

No files matched your search

+3 -3
View File
@@ -10,10 +10,10 @@
# master shall not use the lookup table, only tags
master
# maintenance is currently the branch for preparation of maintenance release 1.2.1
# maintenance is currently the branch for preparation of maintenance release 1.2.4
# so are any fix/... branches
maintenance 1.2.1-dev cfa4cb2a7c5f1af10dc8
fix/.* 1.2.1-dev cfa4cb2a7c5f1af10dc8
maintenance 1.2.4-dev 3761995aff94acf32495556730f133a1626245b3
fix/.* 1.2.4-dev 3761995aff94acf32495556730f133a1626245b3
# every other branch is a development branch and thus gets resolved to 1.3.0-dev for now
.* 1.3.0-dev 198d3450d94be1a2
+59
View File
@@ -0,0 +1,59 @@
# Authors
The following people have contributed to OctoPrint's code base (ordered by
date of first contribution):
* [Gina Häußge](https://github.com/foosel)
* [Thomas Sanladerer](https://github.com/imitation)
* [Alex Ustyantsev](https://github.com/hudbrog)
* [Andrew Dalgleish](https://github.com/ajd4096)
* [Dale Price](https://github.com/daprice)
* [Václav "ax" Hůla](https://github.com/AxTheB)
* [Tom Perry](https://github.com/daftscience)
* [Andreas Gohr](https://github.com/splitbrain)
* [Lars Norpchen](https://github.com/norpchen)
* [Marlon Wünnemann](https://github.com/marwue)
* ["algspd"](https://github.com/algspd)
* [Peter Uithoven](https://github.com/peteruithoven)
* [Bryan Mayland](https://github.com/CapnBry)
* [Ross Hendrickson](https://github.com/savorywatt)
* [Dan Lipsitt](https://github.com/DanLipsitt)
* [James Gao](https://github.com/jamesgao)
* [Tonnerre Lombard](https://github.com/tonnerre)
* [Marc Hannappel](https://github.com/Salandora)
* [Brad Pitcher](https://github.com/brad)
* [Gabe Rosenhouse](https://github.com/rosenhouse)
* [chriskoz](https://github.com/chriskoz)
* [Ilya Novoselov](https://github.com/nullie)
* [Corey C](https://github.com/C-o-r-E)
* [Jarek Szczepanski](https://github.com/imrahil)
* [Jon Nordby](https://github.com/jonnor)
* [Aaron Bieber](https://github.com/qbit)
* [Guy Sheffer](https://github.com/guysoft)
* [Dattas Moonchaser](https://github.com/dattas)
* [Pim Rutgers](https://github.com/Booli)
* [Koen Kooi](https://github.com/koenkooi)
* [Colin Wallace](https://github.com/Wallacoloo)
* [Michael Ang](https://github.com/mangtronix)
* [Philipp Engel](https://github.com/nosyjoe)
* [Giles Hall](https://github.com/vishnubob)
* [Bevaz](https://github.com/Bevaz)
* [Bortek](https://github.com/bortek)
* [Rob Speed](https://github.com/rspeed)
* [Renha](https://github.com/Renha)
* [Antoine Bertin](https://github.com/Diaoul)
* [Teja Philipp](https://github.com/hungerpirat)
* ["matobago"](https://github.com/matobago)
* ["nophead"](https://github.com/nophead)
* [Bob Clough](https://github.com/thinkl33t)
* [Mikk Kiilaspää](https://github.com/Mikk36)
* [Jack Minardi](https://github.com/jminardi)
* [Mark Walker](https://github.com/markwal)
* [Lucas Clemente](https://github.com/lucas-clemente)
* [Andrew Erickson](https://github.com/aerickson)
* [Nicanor Romero Venier](https://github.com/nicanor-romero)
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
the server side GCODE interpreter are still based on Cura's code base from
December 2012 and hence on the work of its authors up until then.
+73 -1
View File
@@ -1,5 +1,77 @@
# OctoPrint Changelog
## 1.2.4 (2015-07-23)
### Improvements
* `RepeatedTimer` now defaults to `daemon` set to `True`. This makes sure
plugins using it don't have to remember to set that flag themselves in
order for the server to properly shut down when timers are still active.
* Fixed a typo in the docs about `logging.yaml` (top level element is
`loggers`, not `logger`).
* Support for plugins with external dependencies (`dependency_links` in
setuptools), interesting for plugin authors who need to depend on Python
libraries that are (not yet) available on PyPI.
* Better resilience against errors within plugins.
### Bug Fixes
* Do not cache web page when running for the first time, to avoid caching
the first run dialog popup along side with it. This should solve issues
people were having when configuring OctoPrint for the first time, then
reloading the page without clearing the cache, being again prompted with
the dialog with no chance to clear it.
* Fix/workaround for occasional white panes in settings dialog on Safari 8,
which appears to have an issue with fixed positioning.
* Fixed form field truncation in upload requests that could lead to problems
when trying to import Cura profiles with names longer than 28 characters.
* Fixed webcam rotation for timelapse rendering.
* Fixed user settings not reaching the editor in the frontend.
* Notifications that are in process of being closed don't open again on
mouse over (that was actually more of an unwanted feature).
([Commits](https://github.com/foosel/OctoPrint/compare/1.2.3...1.2.4))
## 1.2.3 (2015-07-09)
### Improvements
* New option to actively poll the watched folder. This should make it work also
if it is mounted on a filesystem that doesn't allow getting notifications
about added files through notification by the operating system (e.g.
network shares).
* Better resilience against senseless temperature/SD-status-polling intervals
(such as 0).
* Log exceptions during writing to the serial port to `octoprint.log`.
### Bug Fixes
* [#961](https://github.com/foosel/OctoPrint/pull/961) - Fixed a JavaScript error that caused an error to be logged when "enter" was pressed in file or plugin search.
* [#962](https://github.com/foosel/OctoPrint/pull/962) - ``url(...)``s in packed CSS and LESS files should now be rewritten properly too to refer to correct paths
* Update notifications were not vanishing properly after updating:
* Only use version cache for update notifications if the OctoPrint version still is the same to make sure the cache gets invalidated after an external update of OctoPrint.
* Do not persist version information when saving settings of the Software Update plugin
* Always delete files from the ``watched`` folder after importing then. Using file preprocessor plugins could lead to the files staying there.
* Fixed an encoding problem causing OctoPrint's Plugin Manager and Software Update plugins to choke on UTF-8 characters in the update output.
* Fixed sorting by file size in file list
* More resilience against missing plugin assets:
* Asset existence will now be checked before they get included
in the assets to bundle by webassets, logging a warning if a
file isn't present.
* Monkey-patched webassets filter chain to not die when a file
doesn't exist, but to log an error instead and just return
an empty file instead.
([Commits](https://github.com/foosel/OctoPrint/compare/1.2.2...1.2.3))
## 1.2.2 (2015-06-30)
### Bug Fixes
* Fixed an admin-only security issue introduced in 1.2.0, updating is strongly advised.
([Commits](https://github.com/foosel/OctoPrint/compare/1.2.1...1.2.2))
## 1.2.1 (2015-06-30)
### Improvements
@@ -168,7 +240,7 @@
changed under "Temperatures" in the Settings ([#343](https://github.com/foosel/OctoPrint/issues/343)).
* High-DPI support for the GCode viewer ([#837](https://github.com/foosel/OctoPrint/issues/837)).
* Stop websocket connections from multiplying ([#888](https://github.com/foosel/OctoPrint/pull/888)).
* New setting to rotate webcam by 90° counter clockwise ([#895](https://github.com/foosel/OctoPrint/issues/895) and
* New setting to rotate webcam by 90° counter clockwise ([#895](https://github.com/foosel/OctoPrint/issues/895) and
[#906](https://github.com/foosel/OctoPrint/pull/906))
* System commands now be set to a) run asynchronized by setting their `async` property to `true` and b) to ignore their
result by setting their `ignore` property to `true`.
+8 -6
View File
@@ -21,29 +21,31 @@ Pull Requests
plugin. If the current plugin system doesn't allow you to implement your feature as a plugin, create a "Brainstorming"
ticket to get the discussion going how best to solve *this* in OctoPrint's plugin system - maybe that's the actual PR
you have been waiting for to contribute :)
2. If you plan to make **any large changes to the code or appearance, please open a "Brainstorming" ticket first** so that
2. If you plan to make **any large changes to the code or appearance, please open a "Brainstorming" ticket first** so that
we can determine if it's a good time for your specific pull request. It might be that I'm currently in the process of
making heavy changes to the code locations you'd target as well, or your approach doesn't fit the general "project
making heavy changes to the code locations you'd target as well, or your approach doesn't fit the general "project
vision", and that would just cause unnecessary work and frustration for everyone or possibly get the PR rejected.
3. When adding code to OctoPrint, make sure you **follow the current coding style**. That means tabs instead of spaces in the
python files (yes, I know that this goes against PEP-8, I don't care) and space instead of tabs in the Javascript sources,
english language (that means code, variables, comments!), comments where necessary (tell why the code does something like
it does it, structure your code), following the general architecture. If your PR needs to make changes to the Stylesheets,
change the ``.less`` files from which the CSS is compiled. PRs that contain direct changes to the compiled
CSS will be closed.
4. **Test your changes thoroughly**. That also means testing with usage scenarios you don't normally use, e.g. if you only
change the ``.less`` files from which the CSS is compiled. PRs that contain direct changes to the compiled
CSS will be closed.
4. **Test your changes thoroughly**. That also means testing with usage scenarios you don't normally use, e.g. if you only
use access control, test without and vice versa. If you only test with your printer, test with the virtual printer and
vice versa. State in your pull request how your tested your changes.
5. Please create all pull requests **against the `devel` branch**.
6. Create **one pull request per feature/bug fix**.
7. Create a **custom branch** for your feature/bug fix and use that as base for your pull request. Pull requests directly
against your version of `devel` will be closed.
7. In your pull request's description, **state what your pull request is doing**, as in, what feature does it implement, what
8. In your pull request's description, **state what your pull request is doing**, as in, what feature does it implement, what
bug does it fix. The more thoroughly you explain your intent behind the PR here, the higher the chances it will get merged
fast.
9. Don't forget to **add yourself to the [AUTHORS](../AUTHORS.md) file** :)
History
-------
* 2015-01-23: More guidelines for creating pull requests, support/questions redirected to Mailinglist/G+ community
* 2015-01-27: Added another explicit link to the FAQ
* 2015-07-07: Added step to add yourself to AUTHORS when creating a PR :)
+40 -6
View File
@@ -1,17 +1,35 @@
OctoPrint
=========
[![Flattr this git repo](http://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=foosel&url=https://github.com/foosel/OctoPrint&title=OctoPrint&language=&tags=github&category=software)
OctoPrint provides a responsive web interface for controlling a 3D printer (RepRap, Ultimaker, ...). It is Free Software
and released under the [GNU Affero General Public License V3](http://www.gnu.org/licenses/agpl.html).
Its website can be found at [octoprint.org](http://octoprint.org).
The documentation is located at [docs.octoprint.org](http://docs.octoprint.org).
You are currently looking at the source code repository of OctoPrint. If you already installed it
(e.g. by using the Raspberry Pi targeted distribution [OctoPi](https://github.com/guysoft/OctoPi)) and only
want to find out how to use it, [the documentation](http://docs.octoprint.org/) and [the public wiki](https://github.com/foosel/OctoPrint/wiki)
might be of more interest for you. You might also want to subscribe to [the mailing list](https://groups.google.com/group/octoprint)
or the [G+ Community](https://plus.google.com/communities/102771308349328485741) where there are other active users who might be
able to help you with any questions you might have.
Contributing
------------
Please see the project's [Contribution Guidelines](https://github.com/foosel/OctoPrint/blob/master/CONTRIBUTING.md).
Contributions of all kinds are welcome, not only in the form of code but also with regards to the
[official documentation](http://docs.octoprint.org/) or [the public wiki](https://github.com/foosel/OctoPrint/wiki), support
of other users in the [bug tracker](https://github.com/foosel/OctoPrint/issues),
[the Mailinglist](https://groups.google.com/group/octoprint) or
[the G+ Community](https://plus.google.com/communities/102771308349328485741).
If you think something is bad as it is about OctoPrint or its documentation the way it is, please help
in any way to make it better instead of just complaining about it -- this is an Open Source Project
after all :)
For information about how to go about contributions of any kind, please see the project's
[Contribution Guidelines](https://github.com/foosel/OctoPrint/blob/master/CONTRIBUTING.md).
Installation
------------
@@ -21,6 +39,11 @@ Installation instructions for installing from source for different operating sys
If you want to run OctoPrint on a Raspberry Pi you might want to take a look at [OctoPi](https://github.com/guysoft/OctoPi)
which is a custom SD card image that includes OctoPrint plus dependencies.
After installation, please make sure you follow the first-run wizard and set up
access control as necessary. If you want to not only be notified about new
releases but also be able to automatically upgrade to them from within
OctoPrint, take a look [at the documentation of the Software Update Plugin](https://github.com/foosel/OctoPrint/wiki/Plugin:-Software-Update#making-octoprint-updateable-on-existing-installations).
Dependencies
------------
@@ -36,7 +59,11 @@ OctoPrint currently only supports Python 2.7.
Usage
-----
Running the `setup.py` script installs the `octoprint` script in your Python installation's scripts folder
Running the `setup.py` script via
python setup.py install
installs the `octoprint` script in your Python installation's scripts folder
(which depending on whether you installed OctoPrint globally or into a virtual env will be on your `PATH` or not). The
following usage examples assume that said `octoprint` script is on your `PATH`.
@@ -77,5 +104,12 @@ which is located at `~/.octoprint` on Linux, at `%APPDATA%/OctoPrint` on Windows
at `~/Library/Application Support/OctoPrint` on MacOS.
A comprehensive overview of all available configuration settings can be found
[on the wiki](https://github.com/foosel/OctoPrint/wiki/Configuration). Please note that the most commonly used
configuration settings can also easily be edited from OctoPrint's settings dialog.
[in the docs](http://docs.octoprint.org/en/master/configuration/config_yaml.html).
Please note that the most commonly used configuration settings can also easily
be edited from OctoPrint's settings dialog.
Special Thanks
--------------
The development of OctoPrint is sponsored and maintained by [BQ](http://www.bq.com/).
Cross-browser testing services are kindly provided by [BrowserStack](http://www.browserstack.com/).
+3 -3
View File
@@ -17,7 +17,7 @@ Changing log levels
If you need to change the default logging level within OctoPrint, create the file with a text editor of your choice
(it's usually not there). The general format is this::
logger:
loggers:
<component>:
level: <loglevel>
@@ -27,7 +27,7 @@ new log level to set. An example for increasing the log level of the events and
.. code-block:: yaml
logger:
loggers:
octoprint.events:
level: DEBUG
octoprint.filemanager:
@@ -97,4 +97,4 @@ expressed in YAML as follows:
format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
The possible keys for the logging format can be found in the
`Python documentation on LogRecord attributes <https://docs.python.org/2/library/logging.html#logrecord-attributes>`_.
`Python documentation on LogRecord attributes <https://docs.python.org/2/library/logging.html#logrecord-attributes>`_.
+69
View File
@@ -0,0 +1,69 @@
.. _sec-features-access_control:
Access Control
==============
When Access Control is enabled, anonymous users (not logged in) will only see
the read-only parts of the UI which are the following:
* printer state
* available gcode files and stats (upload is disabled)
* temperature
* webcam
* gcode viewer
* terminal output (sending commands is disabled)
* available timelapse movies
* any components provided through plugins which are enabled for anonymous
users
Logged in users will get access to everything besides the Settings and System
Commands, which are admin-only.
If Access Control is disabled, everything is directly accessible. **That also
includes all administrative functionality as well as full control over the
printer!**
Upon first start a configuration wizard is provided which allows configuration
of the first administrator account or alternatively disabling Access Control
(which is **NOT** recommended for systems that are directly accessible via the
Internet!).
.. hint::
If you plan to have your OctoPrint instance accessible over the internet,
**always enable Access Control**.
.. _sec-features-access_control-rerunning_wizard:
Rerunning the wizard
--------------------
In case Access Control was disabled in the configuration wizard, it is
possibly to re-run it by editing ``config.yaml`` [#f1]_ and setting ``firstRun``
in the ``server`` section and ``enabled`` in the ``accessControl`` section to
``true``:
.. code-block-ext:: yaml
accessControl:
enabled: true
# ...
server:
firstRun: true
Then restart the server and connect to the web interface - the wizard should
be shown again.
.. note::
If user accounts were created prior to disabling Access Control and those
user accounts are not to be used any more, remove ``.octoprint/users.yaml``.
If you don't remove this file, the above changes won't lead to the
configuration being shown again, instead Access Control will just be
enabled using the already existing login data. This is to prevent you from
resetting access control by accident.
.. rubric:: Footnotes
.. [#f1] For Linux that will be ``~/.octoprint/config.yaml``, for Windows it will be ``%APPDATA%/OctoPrint/config.yaml`` and for
Mac ``~/Library/Application Support/OctoPrint/config.yaml``
+14 -2
View File
@@ -10,7 +10,7 @@ buttons which trigger sending of one or more lines of GCODE to the printer over
parameterization of these commands with values entered by the user to full blown GCODE script templates backed by
`Jinja2 <http://jinja.pocoo.org/>`_.
Custom controls are configured within :ref:`config.yaml <sec-configuration-config_yaml>` in a ``controls`` section which
Custom controls are configured within :ref:`config.yaml <sec-configuration-config_yaml>` [#f1]_ in a ``controls`` section which
basically represents a hierarchical structure of all configured custom controls of various types.
.. note::
@@ -94,6 +94,13 @@ button that sends one or more commands to the printer when clicked, displaying o
controls that just serve as *container* for other controls, the latter being identified by having a ``children``
attribute wrapping more controls.
.. hint::
Take a look at the `Custom Control Editor plugin <http://plugins.octoprint.org/plugins/customControl/>`_
which allows you configuring your Custom Controls through OctoPrint's
settings interface without the need to manually edit the configuration
file.
.. _sec-features-custom_controls-types:
Types
@@ -278,4 +285,9 @@ Parameterized GCODE Script
G28 X0 Y0
Note the usage of the ``parameters.repetitions`` template variable in the GCODE script template, which will contain
the value selected by the user for the "Go arounds" slider.
the value selected by the user for the "Go arounds" slider.
.. rubric:: Footnotes
.. [#f1] For Linux that will be ``~/.octoprint/config.yaml``, for Windows it will be ``%APPDATA%/OctoPrint/config.yaml`` and for
Mac ``~/Library/Application Support/OctoPrint/config.yaml``
+1
View File
@@ -7,6 +7,7 @@ Features
.. toctree::
:maxdepth: 2
accesscontrol.rst
custom_controls.rst
gcode_scripts.rst
action_commands.rst
+1 -1
View File
@@ -64,7 +64,7 @@ See :ref:`Developing Plugins <sec-plugins>`.
.. rubric:: Footnotes
.. [#f1] For Linux that will be ``~/.octoprint/plugins``, for Windows it will be ``%APPDATA%/OctoPrint/plugins`` and for
Mac ``~/Library/Application Support/OctoPrint``
Mac ``~/Library/Application Support/OctoPrint/plugins``
.. [#f2] Make sure to use the exact same Python installation for installing the plugin that you also used for
installing & running OctoPrint. For OctoPi this means using ``~/oprint/bin/pip`` for installing plugins
instead of just ``pip``.
+4
View File
@@ -6,6 +6,10 @@ Welcome to OctoPrint's documentation!
:alt: The OctoPrint Logo
:align: right
This documentation is still in the process of being migrated from
`OctoPrint's wiki <https://github.com/foosel/OctoPrint/wiki>`_, so also take
a look there!
Contents
========
+3
View File
@@ -298,6 +298,9 @@ class CommandTrigger(GenericEventListener):
def commandExecutioner(command):
if debug:
self._logger.info("Executing system command: %s" % command)
# we run this with shell=True since we have to trust whatever
# our admin configured as command and since we want to allow
# shell-alike handling here...
subprocess.Popen(command, shell=True)
try:
+6 -1
View File
@@ -314,7 +314,12 @@ class FileManager(object):
printer_profile = self._printer_profile_manager.get_current_or_default()
for hook in self._preprocessor_hooks.values():
hook_file_object = hook(path, file_object, links=links, printer_profile=printer_profile, allow_overwrite=allow_overwrite)
try:
hook_file_object = hook(path, file_object, links=links, printer_profile=printer_profile, allow_overwrite=allow_overwrite)
except:
self._logger.exception("Error when calling preprocessor hook {}, ignoring".format(hook))
continue
if hook_file_object is not None:
file_object = hook_file_object
file_path = self._storage(destination).add_file(path, file_object, links=links, printer_profile=printer_profile, allow_overwrite=allow_overwrite)
+9 -3
View File
@@ -781,7 +781,10 @@ class SettingsPlugin(OctoPrintPlugin):
:return: the current settings of the plugin, as a dictionary
"""
return self._settings.get([], asdict=True, merged=True)
data = self._settings.get([], asdict=True, merged=True)
if "_config_version" in data:
del data["_config_version"]
return data
def on_settings_save(self, data):
"""
@@ -803,9 +806,12 @@ class SettingsPlugin(OctoPrintPlugin):
"""
import octoprint.util
if "_config_version" in data:
del data["_config_version"]
current = self._settings.get([], asdict=True, merged=True)
data = octoprint.util.dict_merge(current, data)
self._settings.set([], data)
merged = octoprint.util.dict_merge(current, data)
self._settings.set([], merged)
def get_settings_defaults(self):
"""
+31 -23
View File
@@ -35,6 +35,14 @@ class CuraPlugin(octoprint.plugin.SlicerPlugin,
self._cancelled_jobs = []
self._job_mutex = threading.Lock()
##~~ TemplatePlugin API
def get_template_configs(self):
from flask.ext.babel import gettext
return [
dict(type="settings", name=gettext("CuraEngine"))
]
##~~ StartupPlugin API
def on_startup(self, host, port):
@@ -218,7 +226,7 @@ class CuraPlugin(octoprint.plugin.SlicerPlugin,
if not on_progress_kwargs:
on_progress_kwargs = dict()
self._cura_logger.info("### Slicing %s to %s using profile stored at %s" % (model_path, machinecode_path, profile_path))
self._cura_logger.info(u"### Slicing %s to %s using profile stored at %s" % (model_path, machinecode_path, profile_path))
engine_settings = self._convert_to_engine(profile_path, printer_profile, posX, posY)
@@ -227,16 +235,15 @@ class CuraPlugin(octoprint.plugin.SlicerPlugin,
return False, "Path to CuraEngine is not configured "
working_dir, _ = os.path.split(executable)
args = ['"%s"' % executable, '-v', '-p']
args = [executable, '-v', '-p']
for k, v in engine_settings.items():
args += ["-s", '"%s=%s"' % (k, str(v))]
args += ['-o', '"%s"' % machinecode_path, '"%s"' % model_path]
args += ["-s", "%s=%s" % (k, str(v))]
args += ["-o", machinecode_path, model_path]
self._logger.info(u"Running %r in %s" % (" ".join(args), working_dir))
import sarge
command = " ".join(args)
self._logger.info("Running %r in %s" % (command, working_dir))
p = sarge.run(command, cwd=working_dir, async=True, stdout=sarge.Capture(), stderr=sarge.Capture())
p = sarge.run(args, cwd=working_dir, async=True, stdout=sarge.Capture(), stderr=sarge.Capture())
p.wait_events()
self._slicing_commands[machinecode_path] = p.commands[0]
@@ -254,6 +261,7 @@ class CuraPlugin(octoprint.plugin.SlicerPlugin,
p.commands[0].poll()
continue
line = octoprint.util.to_unicode(line, errors="replace")
self._cura_logger.debug(line.strip())
if on_progress is not None:
@@ -282,14 +290,14 @@ class CuraPlugin(octoprint.plugin.SlicerPlugin,
#
# with <step_factor> being 0 for "inset", 1 for "skin" and 2 for "export".
if line.startswith("Layer count:") and layer_count is None:
if line.startswith(u"Layer count:") and layer_count is None:
try:
layer_count = float(line[len("Layer count:"):].strip())
layer_count = float(line[len(u"Layer count:"):].strip())
except:
pass
elif line.startswith("Progress:"):
split_line = line[len("Progress:"):].strip().split(":")
elif line.startswith(u"Progress:"):
split_line = line[len(u"Progress:"):].strip().split(":")
if len(split_line) == 3:
step, current_layer, _ = split_line
try:
@@ -302,21 +310,21 @@ class CuraPlugin(octoprint.plugin.SlicerPlugin,
on_progress_kwargs["_progress"] = (step_factor[step] * layer_count + current_layer) / (layer_count * 3)
on_progress(*on_progress_args, **on_progress_kwargs)
elif line.startswith("Print time:"):
elif line.startswith(u"Print time:"):
try:
print_time = int(line[len("Print time:"):].strip())
print_time = int(line[len(u"Print time:"):].strip())
if analysis is None:
analysis = dict()
analysis["estimatedPrintTime"] = print_time
except:
pass
elif line.startswith("Filament:") or line.startswith("Filament2:"):
if line.startswith("Filament:"):
filament_str = line[len("Filament:"):].strip()
elif line.startswith(u"Filament:") or line.startswith(u"Filament2:"):
if line.startswith(u"Filament:"):
filament_str = line[len(u"Filament:"):].strip()
tool_key = "tool0"
else:
filament_str = line[len("Filament2:"):].strip()
filament_str = line[len(u"Filament2:"):].strip()
tool_key = "tool1"
try:
@@ -339,20 +347,20 @@ class CuraPlugin(octoprint.plugin.SlicerPlugin,
with self._job_mutex:
if machinecode_path in self._cancelled_jobs:
self._cura_logger.info("### Cancelled")
self._cura_logger.info(u"### Cancelled")
raise octoprint.slicing.SlicingCancelled()
self._cura_logger.info("### Finished, returncode %d" % p.returncode)
self._cura_logger.info(u"### Finished, returncode %d" % p.returncode)
if p.returncode == 0:
return True, dict(analysis=analysis)
else:
self._logger.warn("Could not slice via Cura, got return code %r" % p.returncode)
self._logger.warn(u"Could not slice via Cura, got return code %r" % p.returncode)
return False, "Got returncode %r" % p.returncode
except octoprint.slicing.SlicingCancelled as e:
raise e
except:
self._logger.exception("Could not slice via Cura, got an unknown error")
self._logger.exception(u"Could not slice via Cura, got an unknown error")
return False, "Unknown error, please consult the log file"
finally:
@@ -371,7 +379,7 @@ class CuraPlugin(octoprint.plugin.SlicerPlugin,
command = self._slicing_commands[machinecode_path]
if command is not None:
command.terminate()
self._logger.info("Cancelled slicing of %s" % machinecode_path)
self._logger.info(u"Cancelled slicing of %s" % machinecode_path)
def _load_profile(self, path):
import yaml
@@ -39,6 +39,7 @@ class PluginManagerPlugin(octoprint.plugin.SimpleApiPlugin,
self._pending_uninstall = set()
self._pip_caller = None
self._pip_version_dependency_links = pkg_resources.parse_version("1.5")
self._repository_available = False
self._repository_plugins = []
@@ -80,7 +81,9 @@ class PluginManagerPlugin(octoprint.plugin.SimpleApiPlugin,
return dict(
repository="http://plugins.octoprint.org/plugins.json",
repository_ttl=24*60,
pip=None
pip=None,
dependency_links=False,
hidden=[]
)
def on_settings_save(self, data):
@@ -121,11 +124,17 @@ class PluginManagerPlugin(octoprint.plugin.SimpleApiPlugin,
upload_path = flask.request.values[input_upload_path]
upload_name = flask.request.values[input_upload_name]
exts = filter(lambda x: upload_name.lower().endswith(x), (".zip", ".tar.gz", ".tgz", ".tar"))
if not len(exts):
return flask.make_response("File doesn't have a valid extension for a plugin archive", 400)
ext = exts[0]
import tempfile
import shutil
import os
archive = tempfile.NamedTemporaryFile(delete=False, suffix="-{upload_name}".format(**locals()))
archive = tempfile.NamedTemporaryFile(delete=False, suffix="{ext}".format(**locals()))
try:
archive.close()
shutil.copy(upload_path, archive.name)
@@ -175,6 +184,7 @@ class PluginManagerPlugin(octoprint.plugin.SimpleApiPlugin,
plugin_name = data["plugin"] if "plugin" in data else None
return self.command_install(url=url,
force="force" in data and data["force"] in valid_boolean_trues,
dependency_links="dependency_links" in data and data["dependency_links"] in valid_boolean_trues,
reinstall=plugin_name)
elif command == "uninstall":
@@ -193,14 +203,17 @@ class PluginManagerPlugin(octoprint.plugin.SimpleApiPlugin,
plugin = self._plugin_manager.plugins[plugin_name]
return self.command_toggle(plugin, command)
def command_install(self, url=None, path=None, force=False, reinstall=None):
def command_install(self, url=None, path=None, force=False, reinstall=None, dependency_links=False):
if url is not None:
pip_args = ["install", sarge.shell_quote(url)]
elif path is not None:
pip_args = ["install", path]
pip_args = ["install", sarge.shell_quote(path)]
else:
raise ValueError("Either url or path must be provided")
if dependency_links or self._settings.get_boolean(["dependency_links"]):
pip_args.append("--process-dependency-links")
all_plugins_before = self._plugin_manager.find_plugins()
success_string = "Successfully installed"
@@ -409,16 +422,25 @@ class PluginManagerPlugin(octoprint.plugin.SimpleApiPlugin,
def _call_pip(self, args):
if self._pip_caller is None or not self._pip_caller.available:
raise RuntimeError(u"No pip available, can't operate".format(**locals()))
if "--process-dependency-links" in args:
self._log_message(u"Installation needs to process external dependencies, that might make it take a bit longer than usual depending on the pip version")
if self._pip_caller < self._pip_version_dependency_links:
args.remove("--process-dependency-links")
return self._pip_caller.execute(*args)
def _log_message(self, *lines):
self._log(lines, prefix=u"*", stream="message")
def _log_call(self, *lines):
self._log(lines, prefix=" ", stream="call")
self._log(lines, prefix=u" ", stream="call")
def _log_stdout(self, *lines):
self._log(lines, prefix=">", stream="stdout")
self._log(lines, prefix=u">", stream="stdout")
def _log_stderr(self, *lines):
self._log(lines, prefix="!", stream="stderr")
self._log(lines, prefix=u"!", stream="stderr")
def _log(self, lines, prefix=None, stream=None, strip=True):
if strip:
@@ -509,6 +531,9 @@ class PluginManagerPlugin(octoprint.plugin.SimpleApiPlugin,
def map_repository_entry(entry):
result = dict(entry)
if not "follow_dependency_links" in result:
result["follow_dependency_links"] = False
result["is_compatible"] = dict(
octoprint=True,
os=True
@@ -70,6 +70,8 @@ $(function() {
self.loglines = ko.observableArray([]);
self.installedPlugins = ko.observableArray([]);
self.followDependencyLinks = ko.observable(false);
self.working = ko.observable(false);
self.workingTitle = ko.observable();
self.workingDialog = undefined;
@@ -125,6 +127,9 @@ $(function() {
self.uploadButton.unbind("click");
self.uploadButton.bind("click", function() {
self._markWorking(gettext("Installing plugin..."), gettext("Installing plugin from uploaded archive..."));
data.formData = {
dependency_links: self.followDependencyLinks()
};
data.submit();
return false;
});
@@ -147,19 +152,17 @@ $(function() {
}
});
self.performRepositorySearch = function(e) {
if (e !== undefined) {
e.preventDefault();
}
self.performRepositorySearch = function() {
var query = self.repositorySearchQuery();
if (query !== undefined && query.trim() != "") {
query = query.toLocaleLowerCase();
self.repositoryplugins.changeSearchFunction(function(entry) {
return entry && (entry["title"].toLocaleLowerCase().indexOf(query) > -1 || entry["description"].toLocaleLowerCase().indexOf(query) > -1);
});
} else {
self.repositoryplugins.resetSearch();
}
return false;
};
self.fromResponse = function(data) {
@@ -242,13 +245,13 @@ $(function() {
}
if (self.installed(data)) {
self.installPlugin(data.archive, data.title, data.id);
self.installPlugin(data.archive, data.title, data.id, data.follow_dependency_links || self.followDependencyLinks());
} else {
self.installPlugin(data.archive, data.title, undefined);
self.installPlugin(data.archive, data.title, undefined, data.follow_dependency_links || self.followDependencyLinks());
}
};
self.installPlugin = function(url, name, reinstall) {
self.installPlugin = function(url, name, reinstall, followDependencyLinks) {
if (!self.loginState.isAdmin()) {
return;
}
@@ -262,6 +265,10 @@ $(function() {
}
if (!url) return;
if (followDependencyLinks === undefined) {
followDependencyLinks = self.followDependencyLinks();
}
var workTitle, workText;
if (!reinstall) {
workTitle = gettext("Installing plugin...");
@@ -277,7 +284,7 @@ $(function() {
self._markWorking(workTitle, workText);
var command = "install";
var payload = {url: url};
var payload = {url: url, dependency_links: followDependencyLinks};
if (reinstall) {
payload["plugin"] = reinstall;
payload["force"] = true;
@@ -147,6 +147,21 @@
</div>
<span class="help-block" data-bind="visible: invalidArchive">{{ _('This does not look like a valid plugin archive. Valid plugin archives should be either zip files or tarballs and have the extension ".zip", ".tar.gz", ".tgz" or ".tar"') }}</span>
</form>
<div>
<div><small><a href="#" class="muted" onclick="$(this).children().toggleClass('icon-caret-right icon-caret-down').parent().parent().parent().next().slideToggle('fast')"><i class="icon-caret-right"></i> {{ _('Advanced options') }}</a></small></div>
<div class="hide">
<form class="form-horizontal">
<div class="control-group">
<div class="controls">
<label class="checkbox">
<input type="checkbox" data-bind="checked: followDependencyLinks"> {{ _('Use <code>--process-dependency-links</code> with <code>pip install</code>') }}
</label>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">{{ _('Close') }}</button>
@@ -82,9 +82,24 @@ class SoftwareUpdatePlugin(octoprint.plugin.BlueprintPlugin,
except:
self._logger.exception("Error while loading version cache from disk")
else:
self._version_cache = data
self._version_cache_dirty = False
self._logger.info("Loaded version cache from disk")
try:
if "octoprint" in data and len(data["octoprint"]) == 4 and "local" in data["octoprint"][1] and "value" in data["octoprint"][1]["local"]:
data_version = data["octoprint"][1]["local"]["value"]
else:
self._logger.info("Can't determine version of OctoPrint version cache was created for, not using it")
return
from octoprint._version import get_versions
octoprint_version = get_versions()["version"]
if data_version != octoprint_version:
self._logger.info("Version cache was created for another version of OctoPrint, not using it")
return
self._version_cache = data
self._version_cache_dirty = False
self._logger.info("Loaded version cache from disk")
except:
self._logger.exception("Error parsing in version cache data")
def _save_version_cache(self):
import tempfile
@@ -127,15 +142,29 @@ class SoftwareUpdatePlugin(octoprint.plugin.BlueprintPlugin,
"cache_ttl": 24 * 60,
}
def on_settings_load(self):
data = dict(octoprint.plugin.SettingsPlugin.on_settings_load(self))
if "checks" in data:
del data["checks"]
return data
def on_settings_save(self, data):
octoprint.plugin.SettingsPlugin.on_settings_save(self, data)
for key in self.get_settings_defaults():
if key == "checks" or key == "cache_ttl":
continue
if key in data:
self._settings.set([key], data[key])
if "cache_ttl" in data:
self._settings.set_int(["cache_ttl"], data["cache_ttl"])
self._version_cache_ttl = self._settings.get_int(["cache_ttl"]) * 60
def get_settings_version(self):
return 2
return 3
def on_settings_migrate(self, target, current=None):
if current is None:
if current is None or current == 2:
# there might be some left over data from the time we still persisted everything to settings,
# even the stuff that shouldn't be persisted but always provided by the hook - let's
# clean up
@@ -144,14 +173,17 @@ class SoftwareUpdatePlugin(octoprint.plugin.BlueprintPlugin,
if configured_checks is None:
configured_checks = dict()
check_keys = configured_checks.keys()
# take care of the octoprint entry
if "octoprint" in configured_checks:
octoprint_check = dict(configured_checks["octoprint"])
if "type" in octoprint_check and not octoprint_check["type"] == "github_commit":
deletables=["current"]
if "type" not in octoprint_check or octoprint_check["type"] != "github_commit":
deletables=["current", "displayName", "displayVersion"]
else:
deletables=[]
octoprint_check = self._clean_settings_check("octoprint", octoprint_check, self.get_settings_defaults()["checks"]["octoprint"], delete=deletables, save=False)
check_keys.remove("octoprint")
# and the hooks
update_check_hooks = self._plugin_manager.get_hooks("octoprint.plugin.softwareupdate.check_config")
@@ -165,12 +197,20 @@ class SoftwareUpdatePlugin(octoprint.plugin.BlueprintPlugin,
if key in configured_checks:
settings_check = dict(configured_checks[key])
merged = dict_merge(data, settings_check)
if "type" in merged and not merged["type"] == "github_commit":
if "type" not in merged or merged["type"] != "github_commit":
deletables = ["current", "displayVersion"]
else:
deletables = []
self._clean_settings_check(key, settings_check, data, delete=deletables, save=False)
check_keys.remove(key)
# and anything that's left over we'll just remove now
for key in check_keys:
dummy_defaults = dict(plugins=dict())
dummy_defaults["plugins"][self._identifier] = dict(checks=dict())
dummy_defaults["plugins"][self._identifier]["checks"][key] = None
self._settings.set(["checks", key], None, defaults=dummy_defaults)
elif current == 1:
configured_checks = self._settings.get(["checks"], incl_defaults=False)
@@ -270,8 +310,9 @@ class SoftwareUpdatePlugin(octoprint.plugin.BlueprintPlugin,
##~~ TemplatePlugin API
def get_template_configs(self):
from flask.ext.babel import gettext
return [
dict(type="settings", name="Software Update")
dict(type="settings", name=gettext("Software Update"))
]
#~~ Updater
@@ -142,7 +142,7 @@ $(function() {
click: function() {
self._markNotificationAsSeen(data.information);
self._showPopup({
text: gettext("You can make this message display again via \"Settings\" > \"SoftwareUpdate\" > \"Check for update now\"")
text: gettext("You can make this message display again via \"Settings\" > \"Software Update\" > \"Check for update now\"")
});
}
}, {
@@ -7,6 +7,7 @@ __copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms
import logging
import pkg_resources
from octoprint.util.pip import PipCaller, UnknownPip
@@ -14,6 +15,7 @@ logger = logging.getLogger("octoprint.plugins.softwareupdate.updaters.pip")
console_logger = logging.getLogger("octoprint.plugins.softwareupdate.updaters.pip.console")
_pip_callers = dict()
_pip_version_dependency_links = pkg_resources.parse_version("1.5")
def can_perform_update(target, check):
pip_caller = _get_pip_caller(command=check["pip_command"] if "pip_command" in check else None)
@@ -46,12 +48,15 @@ def perform_update(target, check, target_version):
install_arg = check["pip"].format(target_version=target_version)
logger.debug("Target: %s, executing pip install %s" % (target, install_arg))
logger.debug(u"Target: %s, executing pip install %s" % (target, install_arg))
pip_args = ["install", check["pip"].format(target_version=target_version, target=target_version)]
if "dependency_links" in check and check["dependency_links"] and pip_caller >= _pip_version_dependency_links:
pip_args += ["--process-dependency-links"]
pip_caller.execute(*pip_args)
logger.debug("Target: %s, executing pip install %s --ignore-reinstalled --force-reinstall --no-deps" % (target, install_arg))
logger.debug(u"Target: %s, executing pip install %s --ignore-reinstalled --force-reinstall --no-deps" % (target, install_arg))
pip_args += ["--ignore-installed", "--force-reinstall", "--no-deps"]
pip_caller.execute(*pip_args)
@@ -59,13 +64,13 @@ def perform_update(target, check, target_version):
return "ok"
def _log_call(*lines):
_log(lines, prefix=" ")
_log(lines, prefix=u" ")
def _log_stdout(*lines):
_log(lines, prefix=">")
_log(lines, prefix=u">")
def _log_stderr(*lines):
_log(lines, prefix="!")
_log(lines, prefix=u"!")
def _log(lines, prefix=None):
lines = map(lambda x: x.strip(), lines)
@@ -44,35 +44,71 @@ def _get_latest_release(user, repo, include_prerelease=False):
return latest["name"], latest["tag_name"]
def _is_current(release_information, compare_type, custom=None):
def _get_sanitized_version(version_string):
if "-" in version_string:
version_string = version_string[:version_string.find("-")]
return version_string
def _get_comparable_version_pkg_resources(version_string, force_base=True):
import pkg_resources
version = pkg_resources.parse_version(version_string)
if force_base:
if isinstance(version, tuple):
# old setuptools
base_version = []
for part in version:
if part.startswith("*"):
break
base_version.append(part)
version = tuple(base_version)
else:
# new setuptools
version = pkg_resources.parse_version(version.base_version)
return version
def _get_comparable_version_semantic(version_string, force_base=True):
import semantic_version
version = semantic_version.Version.coerce(version_string, partial=False)
if force_base:
version_string = "{}.{}.{}".format(version.major, version.minor, version.patch)
version = semantic_version.Version.coerce(version_string, partial=False)
return version
def _is_current(release_information, compare_type, custom=None, force_base=True):
if release_information["remote"]["value"] is None:
return True
if not compare_type in ("python", "semantic", "unequal", "custom") or compare_type == "custom" and custom is None:
compare_type = "python"
sanitized_local = _get_sanitized_version(release_information["local"]["value"])
sanitized_remote = _get_sanitized_version(release_information["remote"]["value"])
try:
if compare_type == "python":
import pkg_resources
local_version = pkg_resources.parse_version(release_information["local"]["value"])
remote_version = pkg_resources.parse_version(release_information["remote"]["value"])
local_version = _get_comparable_version_pkg_resources(sanitized_local, force_base=force_base)
remote_version = _get_comparable_version_pkg_resources(sanitized_remote, force_base=force_base)
return local_version >= remote_version
elif compare_type == "semantic":
import semantic_version
local_version = semantic_version.Version(release_information["local"]["value"])
remote_version = semantic_version.Version(release_information["remote"]["value"])
local_version = _get_comparable_version_semantic(sanitized_local, force_base=force_base)
remote_version = _get_comparable_version_semantic(sanitized_remote, force_base=force_base)
return local_version >= remote_version
elif compare_type == "custom":
return custom(release_information["local"], release_information["remote"])
return custom(sanitized_local, sanitized_remote)
else:
return release_information["local"]["value"] == release_information["remote"]["value"]
return sanitized_local == sanitized_remote
except:
logger.exception("Could not check if version is current due to an error, assuming it is")
return True
@@ -82,11 +118,13 @@ def get_latest(target, check, custom_compare=None):
if not "user" in check or not "repo" in check:
raise ConfigurationInvalid("github_release update configuration for %s needs user and repo set" % target)
current = None
if "current" in check:
current = check["current"]
current = check.get("current", None)
include_prerelease = check.get("prerelease", False)
force_base = check.get("force_base", True)
remote_name, remote_tag = _get_latest_release(check["user"], check["repo"], include_prerelease=check["prerelease"] == True if "prerelease" in check else False)
remote_name, remote_tag = _get_latest_release(check["user"],
check["repo"],
include_prerelease=include_prerelease)
compare_type = check["release_compare"] if "release_compare" in check else "python"
information =dict(
@@ -96,4 +134,7 @@ def get_latest(target, check, custom_compare=None):
logger.debug("Target: %s, local: %s, remote: %s" % (target, current, remote_tag))
return information, _is_current(information, compare_type, custom=custom_compare)
return information, _is_current(information,
compare_type,
custom=custom_compare,
force_base=force_base)
+31 -7
View File
@@ -14,6 +14,7 @@ from flask.ext.babel import Babel, gettext, ngettext
from flask.ext.assets import Environment, Bundle
from babel import Locale
from watchdog.observers import Observer
from watchdog.observers.polling import PollingObserver
from collections import defaultdict
import os
@@ -233,7 +234,10 @@ class Server():
settingsPlugins = pluginManager.get_implementations(octoprint.plugin.SettingsPlugin)
for implementation in settingsPlugins:
settings_plugin_config_migration(implementation._identifier, implementation)
try:
settings_plugin_config_migration(implementation._identifier, implementation)
except:
self._logger.exception("Error while trying to migrate settings for plugin {}, ignoring it".format(implementation._identifier))
pluginManager.implementation_post_inits=[settings_plugin_config_migration]
@@ -399,7 +403,12 @@ class Server():
printer.connect(port=port, baudrate=baudrate, profile=printer_profile["id"] if "id" in printer_profile else "_default")
# start up watchdogs
observer = Observer()
if s.getBoolean(["feature", "pollWatched"]):
# use less performant polling observer if explicitely configured
observer = PollingObserver()
else:
# use os default
observer = Observer()
observer.schedule(util.watchdog.GcodeWatchdogHandler(fileManager, printer), s.getBaseFolder("watched"))
observer.start()
@@ -538,6 +547,9 @@ class Server():
},
"tornado.general": {
"level": "INFO"
},
"octoprint.server.util.flask": {
"level": "WARN"
}
},
"root": {
@@ -629,7 +641,10 @@ class Server():
def _register_template_plugins(self):
template_plugins = pluginManager.get_implementations(octoprint.plugin.TemplatePlugin)
for plugin in template_plugins:
self._register_additional_template_plugin(plugin)
try:
self._register_additional_template_plugin(plugin)
except:
self._logger.exception("Error while trying to register templates of plugin {}, ignoring it".format(plugin._identifier))
def _register_additional_template_plugin(self, plugin):
folder = plugin.get_template_folder()
@@ -664,14 +679,22 @@ class Server():
def _register_blueprint_plugins(self):
blueprint_plugins = octoprint.plugin.plugin_manager().get_implementations(octoprint.plugin.BlueprintPlugin)
for plugin in blueprint_plugins:
self._register_blueprint_plugin(plugin)
try:
self._register_blueprint_plugin(plugin)
except:
self._logger.exception("Error while registering blueprint of plugin {}, ignoring it".format(plugin._identifier))
continue
def _register_asset_plugins(self):
asset_plugins = octoprint.plugin.plugin_manager().get_implementations(octoprint.plugin.AssetPlugin)
for plugin in asset_plugins:
if isinstance(plugin, octoprint.plugin.BlueprintPlugin):
continue
self._register_asset_plugin(plugin)
try:
self._register_asset_plugin(plugin)
except:
self._logger.exception("Error while registering assets of plugin {}, ignoring it".format(plugin._identifier))
continue
def _register_blueprint_plugin(self, plugin):
name = plugin._identifier
@@ -706,6 +729,7 @@ class Server():
global pluginManager
util.flask.fix_webassets_cache()
util.flask.fix_webassets_filtertool()
base_folder = settings().getBaseFolder("generated")
@@ -839,9 +863,9 @@ class Server():
js_app_bundle = Bundle(*js_app, output="webassets/packed_app.js", filters="js_delimiter_bundler")
css_libs_bundle = Bundle(*css_libs, output="webassets/packed_libs.css")
css_app_bundle = Bundle(*css_app, output="webassets/packed_app.css")
css_app_bundle = Bundle(*css_app, output="webassets/packed_app.css", filters="cssrewrite")
all_less_bundle = Bundle(*less_app, output="webassets/packed_app.less", filters="less_importrewrite")
all_less_bundle = Bundle(*less_app, output="webassets/packed_app.less", filters="cssrewrite, less_importrewrite")
assets.register("js_libs", js_libs_bundle)
assets.register("js_app", js_app_bundle)
+4 -6
View File
@@ -156,12 +156,10 @@ def performSystemAction():
ignore = availableAction["ignore"] if "ignore" in availableAction else False
logger.info("Performing command: %s" % availableAction["command"])
try:
# Note: we put the command in brackets since sarge (up to the most recently released version) has
# a bug concerning shell=True commands. Once sarge 0.1.4 we can upgrade to that and remove this
# workaround again
#
# See https://bitbucket.org/vinay.sajip/sarge/issue/21/behavior-is-not-like-popen-using-shell
p = sarge.run([availableAction["command"]], stderr=sarge.Capture(), shell=True, async=async)
# we run this with shell=True since we have to trust whatever
# our admin configured as command and since we want to allow
# shell-alike handling here...
p = sarge.run(availableAction["command"], stderr=sarge.Capture(), shell=True, async=async)
if not async:
if not ignore and p.returncode != 0:
returncode = p.returncode
+7 -1
View File
@@ -90,11 +90,17 @@ def getInstalledLanguagePacks():
def uploadLanguagePack():
input_name = "file"
input_upload_path = input_name + "." + settings().get(["server", "uploads", "pathSuffix"])
if not input_upload_path in request.values:
input_upload_name = input_name + "." + settings().get(["server", "uploads", "nameSuffix"])
if not input_upload_path in request.values or not input_upload_name in request.values:
return make_response("No file included", 400)
upload_name = request.values[input_upload_name]
upload_path = request.values[input_upload_path]
exts = filter(lambda x: upload_name.lower().endswith(x), (".zip", ".tar.gz", ".tgz", ".tar"))
if not len(exts):
return make_response("File doesn't have a valid extension for a plugin archive", 400)
target_path = settings().getBaseFolder("translations")
if tarfile.is_tarfile(upload_path):
+3 -1
View File
@@ -68,7 +68,8 @@ def getSettings():
"swallowOkAfterResend": s.getBoolean(["feature", "swallowOkAfterResend"]),
"repetierTargetTemp": s.getBoolean(["feature", "repetierTargetTemp"]),
"externalHeatupDetection": s.getBoolean(["feature", "externalHeatupDetection"]),
"keyboardControl": s.getBoolean(["feature", "keyboardControl"])
"keyboardControl": s.getBoolean(["feature", "keyboardControl"]),
"pollWatched": s.getBoolean(["feature", "pollWatched"])
},
"serial": {
"port": connectionOptions["portPreference"],
@@ -199,6 +200,7 @@ def setSettings():
if "repetierTargetTemp" in data["feature"].keys(): s.setBoolean(["feature", "repetierTargetTemp"], data["feature"]["repetierTargetTemp"])
if "externalHeatupDetection" in data["feature"].keys(): s.setBoolean(["feature", "externalHeatupDetection"], data["feature"]["externalHeatupDetection"])
if "keyboardControl" in data["feature"].keys(): s.setBoolean(["feature", "keyboardControl"], data["feature"]["keyboardControl"])
if "pollWatched" in data["feature"]: s.setBoolean(["feature", "pollWatched"], data["feature"]["pollWatched"])
if "serial" in data.keys():
if "autoconnect" in data["serial"].keys(): s.setBoolean(["serial", "autoconnect"], data["serial"]["autoconnect"])
+72 -2
View File
@@ -19,6 +19,7 @@ import uuid
import threading
import logging
import netaddr
import os
from octoprint.settings import settings
import octoprint.server
@@ -174,6 +175,34 @@ def fix_webassets_cache():
cache.FilesystemCache.set = fixed_set
cache.FilesystemCache.get = fixed_get
def fix_webassets_filtertool():
from webassets.merge import FilterTool, log, MemoryHunk
error_logger = logging.getLogger(__name__ + ".fix_webassets_filtertool")
def fixed_wrap_cache(self, key, func):
"""Return cache value ``key``, or run ``func``.
"""
if self.cache:
if not self.no_cache_read:
log.debug('Checking cache for key %s', key)
content = self.cache.get(key)
if not content in (False, None):
log.debug('Using cached result for %s', key)
return MemoryHunk(content)
try:
content = func().getvalue()
if self.cache:
log.debug('Storing result in cache with key %s', key,)
self.cache.set(key, content)
return MemoryHunk(content)
except:
error_logger.exception("Got an exception while trying to apply filter, ignoring file")
return MemoryHunk("")
FilterTool._wrap_cache = fixed_wrap_cache
#~~ passive login helper
def passive_login():
@@ -215,7 +244,7 @@ def passive_login():
_cache = SimpleCache()
def cached(timeout=5 * 60, key=lambda: "view/%s" % flask.request.path, unless=None, refreshif=None):
def cached(timeout=5 * 60, key=lambda: "view/%s" % flask.request.path, unless=None, refreshif=None, unless_response=None):
def decorator(f):
@functools.wraps(f)
def decorated_function(*args, **kwargs):
@@ -244,6 +273,11 @@ def cached(timeout=5 * 60, key=lambda: "view/%s" % flask.request.path, unless=No
logger.debug("No cache entry or refreshing cache for {path}, calling wrapped function".format(path=flask.request.path))
rv = f(*args, **kwargs)
# do not store if the "unless_response" condition is true
if callable(unless_response) and unless_response(rv):
logger.debug("Not caching result for {path}, bypassed".format(path=flask.request.path))
return rv
# store it in the cache
_cache.set(cache_key, rv, timeout=timeout)
@@ -256,6 +290,23 @@ def cached(timeout=5 * 60, key=lambda: "view/%s" % flask.request.path, unless=No
def cache_check_headers():
return "no-cache" in flask.request.cache_control or "no-cache" in flask.request.pragma
def cache_check_response_headers(response):
if not isinstance(response, flask.Response):
return False
headers = response.headers
if "Cache-Control" in headers and "no-cache" in headers["Cache-Control"]:
return True
if "Pragma" in headers and "no-cache" in headers["Pragma"]:
return True
if "Expires" in headers and headers["Expires"] in ("0", "-1"):
return True
return False
#~~ access validators for use with tornado
@@ -535,6 +586,8 @@ class SettingsCheckUpdater(webassets.updater.BaseUpdater):
##~~ plugin assets collector
def collect_plugin_assets(enable_gcodeviewer=True, enable_timelapse=True, preferred_stylesheet="css"):
logger = logging.getLogger(__name__ + ".collect_plugin_assets")
supported_stylesheets = ("css", "less")
assets = dict(
js=[],
@@ -577,14 +630,29 @@ def collect_plugin_assets(enable_gcodeviewer=True, enable_timelapse=True, prefer
asset_plugins = octoprint.plugin.plugin_manager().get_implementations(octoprint.plugin.AssetPlugin)
for implementation in asset_plugins:
name = implementation._identifier
all_assets = implementation.get_assets()
try:
all_assets = implementation.get_assets()
basefolder = implementation.get_asset_folder()
except:
logger.exception("Got an error while trying to collect assets from {}, ignoring assets from the plugin".format(name))
continue
def asset_exists(category, asset):
exists = os.path.exists(os.path.join(basefolder, asset))
if not exists:
logger.warn("Plugin {} is referring to non existing {} asset {}".format(name, category, asset))
return exists
if "js" in all_assets:
for asset in all_assets["js"]:
if not asset_exists("js", asset):
continue
assets["js"].append('plugin/{name}/{asset}'.format(**locals()))
if preferred_stylesheet in all_assets:
for asset in all_assets[preferred_stylesheet]:
if not asset_exists(preferred_stylesheet, asset):
continue
assets[preferred_stylesheet].append('plugin/{name}/{asset}'.format(**locals()))
else:
for stylesheet in supported_stylesheets:
@@ -592,6 +660,8 @@ def collect_plugin_assets(enable_gcodeviewer=True, enable_timelapse=True, prefer
continue
for asset in all_assets[stylesheet]:
if not asset_exists(stylesheet, asset):
continue
assets[stylesheet].append('plugin/{name}/{asset}'.format(**locals()))
break
+1 -1
View File
@@ -245,7 +245,7 @@ class UploadStorageFallbackHandler(tornado.web.RequestHandler):
self._on_part_header(self._buffer[delimiter_len+2:end_of_header])
self._buffer = self._buffer[end_of_header + 4:]
if delimiter_loc != -1 and self._buffer[delimiter_len:delimiter_len+2] == "--":
if delimiter_loc != -1 and self._buffer.strip() == delimiter + "--":
# we saw the last boundary and are at the end of our request
if self._current_part:
self._on_part_finish(self._current_part)
+5
View File
@@ -56,6 +56,11 @@ class GcodeWatchdogHandler(watchdog.events.PatternMatchingEventHandler):
file_wrapper.filename,
file_wrapper,
allow_overwrite=True)
if os.path.exists(path):
try:
os.remove(path)
except:
self._logger.exception("Error while trying to clear a file from the watched folder")
def on_created(self, event):
self._upload(event.src_path)
+26 -9
View File
@@ -21,7 +21,9 @@ import logging
_logger = logging.getLogger(__name__)
@app.route("/")
@util.flask.cached(refreshif=lambda: util.flask.cache_check_headers() or "_refresh" in request.values, key=lambda: "view/%s/%s" % (request.path, g.locale))
@util.flask.cached(refreshif=lambda: util.flask.cache_check_headers() or "_refresh" in request.values,
key=lambda: "view/%s/%s" % (request.path, g.locale),
unless_response=util.flask.cache_check_response_headers)
def index():
#~~ a bunch of settings
@@ -170,17 +172,21 @@ def index():
name = implementation._identifier
plugin_names.add(name)
vars = implementation.get_template_vars()
try:
vars = implementation.get_template_vars()
configs = implementation.get_template_configs()
except:
_logger.exception("Error while retrieving template data for plugin {}, ignoring it".format(name))
continue
if not isinstance(vars, dict):
vars = dict()
if not isinstance(configs, (list, tuple)):
configs = []
for var_name, var_value in vars.items():
plugin_vars["plugin_" + name + "_" + var_name] = var_value
configs = implementation.get_template_configs()
if not isinstance(configs, (list, tuple)):
configs = []
includes = _process_template_configs(name, implementation, configs, template_rules)
for t in template_types:
@@ -240,12 +246,13 @@ def index():
#~~ prepare full set of template vars for rendering
first_run = settings().getBoolean(["server", "firstRun"]) and (userManager is None or not userManager.hasBeenCustomized())
render_kwargs = dict(
webcamStream=settings().get(["webcam", "stream"]),
enableTemperatureGraph=settings().get(["feature", "temperatureGraph"]),
enableAccessControl=userManager is not None,
enableSdSupport=settings().get(["feature", "sdSupport"]),
firstRun=settings().getBoolean(["server", "firstRun"]) and (userManager is None or not userManager.hasBeenCustomized()),
firstRun=first_run,
debug=debug,
version=VERSION,
display_version=DISPLAY_VERSION,
@@ -260,10 +267,20 @@ def index():
#~~ render!
return render_template(
import datetime
response = make_response(render_template(
"index.jinja2",
**render_kwargs
)
))
response.headers["Last-Modified"] = datetime.datetime.now()
if first_run:
response.headers["Cache-Control"] = "no-store, no-cache, must-revalidate, post-check=0, pre-check=0, max-age=0"
response.headers["Pragma"] = "no-cache"
response.headers["Expires"] = "-1"
return response
def _process_template_configs(name, implementation, configs, rules):
+2 -1
View File
@@ -142,7 +142,8 @@ default_settings = {
"repetierTargetTemp": False,
"externalHeatupDetection": True,
"supportWait": True,
"keyboardControl": True
"keyboardControl": True,
"pollWatched": False
},
"folder": {
"uploads": None,
+9 -1
View File
@@ -24,6 +24,8 @@ import octoprint.plugin
import octoprint.events
from octoprint.settings import settings
import logging
from .exceptions import *
@@ -102,6 +104,8 @@ class SlicingManager(object):
"""
def __init__(self, profile_path, printer_profile_manager):
self._logger = logging.getLogger(__name__)
self._profile_path = profile_path
self._printer_profile_manager = printer_profile_manager
@@ -123,7 +127,11 @@ class SlicingManager(object):
plugins = octoprint.plugin.plugin_manager().get_implementations(octoprint.plugin.SlicerPlugin)
slicers = dict()
for plugin in plugins:
slicers[plugin.get_slicer_properties()["type"]] = plugin
try:
slicers[plugin.get_slicer_properties()["type"]] = plugin
except:
self._logger.exception("Error while getting properties from slicer {}, ignoring it".format(plugin._identifier))
continue
self._slicers = slicers
@property
+1 -1
View File
@@ -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,0.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;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffe6e6e6',GradientType=0);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);*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:hover,.btn:focus,.btn:active,.btn.active,.btn.disabled,.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:hover,.btn:focus{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:thin dotted #333;outline:5px auto -webkit-focus-ring-color;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.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255,255,255,0.75)}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,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;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);*background-color:#04c;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.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,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;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0);border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);*background-color:#f89406;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.btn-warning:hover,.btn-warning:focus,.btn-warning:aLine 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,0.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;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffe6e6e6',GradientType=0);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);*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:hover,.btn:focus,.btn:active,.btn.active,.btn.disabled,.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:hover,.btn:focus{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:thin dotted #333;outline:5px auto -webkit-focus-ring-color;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.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255,255,255,0.75)}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,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;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);*background-color:#04c;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.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,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;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0);border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);*background-color:#f89406;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.btn-warning:hover,.btn-warning:focus,.btn-warning:aLine truncated
+2 -1
View File
@@ -51,6 +51,7 @@ $(function() {
//~~ Initialize PNotify
PNotify.prototype.options.styling = "bootstrap2";
PNotify.prototype.options.mouse_reset = false;
//~~ Initialize view models
@@ -58,7 +59,7 @@ $(function() {
var viewModelMap = {};
// Fix Function#name on browsers that do not support it (IE):
// see: http://stackoverflow.com/questions/6903762/function-name-not-supported-in-ie
// see: http://stackoverflow.com/questions/6903762/function-name-not-supported-in-ie
if (!(function f() {}).name) {
Object.defineProperty(Function.prototype, 'name', {
get: function() {
@@ -47,8 +47,8 @@ $(function() {
},
"size": function(a, b) {
// sorts descending
if (b["bytes"] === undefined || a["bytes"] > b["bytes"]) return -1;
if (a["bytes"] < b["bytes"]) return 1;
if (b["size"] === undefined || a["size"] > b["size"]) return -1;
if (a["size"] < b["size"]) return 1;
return 0;
}
},
@@ -309,18 +309,17 @@ $(function() {
};
self.performSearch = function(e) {
if (e !== undefined) {
e.preventDefault();
}
var query = self.searchQuery();
if (query !== undefined && query.trim() != "") {
query = query.toLocaleLowerCase();
self.listHelper.changeSearchFunction(function(entry) {
return entry && entry["name"].toLocaleLowerCase().indexOf(query) > -1;
});
} else {
self.listHelper.resetSearch();
}
return false;
};
self.onDataUpdaterReconnect = function() {
@@ -113,6 +113,7 @@ $(function() {
self.feature_repetierTargetTemp = ko.observable(undefined);
self.feature_disableExternalHeatupDetection = ko.observable(undefined);
self.feature_keyboardControl = ko.observable(undefined);
self.feature_pollWatched = ko.observable(undefined);
self.serial_port = ko.observable();
self.serial_baudrate = ko.observable();
@@ -377,6 +378,7 @@ $(function() {
self.feature_repetierTargetTemp(response.feature.repetierTargetTemp);
self.feature_disableExternalHeatupDetection(!response.feature.externalHeatupDetection);
self.feature_keyboardControl(response.feature.keyboardControl);
self.feature_pollWatched(response.feature.pollWatched);
self.serial_port(response.serial.port);
self.serial_baudrate(response.serial.baudrate);
@@ -457,7 +459,8 @@ $(function() {
"swallowOkAfterResend": self.feature_swallowOkAfterResend(),
"repetierTargetTemp": self.feature_repetierTargetTemp(),
"externalHeatupDetection": !self.feature_disableExternalHeatupDetection(),
"keyboardControl": self.feature_keyboardControl()
"keyboardControl": self.feature_keyboardControl(),
"pollWatched": self.feature_pollWatched()
},
"serial": {
"port": self.serial_port(),
@@ -86,7 +86,7 @@ $(function() {
self._processCurrentLogData = function(data) {
self.log(self.log().concat(_.map(data, function(line) { return self._toInternalFormat(line) })));
if (self.autoscrollEnabled()) {
self.log(self.log.slice(-300));
self.log(self.log.slice(-self.buffer()));
}
};
+4 -3
View File
@@ -726,8 +726,9 @@
selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
$parent = $(selector)
$parent.length || ($parent = $this.parent())
$parent = selector && (selector != "#") && $(selector)
if (!$parent || !$parent.length) $parent = $this.parent()
return $parent
}
@@ -2156,4 +2157,4 @@
})
}(window.jQuery);
}(window.jQuery);
@@ -1,6 +0,0 @@
/*!
* Bootstrap.js by @fat & @mdo
* Copyright 2012 Twitter, Inc.
* http://www.apache.org/licenses/LICENSE-2.0.txt
*/
!function($){"use strict";$(function(){$.support.transition=function(){var transitionEnd=function(){var name,el=document.createElement("bootstrap"),transEndEventNames={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(name in transEndEventNames)if(void 0!==el.style[name])return transEndEventNames[name]}();return transitionEnd&&{end:transitionEnd}}()})}(window.jQuery),!function($){"use strict";var dismiss='[data-dismiss="alert"]',Alert=function(el){$(el).on("click",dismiss,this.close)};Alert.prototype.close=function(e){function removeElement(){$parent.trigger("closed").remove()}var $parent,$this=$(this),selector=$this.attr("data-target");selector||(selector=$this.attr("href"),selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,"")),$parent=$(selector),e&&e.preventDefault(),$parent.length||($parent=$this.hasClass("alert")?$this:$this.parent()),$parent.trigger(e=$.Event("close")),e.isDefaultPrevented()||($parent.removeClass("in"),$.support.transition&&$parent.hasClass("fade")?$parent.on($.support.transition.end,removeElement):removeElement())};var old=$.fn.alert;$.fn.alert=function(option){return this.each(function(){var $this=$(this),data=$this.data("alert");data||$this.data("alert",data=new Alert(this)),"string"==typeof option&&data[option].call($this)})},$.fn.alert.Constructor=Alert,$.fn.alert.noConflict=function(){return $.fn.alert=old,this},$(document).on("click.alert.data-api",dismiss,Alert.prototype.close)}(window.jQuery),!function($){"use strict";var Button=function(element,options){this.$element=$(element),this.options=$.extend({},$.fn.button.defaults,options)};Button.prototype.setState=function(state){var d="disabled",$el=this.$element,data=$el.data(),val=$el.is("input")?"val":"html";state+="Text",data.resetText||$el.data("resetText",$el[val]()),$el[val](data[state]||this.options[state]),setTimeout(function(){"loadingText"==state?$el.addClass(d).attr(d,d):$el.removeClass(d).removeAttr(d)},0)},Button.prototype.toggle=function(){var $parent=this.$element.closest('[data-toggle="buttons-radio"]');$parent&&$parent.find(".active").removeClass("active"),this.$element.toggleClass("active")};var old=$.fn.button;$.fn.button=function(option){return this.each(function(){var $this=$(this),data=$this.data("button"),options="object"==typeof option&&option;data||$this.data("button",data=new Button(this,options)),"toggle"==option?data.toggle():option&&data.setState(option)})},$.fn.button.defaults={loadingText:"loading..."},$.fn.button.Constructor=Button,$.fn.button.noConflict=function(){return $.fn.button=old,this},$(document).on("click.button.data-api","[data-toggle^=button]",function(e){var $btn=$(e.target);$btn.hasClass("btn")||($btn=$btn.closest(".btn")),$btn.button("toggle")})}(window.jQuery),!function($){"use strict";var Carousel=function(element,options){this.$element=$(element),this.options=options,"hover"==this.options.pause&&this.$element.on("mouseenter",$.proxy(this.pause,this)).on("mouseleave",$.proxy(this.cycle,this))};Carousel.prototype={cycle:function(e){return e||(this.paused=!1),this.options.interval&&!this.paused&&(this.interval=setInterval($.proxy(this.next,this),this.options.interval)),this},to:function(pos){var $active=this.$element.find(".item.active"),children=$active.parent().children(),activePos=children.index($active),that=this;if(!(pos>children.length-1||0>pos))return this.sliding?this.$element.one("slid",function(){that.to(pos)}):activePos==pos?this.pause().cycle():this.slide(pos>activePos?"next":"prev",$(children[pos]))},pause:function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&$.support.transition.end&&(this.$element.trigger($.support.transition.end),this.cycle()),clearInterval(this.interval),this.interval=null,this},next:function(){return this.sliding?void 0:this.slide("next")},prev:function(){return this.sliding?void 0:this.slide("prev")},slide:function(type,next){var e,$active=this.$element.find(".item.active"),$next=next||$active[type](),isCycling=this.interval,direction="next"==type?"left":"right",fallback="next"==type?"first":"last",that=this;if(this.sliding=!0,isCycling&&this.pause(),$next=$next.length?$next:this.$element.find(".item")[fallback](),e=$.Event("slide",{relatedTarget:$next[0]}),!$next.hasClass("active")){if($.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(e),e.isDefaultPrevented())return;$next.addClass(type),$next[0].offsetWidth,$active.addClass(direction),$next.addClass(direction),this.$element.one($.support.transition.end,function(){$next.removeClass([type,direction].join(" ")).addClass("active"),$active.removeClass(["active",direction].join(" ")),that.sliding=!1,setTimeout(function(){that.$element.trigger("slid")},0)})}else{if(this.$element.trigger(e),e.isDefaultPrevented())return;$active.removeClass("active"),$next.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return isCycling&&this.cycle()Line truncated
+14
View File
@@ -975,6 +975,20 @@ textarea.block {
}
}
// Special delivery for Safari browsers... because Safari >= 8 sometimes just
// shows us white panes on the settings dialog when the full-sized-box has
// an absolute position (which it needs for both scrollbars to work), at least
// until the page is resized or otherwise a rerender is triggered, we'll have
// our styling resolve to static positioning on that browser for now.
//
// This btw also means that the dialog will change in size. Yay.
//
// Better use something else if you have the option, that thing is really
// weird.
_::-webkit-full-page-media, _:future, :root .full-sized-box {
position: static;
}
.scrollable {
height: 100%;
overflow: auto;
@@ -29,4 +29,11 @@
<input type="text" class="input-block-level" data-bind="value: folder_watched" id="settings-folderWatched">
</div>
</div>
<div class="control-group">
<div class="controls">
<label class="checkbox">
<input type="checkbox" data-bind="checked: feature_pollWatched" id="settings-featurePollWatched"> {{ _('Actively poll the watched folder. Check this if files in your watched folder aren\'t automatically added otherwise.') }}
</label>
</div>
</div>
</form>
@@ -22,7 +22,7 @@
<label class="control-label" for="settings-serialTimeoutTemperature">{{ _('Temperature interval') }}</label>
<div class="controls">
<div class="input-append">
<input type="number" step="any" min="0" class="input-mini text-right" data-bind="value: serial_timeoutTemperature" id="settings-serialTimeoutTemperature">
<input type="number" step="any" min="1" class="input-mini text-right" data-bind="value: serial_timeoutTemperature" id="settings-serialTimeoutTemperature">
<span class="add-on">s</span>
</div>
</div>
+2 -2
View File
@@ -281,12 +281,12 @@ class Timelapse(object):
filters = []
# flip video if configured
if settings().getBoolean(["webcam", "rotate90"]):
filters.append('transpose=1')
if settings().getBoolean(["webcam", "flipH"]):
filters.append('hflip')
if settings().getBoolean(["webcam", "flipV"]):
filters.append('vflip')
if settings().getBoolean(["webcam", "rotate90"]):
filters.append('transpose=2')
# add watermark if configured
watermarkFilter = None
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -474,7 +474,7 @@ class User(UserMixin):
class SessionUser(User):
def __init__(self, user):
User.__init__(self, user._username, user._passwordHash, user._active, user._roles, user._apikey)
User.__init__(self, user._username, user._passwordHash, user._active, user._roles, user._apikey, user._settings)
import string
import random
+21 -5
View File
@@ -352,9 +352,7 @@ def silent_remove(file):
def sanitize_ascii(line):
if not isinstance(line, basestring):
raise ValueError("Expected either str or unicode but got {} instead".format(line.__class__.__name__ if line is not None else None))
if isinstance(line, str):
line = unicode(line, 'ascii', 'replace')
return line.encode('ascii', 'replace').rstrip()
return to_unicode(line, encoding="ascii", errors="replace").rstrip()
def filter_non_ascii(line):
@@ -369,12 +367,28 @@ def filter_non_ascii(line):
"""
try:
unicode(line, 'ascii').encode('ascii')
to_str(to_unicode(line, encoding="ascii"), encoding="ascii")
return False
except ValueError:
return True
def to_str(s_or_u, encoding="utf-8", errors="strict"):
"""Make sure ``s_or_u`` is a str."""
if isinstance(s_or_u, unicode):
return s_or_u.encode(encoding, errors=errors)
else:
return s_or_u
def to_unicode(s_or_u, encoding="utf-8", errors="strict"):
"""Make sure ``s_or_u`` is a unicode string."""
if isinstance(s_or_u, str):
return s_or_u.decode(encoding, errors=errors)
else:
return s_or_u
def dict_merge(a, b):
"""
Recursively deep-merges two dictionaries.
@@ -556,9 +570,10 @@ class RepeatedTimer(threading.Thread):
run_first (boolean): If set to True, the function will be run for the first time *before* the first wait period.
If set to False (the default), the function will be run for the first time *after* the first wait period.
condition (callable): Condition that needs to be True for loop to continue. Defaults to ``lambda: True``.
daemon (bool): daemon flag to set on underlying thread.
"""
def __init__(self, interval, function, args=None, kwargs=None, run_first=False, condition=None):
def __init__(self, interval, function, args=None, kwargs=None, run_first=False, condition=None, daemon=True):
threading.Thread.__init__(self)
if args is None:
@@ -579,6 +594,7 @@ class RepeatedTimer(threading.Thread):
self.kwargs = kwargs
self.run_first = run_first
self.condition = condition
self.daemon = daemon
def cancel(self):
self.finished.set()
+18 -8
View File
@@ -529,7 +529,7 @@ class MachineCom(object):
self.sendCommand("M24")
self._sd_status_timer = RepeatedTimer(lambda: get_interval("sdStatus"), self._poll_sd_status, run_first=True)
self._sd_status_timer = RepeatedTimer(lambda: get_interval("sdStatus", default_value=1.0), self._poll_sd_status, run_first=True)
self._sd_status_timer.start()
else:
line = self._getNext()
@@ -844,7 +844,11 @@ class MachineCom(object):
self._callback.on_comm_force_disconnect()
else:
for hook in self._printer_action_hooks:
self._printer_action_hooks[hook](self, line, action_command)
try:
self._printer_action_hooks[hook](self, line, action_command)
except:
self._logger.exception("Error while calling hook {} with action command {}".format(self._printer_action_hooks[hook], action_command))
continue
else:
continue
@@ -1181,7 +1185,7 @@ class MachineCom(object):
def _onConnected(self):
self._serial.timeout = settings().getFloat(["serial", "timeout", "communication"])
self._temperature_timer = RepeatedTimer(lambda: get_interval("temperature"), self._poll_temperature, run_first=True)
self._temperature_timer = RepeatedTimer(lambda: get_interval("temperature", default_value=4.0), self._poll_temperature, run_first=True)
self._temperature_timer.start()
self._changeState(self.STATE_OPERATIONAL)
@@ -1638,11 +1642,13 @@ class MachineCom(object):
try:
self._serial.write(cmd + '\n')
except:
self._log("Unexpected error while writing serial port: %s" % (get_exception_string()))
self._logger.exception("Unexpected error while writing to serial port")
self._log("Unexpected error while writing to serial port: %s" % (get_exception_string()))
self._errorValue = get_exception_string()
self.close(True)
except:
self._log("Unexpected error while writing serial port: %s" % (get_exception_string()))
self._logger.exception("Unexpected error while writing to serial port")
self._log("Unexpected error while writing to serial port: %s" % (get_exception_string()))
self._errorValue = get_exception_string()
self.close(True)
@@ -1997,11 +2003,15 @@ def get_new_timeout(type):
return now + get_interval(type)
def get_interval(type):
def get_interval(type, default_value=0.0):
if type not in default_settings["serial"]["timeout"]:
return 0
return default_value
else:
return settings().getFloat(["serial", "timeout", type])
value = settings().getFloat(["serial", "timeout", type])
if not value:
return default_value
else:
return value
_temp_command_regex = re.compile("^M(?P<command>104|109|140|190)(\s+T(?P<tool>\d+)|\s+S(?P<temperature>[-+]?\d*\.?\d*))+")
+7 -4
View File
@@ -11,6 +11,9 @@ import sys
import logging
from octoprint.util import to_unicode
class UnknownPip(Exception):
pass
@@ -65,11 +68,10 @@ class PipCaller(object):
command = [self._command] + list(args)
joined_command = " ".join(command)
self._logger.debug(u"Calling: {}".format(joined_command))
self.on_log_call(joined_command)
p = sarge.run(joined_command, shell=True, async=True, stdout=sarge.Capture(), stderr=sarge.Capture())
p = sarge.run(command, async=True, stdout=sarge.Capture(), stderr=sarge.Capture())
p.wait_events()
all_stdout = []
@@ -78,11 +80,13 @@ class PipCaller(object):
while p.returncode is None:
line = p.stderr.readline(timeout=0.5)
if line:
line = to_unicode(line, errors="replace")
self._log_stderr(line)
all_stderr.append(line)
line = p.stdout.readline(timeout=0.5)
if line:
line = to_unicode(line, errors="replace")
self._log_stdout(line)
all_stdout.append(line)
@@ -140,8 +144,7 @@ class PipCaller(object):
if pip_command is not None:
self._logger.debug("Found pip at {}, going to figure out its version".format(pip_command))
command = [pip_command, "--version"]
p = sarge.run(" ".join(command), shell=True, stdout=sarge.Capture(), stderr=sarge.Capture())
p = sarge.run([pip_command, "--version"], stdout=sarge.Capture(), stderr=sarge.Capture())
if p.returncode != 0:
self._logger.warn("Error while trying to run pip --version: {}".format(p.stderr.text))
+5 -1
View File
@@ -439,7 +439,7 @@ def get_babel_commandclasses(pot_file=None,
def create_plugin_setup_parameters(identifier="todo", name="TODO", version="0.1", description="TODO", author="TODO",
mail="todo@example.com", url="TODO", license="AGPLv3", source_folder=".", additional_data=None,
additional_packages=None, ignored_packages=None, requires=None, extra_requires=None,
cmdclass=None, eggs=None, package=None):
cmdclass=None, eggs=None, package=None, dependency_links=None):
import pkg_resources
if package is None:
@@ -454,6 +454,9 @@ def create_plugin_setup_parameters(identifier="todo", name="TODO", version="0.1"
if ignored_packages is None:
ignored_packages = list()
if dependency_links is None:
dependency_links = list()
if requires is None:
requires = ["OctoPrint"]
if not isinstance(requires, list):
@@ -519,6 +522,7 @@ def create_plugin_setup_parameters(identifier="todo", name="TODO", version="0.1"
install_requires=requires,
extras_require=extra_requires,
dependency_links=dependency_links,
# Hook the plugin into the "octoprint.plugin" entry point, mapping the plugin_identifier to the plugin_package.
# That way OctoPrint will be able to find the plugin and load it.
Binary file not shown.
File diff suppressed because it is too large. Load diff
+109 -100
View File
@@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: OctoPrint 1.2.0-rc3-2-g33ea9c3-dirty\n"
"Project-Id-Version: OctoPrint 1.2.3-dev-17-g6f7b941\n"
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
"POT-Creation-Date: 2015-06-21 17:58+0200\n"
"POT-Creation-Date: 2015-07-07 18:58+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"
@@ -17,6 +17,10 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 1.3\n"
#: src/octoprint/plugins/cura/__init__.py:43
msgid "CuraEngine"
msgstr ""
#: src/octoprint/plugins/cura/templates/cura_settings.jinja2:1
#: src/octoprint/templates/tabs/control.jinja2:98
msgid "General"
@@ -128,251 +132,251 @@ msgstr ""
msgid "Confirm"
msgstr ""
#: src/octoprint/plugins/pluginmanager/__init__.py:79
#: src/octoprint/plugins/pluginmanager/__init__.py:104
msgid "Plugin Manager"
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:132
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:275
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:130
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:270
msgid "Installing plugin..."
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:132
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:130
msgid "Installing plugin from uploaded archive..."
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:147
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:223
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:300
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:330
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:544
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:574
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:591
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:608
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:142
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:222
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:295
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:325
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:539
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:569
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:586
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:603
msgid "Something went wrong"
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:148
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:224
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:301
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:331
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:143
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:223
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:296
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:326
msgid "Please consult octoprint.log for details"
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:277
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:272
#, python-format
msgid "Installing plugin \"%(name)s\" from %(url)s..."
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:279
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:274
#, python-format
msgid "Installing plugin from %(url)s..."
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:282
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:277
msgid "Reinstalling plugin..."
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:283
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:278
#, python-format
msgid "Reinstalling plugin \"%(name)s\" from %(url)s..."
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:321
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:316
msgid "Uninstalling plugin..."
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:321
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:316
#, python-format
msgid "Uninstalling plugin \"%(name)s\""
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:356
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:351
msgid "Reinstall"
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:356
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:351
#: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:130
#: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:146
msgid "Install"
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:356
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:351
msgid "Incompatible"
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:374
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:369
#: src/octoprint/templates/overlays/reloadui.jinja2:9
msgid "Reload now"
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:443
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:438
msgid "Done!"
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:463
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:458
msgid "Enable Plugin"
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:463
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:458
msgid "Disable Plugin"
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:528
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:523
msgid "Plugin installed"
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:529
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:524
msgid ""
"A plugin was installed successfully, however it was impossible to detect "
"which one. Please Restart OctoPrint to make sure everything will be "
"registered properly"
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:533
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:528
#, python-format
msgid "Plugin \"%(name)s\" reinstalled"
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:534
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:529
msgid "The plugin was reinstalled successfully"
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:535
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:530
msgid ""
"The plugin was reinstalled successfully, however a restart of OctoPrint "
"is needed for that to take effect."
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:536
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:531
msgid ""
"The plugin was reinstalled successfully, however a reload of the page is "
"needed for that to take effect."
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:538
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:533
#, python-format
msgid "Plugin \"%(name)s\" installed"
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:539
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:534
msgid "The plugin was installed successfully"
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:540
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:535
msgid ""
"The plugin was installed successfully, however a restart of OctoPrint is "
"needed for that to take effect."
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:541
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:536
msgid ""
"The plugin was installed successfully, however a reload of the page is "
"needed for that to take effect."
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:552
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:547
#, python-format
msgid "Reinstalling the plugin from URL \"%(url)s\" failed: %(reason)s"
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:554
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:549
#, python-format
msgid "Installing the plugin from URL \"%(url)s\" failed: %(reason)s"
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:558
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:553
#, python-format
msgid ""
"Reinstalling the plugin from URL \"%(url)s\" failed, please see the log "
"for details."
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:560
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:555
#, python-format
msgid ""
"Installing the plugin from URL \"%(url)s\" failed, please see the log for"
" details."
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:569
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:564
#, python-format
msgid "Plugin \"%(name)s\" uninstalled"
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:570
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:565
msgid "The plugin was uninstalled successfully"
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:571
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:566
msgid ""
"The plugin was uninstalled successfully, however a restart of OctoPrint "
"is needed for that to take effect."
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:572
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:567
msgid ""
"The plugin was uninstalled successfully, however a reload of the page is "
"needed for that to take effect."
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:576
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:571
#, python-format
msgid "Uninstalling the plugin failed: %(reason)s"
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:578
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:573
msgid "Uninstalling the plugin failed, please see the log for details."
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:586
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:581
#, python-format
msgid "Plugin \"%(name)s\" enabled"
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:587
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:582
msgid "The plugin was enabled successfully."
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:588
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:583
msgid ""
"The plugin was enabled successfully, however a restart of OctoPrint is "
"needed for that to take effect."
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:589
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:584
msgid ""
"The plugin was enabled successfully, however a reload of the page is "
"needed for that to take effect."
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:593
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:610
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:588
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:605
#, python-format
msgid "Toggling the plugin failed: %(reason)s"
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:595
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:612
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:590
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:607
msgid "Toggling the plugin failed, please see the log for details."
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:603
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:598
#, python-format
msgid "Plugin \"%(name)s\" disabled"
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:604
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:599
msgid "The plugin was disabled successfully."
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:605
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:600
msgid ""
"The plugin was disabled successfully, however a restart of OctoPrint is "
"needed for that to take effect."
msgstr ""
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:606
#: src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js:601
msgid ""
"The plugin was disabled successfully, however a reload of the page is "
"needed for that to take effect."
@@ -407,7 +411,7 @@ msgid "Get More..."
msgstr ""
#: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:59
#: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:167
#: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:152
#: src/octoprint/templates/dialogs/settings/appearance.jinja2:96
msgid "Close"
msgstr ""
@@ -489,17 +493,11 @@ msgid ""
"\".tar.gz\", \".tgz\" or \".tar\""
msgstr ""
#: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:152
#: src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2:44
#: src/octoprint/templates/tabs/terminal.jinja2:25
msgid "Advanced options"
#: src/octoprint/plugins/softwareupdate/__init__.py:315
msgid "Software Update"
msgstr ""
#: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:158
msgid "Use <code>--process-dependency-links</code> with <code>pip install</code>"
msgstr ""
#: src/octoprint/plugins/softwareupdate/__init__.py:499
#: src/octoprint/plugins/softwareupdate/__init__.py:589
#: src/octoprint/server/views.py:146
#: src/octoprint/static/js/app/viewmodels/appearance.js:11
#: src/octoprint/static/js/app/viewmodels/appearance.js:13
@@ -528,8 +526,8 @@ msgstr ""
#: src/octoprint/plugins/softwareupdate/static/js/softwareupdate.js:147
msgid ""
"You can make this message display again via \"Settings\" > "
"\"SoftwareUpdate\" > \"Check for update now\""
"You can make this message display again via \"Settings\" > \"Software "
"Update\" > \"Check for update now\""
msgstr ""
#: src/octoprint/plugins/softwareupdate/static/js/softwareupdate.js:151
@@ -674,6 +672,11 @@ msgstr ""
msgid "Check for update now"
msgstr ""
#: src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2:44
#: src/octoprint/templates/tabs/terminal.jinja2:25
msgid "Advanced options"
msgstr ""
#: src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2:46
msgid "Force check for update (overrides cache used for update checks)"
msgstr ""
@@ -806,14 +809,14 @@ msgstr ""
msgid "Interface"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:65
#: src/octoprint/static/js/app/dataupdater.js:99
#: src/octoprint/static/js/app/dataupdater.js:66
#: src/octoprint/static/js/app/dataupdater.js:100
#: src/octoprint/static/js/app/helpers.js:436
#: src/octoprint/templates/overlays/offline.jinja2:6
msgid "Server is offline"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:66
#: src/octoprint/static/js/app/dataupdater.js:67
msgid ""
"The server appears to be offline, at least I'm not getting any response "
"from it. I'll try to reconnect automatically <strong>over the next couple"
@@ -821,79 +824,79 @@ msgid ""
"anytime using the button below."
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:100
#: src/octoprint/static/js/app/dataupdater.js:101
msgid ""
"The server appears to be offline, at least I'm not getting any response "
"from it. I <strong>could not reconnect automatically</strong>, but you "
"may try a manual reconnect using the button below."
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:166
#: src/octoprint/static/js/app/dataupdater.js:194
#: src/octoprint/static/js/app/dataupdater.js:168
#: src/octoprint/static/js/app/dataupdater.js:196
#, python-format
msgid "Slicing ... (%(percentage)d%%)"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:183
#: src/octoprint/static/js/app/dataupdater.js:185
msgid "Rendering timelapse"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:183
#: src/octoprint/static/js/app/dataupdater.js:185
#, python-format
msgid "Now rendering timelapse %(movie_basename)s"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:185
#: src/octoprint/static/js/app/dataupdater.js:187
msgid "Timelapse ready"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:185
#: src/octoprint/static/js/app/dataupdater.js:187
#, python-format
msgid "New timelapse %(movie_basename)s is done rendering."
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:187
#: src/octoprint/static/js/app/dataupdater.js:189
#, python-format
msgid ""
"Rendering of timelapse %(movie_basename)s failed with return code "
"%(returncode)s"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:189
#: src/octoprint/static/js/app/dataupdater.js:191
msgid "Rendering failed"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:196
#: src/octoprint/static/js/app/dataupdater.js:198
msgid "Slicing ..."
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:202
#: src/octoprint/static/js/app/dataupdater.js:204
msgid "Slicing done"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:202
#: src/octoprint/static/js/app/dataupdater.js:204
#, python-format
msgid "Sliced %(stl)s to %(gcode)s, took %(time).2f seconds"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:212
#: src/octoprint/static/js/app/dataupdater.js:214
#, python-format
msgid "Could not slice %(stl)s to %(gcode)s: %(reason)s"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:213
#: src/octoprint/static/js/app/dataupdater.js:215
msgid "Slicing failed"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:217
#: src/octoprint/static/js/app/dataupdater.js:219
msgid "Streaming ..."
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:223
#: src/octoprint/static/js/app/dataupdater.js:225
msgid "Streaming done"
msgstr ""
#: src/octoprint/static/js/app/dataupdater.js:224
#: src/octoprint/static/js/app/dataupdater.js:226
#, python-format
msgid "Streamed %(local)s to %(remote)s on SD, took %(time).2f seconds"
msgstr ""
@@ -999,18 +1002,18 @@ msgstr ""
msgid "Last Print Time"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/files.js:388
#: src/octoprint/static/js/app/viewmodels/files.js:392
msgid ""
"Could not upload the file. Make sure that it is a GCODE file and has the "
"extension \".gcode\" or \".gco\" or that it is an STL file with the "
"extension \".stl\"."
msgstr ""
#: src/octoprint/static/js/app/viewmodels/files.js:404
#: src/octoprint/static/js/app/viewmodels/files.js:408
msgid "Uploading ..."
msgstr ""
#: src/octoprint/static/js/app/viewmodels/files.js:407
#: src/octoprint/static/js/app/viewmodels/files.js:411
msgid "Saving ..."
msgstr ""
@@ -1114,12 +1117,12 @@ msgstr ""
msgid "The command \"%(command)s\" executed successfully"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/navigation.js:31
#: src/octoprint/static/js/app/viewmodels/navigation.js:32
#, python-format
msgid "The command \"%(command)s\" could not be executed."
msgstr ""
#: src/octoprint/static/js/app/viewmodels/navigation.js:33
#: src/octoprint/static/js/app/viewmodels/navigation.js:34
msgid "Error"
msgstr ""
@@ -1753,6 +1756,12 @@ msgstr ""
msgid "Watched Folder"
msgstr ""
#: src/octoprint/templates/dialogs/settings/folders.jinja2:35
msgid ""
"Actively poll the watched folder. Check this if files in your watched "
"folder aren't automatically added otherwise."
msgstr ""
#: src/octoprint/templates/dialogs/settings/gcodescripts.jinja2:3
msgid "Before print job starts"
msgstr ""