Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6232a04e52 | ||
|
|
edfa786514 | ||
|
|
b818042fc5 | ||
|
|
f57afca557 | ||
|
|
230740708b | ||
|
|
d99af420ac | ||
|
|
73c2baa39e | ||
|
|
054df68741 | ||
|
|
f7756698e9 | ||
|
|
453ef0cb97 | ||
|
|
5015422086 | ||
|
|
2d85d8acf8 | ||
|
|
2af589a823 | ||
|
|
20c55f4d3d | ||
|
|
b7fdc82d30 | ||
|
|
770ebf2cf9 | ||
|
|
a75c641c18 | ||
|
|
38c09153ac | ||
|
|
e30e18e431 | ||
|
|
249d19f55b | ||
|
|
2e043ecf5b | ||
|
|
831edf234d | ||
|
|
b42c753d3f | ||
|
|
924cd5cb4c |
No files matched your search
+5
-5
@@ -24,13 +24,13 @@ maintenance 1.4.1 2da7aa358d950b4567aaab8f18d6b5779193e077 pep440-dev
|
||||
fix/.* 1.4.1 2da7aa358d950b4567aaab8f18d6b5779193e077 pep440-dev
|
||||
improve/.* 1.4.1 2da7aa358d950b4567aaab8f18d6b5779193e077 pep440-dev
|
||||
|
||||
# staging/maintenance is currently the branch for preparation of 1.4.0rc5
|
||||
# staging/maintenance is currently the branch for preparation of 1.4.0rc6
|
||||
# so is regressionfix/...
|
||||
staging/maintenance 1.4.0rc5 7b2762c5904595111b77f6e5dda283663b6e325f pep440-dev
|
||||
regressionfix/.* 1.4.0rc5 7b2762c5904595111b77f6e5dda283663b6e325f pep440-dev
|
||||
staging/maintenance 1.4.0rc6 73f7c4d8a11a7aea7b0ece474d3bf37ad53c65d4 pep440-dev
|
||||
regressionfix/.* 1.4.0rc6 73f7c4d8a11a7aea7b0ece474d3bf37ad53c65d4 pep440-dev
|
||||
|
||||
# staging/devel is currently the branch for preparation of 1.4.0rc5
|
||||
staging/devel 1.4.0rc5 7b2762c5904595111b77f6e5dda283663b6e325f pep440-dev
|
||||
# staging/devel is currently inactive (but has the 1.4.0rc6 namespace)
|
||||
staging/devel 1.4.0rc6 73f7c4d8a11a7aea7b0ece474d3bf37ad53c65d4 pep440-dev
|
||||
|
||||
# every other branch is a development branch and thus gets resolved to 1.5.0-dev for now
|
||||
.* 1.5.0 2da7aa358d950b4567aaab8f18d6b5779193e077 pep440-dev
|
||||
+4
-3
@@ -6,6 +6,7 @@ thanks to everyone who contributed!
|
||||
|
||||
## Patreon Patrons
|
||||
|
||||
* Alex Krilov
|
||||
* Andrew Moorby
|
||||
* Arnljot Arntsen
|
||||
* BigTreeTech
|
||||
@@ -23,6 +24,7 @@ thanks to everyone who contributed!
|
||||
* GadgetAngel
|
||||
* George Robles
|
||||
* Greg Holloway
|
||||
* Hog Duske
|
||||
* Hugh Blemings
|
||||
* jean-claude migneault
|
||||
* Jeff Renfer
|
||||
@@ -54,12 +56,11 @@ thanks to everyone who contributed!
|
||||
* Robert Gusek
|
||||
* Ronald Griehsler
|
||||
* Sacha Telgenhof
|
||||
* sghnsk
|
||||
* Shawn Lewis
|
||||
* Simon Hallam
|
||||
* Stefan Krister
|
||||
* Steve Thompson
|
||||
* Sven Mueller
|
||||
* Trent Shumay
|
||||
* Ulrich Kempken
|
||||
|
||||
and 1746 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel) or via [Github Sponsors](https://github.com/users/foosel/sponsorship)!
|
||||
and 1741 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel) or via [Github Sponsors](https://github.com/users/foosel/sponsorship)!
|
||||
@@ -29,6 +29,9 @@ following message types are currently available for usage by 3rd party clients:
|
||||
|
||||
* ``connected``: Initial connection information, sent only right after establishing the socket connection. See
|
||||
:ref:`the payload data model <sec-api-push-datamodel-connected>`.
|
||||
* ``reauthRequired``: A reauthentication of the current login session is required. The ``reason`` parameter in the
|
||||
payload defines whether a full active login is necessary (values ``logout`` and ``removed``) or a simple passive
|
||||
login will suffice (all other values).
|
||||
* ``current``: Rate limited general state update, payload contains information about the printer's state, job progress,
|
||||
accumulated temperature points and log lines since last update. OctoPrint will send these updates when new information
|
||||
is available, but not more often than twice per second in order to not flood the client with messages (e.g.
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
.. _sec-bundledplugins-forcelogin:
|
||||
|
||||
ForceLogin Plugin
|
||||
=================
|
||||
|
||||
The ForceLogin Plugin comes bundled with OctoPrint (starting with version 1.3.10). It removes the anonymous
|
||||
read-only access that up until 1.3.10 was standard when accessing OctoPrint instances without being logged in and
|
||||
instead forces users to log in if they want to get any kind of information from OctoPrint.
|
||||
|
||||
.. _fig-bundledplugins-forcelogin:
|
||||
.. figure:: ../images/bundledplugins-forcelogin-dialog.png
|
||||
:align: center
|
||||
:alt: Forced login dialog
|
||||
|
||||
OctoPrint's new forced login dialog.
|
||||
|
||||
.. warning::
|
||||
|
||||
Keep in mind that **OctoPrint does not manage your webcam**, it merely embeds it. If you have a webcam,
|
||||
it will still be accessible to users who are not logged in under its (guessable) URL. If you need to restrict
|
||||
access to your webcam, you'll need to find a way to do so directly on the webcam server which - again -
|
||||
is not OctoPrint itself.
|
||||
|
||||
.. note::
|
||||
|
||||
If you want back the old behaviour of allowing anonymous read-only access to your OctoPrint instance, disable
|
||||
the ForceLogin Plugin in OctoPrint's plugin manager.
|
||||
|
||||
.. _sec-bundledplugins-forcelogin-sourcecode:
|
||||
|
||||
Source code
|
||||
-----------
|
||||
|
||||
The source of the ForceLogin plugin is bundled with OctoPrint and can be found in
|
||||
its source repository under ``src/octoprint/plugins/forcelogin``.
|
||||
@@ -14,8 +14,8 @@ Bundled Plugins
|
||||
backup.rst
|
||||
discovery.rst
|
||||
errortracking.rst
|
||||
forcelogin.rst
|
||||
logging.rst
|
||||
loginui.rst
|
||||
pluginmanager.rst
|
||||
printer_safety_check.rst
|
||||
softwareupdate.rst
|
||||
@@ -0,0 +1,66 @@
|
||||
.. _sec-bundledplugins-loginui:
|
||||
|
||||
Login UI
|
||||
========
|
||||
|
||||
The Login UI plugin has been bundled since OctoPrint 1.4.0 and replaces the ForceLogin plugin bundled with prior
|
||||
versions since 1.3.10.
|
||||
|
||||
If anonymous read-only access is disabled in the :ref:`Access Control settings <sec-features-access_control>`
|
||||
it provides a stand alone login dialog that gets displayed instead of OctoPrint's regular UI.
|
||||
|
||||
.. _fig-bundledplugins-loginui:
|
||||
.. figure:: ../images/bundledplugins-loginui-dialog.png
|
||||
:align: center
|
||||
:alt: Login dialog
|
||||
|
||||
OctoPrint's login dialog.
|
||||
|
||||
The plugin allows theming of the dialog through :ref:`a plugin hook <sec-bundledplugins-loginui-hooks-theming>`.
|
||||
|
||||
.. warning::
|
||||
|
||||
Since the plugin is absolutely required for the case of anonymous read-only access because in this case the
|
||||
UI itself could not even fully initialize due to a lack of permissions required to do so, it is hidden in the plugin
|
||||
manager and cannot be disabled through that.
|
||||
|
||||
.. _sec-bundledplugins-loginui-hooks:
|
||||
|
||||
Hooks
|
||||
-----
|
||||
|
||||
.. _sec-bundledplugins-loginui-hooks-theming:
|
||||
|
||||
octoprint.plugin.loginui.theming
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. py:function:: loginui_theming_hook(*args, **kwargs)
|
||||
|
||||
Support theming of the login dialog, just in case the core UI is themed as well. Use to return a list of additional
|
||||
CSS file URLs to inject into the login dialog HTML.
|
||||
|
||||
Example usage by a plugin:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
def loginui_theming():
|
||||
from flask import url_for
|
||||
return [url_for("plugin.myplugin.static", filename="css/loginui_theme.css")]
|
||||
|
||||
__plugin_hooks__ = {
|
||||
"octoprint.plugin.loginui.theming": loginui_theming
|
||||
}
|
||||
|
||||
Only a list of ready-made URLs to CSS files is supported, neither LESS nor JS. Best use
|
||||
url_for like in the example above to be prepared for any configured prefix URLs.
|
||||
|
||||
:return: A list of additional CSS URLs to inject into the login dialog.
|
||||
:rtype: A list of strings.
|
||||
|
||||
.. _sec-bundledplugins-loginui-sourcecode:
|
||||
|
||||
Source Code
|
||||
-----------
|
||||
|
||||
The source of the Anonymous Usage Tracking plugin is bundled with OctoPrint and can be
|
||||
found in its source repository under ``src/octoprint/plugins/loginui``.
|
||||
@@ -3,8 +3,20 @@
|
||||
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:
|
||||
OctoPrint's bundled access control feature allows granular permission control
|
||||
over which users or user groups are allowed to access which parts of OctoPrint.
|
||||
|
||||
The default permissions will deny any kind of access to anonymous (not logged in)
|
||||
users out of the box.
|
||||
|
||||
.. warning::
|
||||
|
||||
Please note that OctoPrint does *not* control the webcam and merely embeds it, and
|
||||
thus also cannot limit access to it. If an anonymous user correctly guesses the
|
||||
webcam URL, they will thus be able to see it.
|
||||
|
||||
If read-only access for anonymous users is enabled, anonymous users will have
|
||||
read-only access to the following parts of the UI:
|
||||
|
||||
* printer state
|
||||
* available gcode files and stats (upload is disabled)
|
||||
@@ -16,8 +28,8 @@ the read-only parts of the UI which are the following:
|
||||
* 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.
|
||||
Logged in users without admin flag will be allowed to access 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
|
||||
@@ -39,6 +51,29 @@ internet or other untrusted networks!).
|
||||
publicly reachable by everyone with an internet connection, even with access
|
||||
control enabled.
|
||||
|
||||
.. _sec-features-access_control-hooks:
|
||||
|
||||
Available Extension Hooks
|
||||
-------------------------
|
||||
|
||||
There are two hooks for plugins to utilize in order to
|
||||
add new configurable permissions into the system and/or adjust the styling of the
|
||||
login dialog.
|
||||
|
||||
.. _sec-features-access_control-hooks-permissions:
|
||||
|
||||
octoprint.access.permissions
|
||||
............................
|
||||
|
||||
See :ref:`here <sec-plugins-hook-permissions>`.
|
||||
|
||||
.. _sec-features-access_control-hooks-loginui:
|
||||
|
||||
octoprint.plugin.loginui.theming
|
||||
................................
|
||||
|
||||
See :ref:`here <sec-bundledplugins-loginui-hooks-theming>`.
|
||||
|
||||
.. _sec-features-access_control-rerunning_wizard:
|
||||
|
||||
Rerunning the wizard
|
||||
|
||||
File renamed without changes.
|
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
@@ -41,6 +41,9 @@ development environment::
|
||||
|
||||
[...]
|
||||
|
||||
Setting up a local development environment will most likely be less painful than developing directly
|
||||
on the Pi. So do yourself the favor and do that instead where possible.
|
||||
|
||||
.. important::
|
||||
|
||||
This tutorial assumes you are running OctoPrint 1.3.0 and up. Please make sure your version of
|
||||
|
||||
+24
-8
@@ -1102,6 +1102,27 @@ octoprint.filemanager.preprocessor
|
||||
:return: The `file_object` as passed in or None, or a replaced version to use instead for further processing.
|
||||
:rtype: AbstractFileWrapper or None
|
||||
|
||||
.. _sec-plugins-hook-plugin-loginui-theming:
|
||||
|
||||
octoprint.plugin.loginui.theming
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
See :ref:`here <sec-bundledplugins-loginui-hooks-theming>`.
|
||||
|
||||
.. _sec-plugins-hook-plugin-pluginmanager-reconnect:
|
||||
|
||||
octoprint.plugin.pluginmanager.reconnect_hooks
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
See :ref:`here <sec-bundledplugins-pluginmanager-hooks-reconnect_hooks>`.
|
||||
|
||||
.. _sec-plugins-hook-plugin-softwareupdate-check_config:
|
||||
|
||||
octoprint.plugin.softwareupdate.check_config
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
See :ref:`here <sec-bundledplugins-softwareupdate-hooks-check_config>`.
|
||||
|
||||
.. _sec-plugins-hook-printer-factory:
|
||||
|
||||
octoprint.printer.factory
|
||||
@@ -1273,8 +1294,7 @@ octoprint.server.api.after_request
|
||||
|
||||
Allows adding additional after-request-handlers to API endpoints defined by OctoPrint itself and installed plugins.
|
||||
|
||||
Your plugin might need this to further restrict access to API methods. See the bundled "Force Login" plugin for a
|
||||
usage example.
|
||||
Your plugin might need this to further restrict access to API methods.
|
||||
|
||||
.. important::
|
||||
|
||||
@@ -1289,8 +1309,7 @@ octoprint.server.api.before_request
|
||||
|
||||
Allows adding additional before-request-handlers to API endpoints defined by OctoPrint itself and installed plugins.
|
||||
|
||||
Your plugin might need this to further restrict access to API methods. See the bundled "Force Login" plugin for a
|
||||
usage example.
|
||||
Your plugin might need this to further restrict access to API methods.
|
||||
|
||||
.. important::
|
||||
|
||||
@@ -1305,8 +1324,7 @@ octoprint.server.http.access_validator
|
||||
|
||||
Allows adding additional access validators to the default tornado routers.
|
||||
|
||||
Your plugin might need to this to restrict acccess to downloads and webcam snapshots further. See the bundled
|
||||
"Force Login" plugin for a usage example.
|
||||
Your plugin might need to this to restrict acccess to downloads and webcam snapshots further.
|
||||
|
||||
.. important::
|
||||
|
||||
@@ -1430,8 +1448,6 @@ octoprint.server.sockjs.authed
|
||||
|
||||
Allows plugins to be notified that a user got authenticated or deauthenticated on the socket (e.g. due to logout).
|
||||
|
||||
See the bundled :ref:`Forcelogin Plugin <sec-bundledplugins-forcelogin>` for an example on how to utilize this.
|
||||
|
||||
:param object socket: the socket object which is about to be registered
|
||||
:param object user: the user that got authenticated on the socket, or None if the user got deauthenticated
|
||||
|
||||
|
||||
@@ -16,3 +16,4 @@ Developing Plugins
|
||||
viewmodels.rst
|
||||
gettingstarted.rst
|
||||
distributing.rst
|
||||
python3_migration.rst
|
||||
@@ -0,0 +1,349 @@
|
||||
.. _sec-plugins-python3:
|
||||
|
||||
Migrating to Python 3
|
||||
=====================
|
||||
|
||||
Python 2 is now EOL as of January 1st 2020. With the release of 1.4.0 OctoPrint will be compatible to both Python 2 and
|
||||
Python 3.
|
||||
|
||||
However, the same doesn't automatically hold true for all of the third party plugins for OctoPrint out there - it will
|
||||
fall to their authors to ensure compatibility to both Python versions.
|
||||
|
||||
This guide is supposed to help plugin authors in making sure their plugins run under Python 2 as well as Python 3,
|
||||
which for now is the goal for OctoPrint's ecosystem, as we'll have to live with existing legacy Python 2 installations
|
||||
for a while to come (the plan is to stay Python 2 compatible until roughly a year after the release of 1.4.0).
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
|
||||
.. _sec-plugins-python3-venv:
|
||||
|
||||
How to get a Python 3 virtual environment with OctoPrint
|
||||
--------------------------------------------------------
|
||||
|
||||
In order to test your plugins for Python 3 compatibility and also to allow for ongoing maintenance against both Python
|
||||
versions, you should create a Python 3 virtual environment next to your Python 2 one. You can then quickly switch between
|
||||
Python 2 and Python 3 simply by ``activate``-ing whichever one you need.
|
||||
|
||||
You can create a Python 3 virtualenv next to your (existing) Python 2 virtualenv and then just activate which one you
|
||||
currently want to use.
|
||||
|
||||
After installing Python 3 on your development system it's as easy as supplying ``--python=/path/to/python3executable``
|
||||
to ``virtualenv``, e.g.:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
virtualenv --python=/usr/bin/python3 venv3
|
||||
|
||||
That will have the virtualenv be created based on Python 3, regardless of whether it's currently running under Python
|
||||
2 or 3. The same works for Python 2 btw:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
virtualenv --python=/usr/bin/python2 venv2
|
||||
|
||||
After creating the virtual environment, make sure to activate & install OctoPrint into it:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
source venv3/bin/activate
|
||||
pip install "OctoPrint>=1.4.0rc1"
|
||||
|
||||
Then create an editable install of your plugin, start the server and start testing:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
pip install -e path/to/your/plugin
|
||||
octoprint serve --debug
|
||||
|
||||
.. note::
|
||||
|
||||
On Windows that will probably look something like this instead:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
virtualenv --python=C:/Python37/python.exe venv37
|
||||
venv3/Script/activate.bat
|
||||
pip install "OctoPrint>=1.4.0rc1"
|
||||
pip install -e path/to/your/plugin
|
||||
octoprint serve --debug
|
||||
|
||||
.. note::
|
||||
|
||||
If you want to migrate your existing OctoPrint install *on OctoPi* to Python 3, I suggest to first make a
|
||||
:ref:`backup <sec-bundledplugins-backup>`, then move the existing venv ``/home/pi/oprint`` out of the way and
|
||||
create a new one based on Python 3 (which should already be present on current OctoPi images):
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
mv ~/oprint ~/oprint.py2
|
||||
virtualenv --python=/usr/bin/python3 oprint
|
||||
source ~/oprint/bin/activate
|
||||
pip install "OctoPrint>=1.4.0rc1"
|
||||
sudo service octoprint restart
|
||||
|
||||
.. _sec-plugins-python3-markup:
|
||||
|
||||
Telling OctoPrint your plugin is Python 3 ready
|
||||
-----------------------------------------------
|
||||
|
||||
In order for OctoPrint to even load your plugin when it's running under Python 3, it first needs to know your plugin is
|
||||
compatible to a Python 3 environment. By default OctoPrint will assume your plugin isn't and refuse to load it when
|
||||
running under Python 3 itself.
|
||||
|
||||
To tell OctoPrint about this, all you need is to set the ``__plugin_pythoncompat__`` property in your plugins's ``__init__.py``
|
||||
accordingly, e.g.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
__plugin_pythoncompat__ = ">=2.7,<4"
|
||||
|
||||
This would tell OctoPrint that your plugin is compatible to all Python versions between 2.7 and 3.x. This should be
|
||||
your target compatibility range for now.
|
||||
|
||||
If at a later date you want to go all-in on Python 3 and mark your plugin as no longer supporting Python 2, tell
|
||||
OctoPrint about this as well:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
__plugin_pythoncompat__ = ">=3,<4"
|
||||
|
||||
.. note::
|
||||
|
||||
You can also tell OctoPrint to ignore the Python compatibility flags for a specific plugin via `config.yaml`:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
plugins:
|
||||
_forcedCompatible:
|
||||
- "myplugin"
|
||||
- "anotherplugin"
|
||||
|
||||
Note that this should only be used temporarily during testing and migration, or to mark an important plugin
|
||||
not under your own control that actually works fine under Python 3 out of the box as compatible while waiting
|
||||
until the plugin author has pushed an update including the needed flags. Do not just blindly mark third party
|
||||
plugins as compatible and then open support requests if that causes issues in your setup.
|
||||
|
||||
Once your plugin is ensured to be compatible and you've released a new version that includes the necessary compatibility
|
||||
flag and changes, is done you also need to mark up your plugin in the Official Plugin Repository (if it's registered
|
||||
therein) so that OctoPrint's built-in Plugin Manager will see that your plugin is compatible as well and allow users
|
||||
to install it through it. In order to do that, you need to add a new flag compatibility.python to the front matter in
|
||||
your plugin registration file and file a pull request for that. Adjust the markdown file so that it contains this:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
compatibility:
|
||||
python: ">=2.7,<3"
|
||||
|
||||
The value here follows the same mechanism as the ``__plugin_pythoncompat__`` property, so ``>=2.7,<3`` for 2 and 3
|
||||
support and ``>=3,<4`` for 3+ support.
|
||||
|
||||
.. warning::
|
||||
|
||||
Do **not** just mark your plugin as compatible without diligent testing that it actually does work as expected and
|
||||
without flooding ``octoprint.log`` with warnings and errors!
|
||||
|
||||
.. _sec-plugins-python3-pitfalls:
|
||||
|
||||
Common pitfalls during migration
|
||||
--------------------------------
|
||||
|
||||
Some of the changes in Python 3 compared to Python 2 are sadly backwards incompatible and usually cause a number of
|
||||
common issues in code written for Python 2 when run under Python 3. By now they are pretty well documented and there
|
||||
exist a number of helpful and comprehensive migration guides, three of which I want to mention here.
|
||||
|
||||
One is the official Python 3 porting guide `Porting Python 2 Code to Python 3 <https://docs.python.org/3/howto/pyporting.html>`__
|
||||
which sums up all the important changes and also gives hints on how best to go about running a project which supports
|
||||
both versions for now.
|
||||
|
||||
The second is the `Writing Python 2-3 compatible code <https://python-future.org/compatible_idioms.html>`__ cheat sheet
|
||||
from the Python-Future project, which is a comprehensive list of idioms that are compatible to both Python 2 and 3 and
|
||||
will make your code run under both, utilizing `future <https://python-future.org/>`__ and `six <https://six.readthedocs.io/>`__.
|
||||
I can strongly recommend this cheat sheet, it's what primarily guided me during the migration phase as well.
|
||||
|
||||
The third one is the free online book `Support Python 3: An in-depth guide <http://python3porting.com/toc.html>`__, and
|
||||
especially its chapter on `Common migration problems <http://python3porting.com/problems.html>`__ in which you'll find
|
||||
extensive descriptions of the most troublesome changes in Python 3 and how to overcome them. Please note that with
|
||||
regards to the contents of this book, we are aiming for the "Python 2 and Python 3 without conversion" strategy, so
|
||||
code that runs in both environments. Sadly this book is a bit outdated by now and still references some long-out versions
|
||||
as "upcoming", so with regards to compatible idioms to use, best stick to the Python-Future cheat sheet.
|
||||
|
||||
Looking at the issues encountered by some plugin authors and also my own experiences during the Python 3 migration of
|
||||
OctoPrint's code, the most common problems for these scenarios seem to be byte vs unicode issues, trouble with absolute
|
||||
imports, changes in integer division behaviour and the switch of map, filter and zip to return iterators instead of
|
||||
lists and causing issues in the following code due to that.
|
||||
|
||||
.. _sec-plugins-python3-pitfalls-strings:
|
||||
|
||||
Bytes vs unicode
|
||||
................
|
||||
|
||||
One of if not the most problematic change between Python 2 and 3 surely must be the change in string handling. Under
|
||||
Python 2 your basic string was a byte string, but it could also magically turn into a unicode string depending on what
|
||||
you wrote into it. That did cause some confusion, especially in APIs, and caused quite a mess, which is why the decision
|
||||
was made to go for distinct text and binary types instead, and making the string literal always be a (unicode) text.
|
||||
|
||||
.. note::
|
||||
|
||||
Please note that these changes in string handling also affect several Python APIs that operate on files and streams
|
||||
and thus might also affect parts of OctoPrint's plugin interface that inherit from these APIs. Currently only one such
|
||||
case has been reported, as OctoPrint's :py:class:`~octoprint.filemanager.util.LineProcessorStream` will return bytes
|
||||
instead of str on its ``process_line`` function under Python 3 - so here's a heads-up if your plugin happens to utilize that.
|
||||
|
||||
Obviously, that will lead to issues in code using "just strings" when run under Python 2 vs 3. The first step to solve
|
||||
these problems would be to make your scripts behave the same under Python 2 and 3 by putting this right at the top of
|
||||
all your plugin's python files:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
That will make your files behave as if they were running under Python 3, even when run under Python 2, and your string
|
||||
literals will now be the text data type, which - annoyingly - is a different one under Python 2 vs 3, ``unicode`` vs ``str`` to
|
||||
be exact. Heads-up here - under Python 2 there's also a ``str`` type, but that one is for binary data. Yes, I know, this
|
||||
ain't fun.
|
||||
|
||||
In any case, once you've done this, make sure that everything in your code that should be text is text (``unicode`` under
|
||||
Python 2, ``str`` under Python 3), and everything that should be binary is binary (``str`` under Python 2, ``bytes`` under Python 3).
|
||||
A good rule of thumb is that you usually want to use text as much as possible within your application and only convert
|
||||
to/from bytes at the outskirts, e.g. when writing to a file, a socket or something else machine like. Note that you do
|
||||
NOT need to convert to bytes when implementing API endpoints that return JSON, as that should use text with unicode
|
||||
anyhow.
|
||||
|
||||
OctoPrint includes two utility methods you should use to ensure your strings enter/exit your code in the right format,
|
||||
under both Python versions: :py:func:`octoprint.util.to_bytes` and :py:func:`octoprint.util.to_unicode`. Use them to ensure the correct data
|
||||
types and to avoid weird conversion and encoding issues during runtime.
|
||||
|
||||
You can read more about this specific issue in the corresponding section of the
|
||||
`Python porting guide <https://docs.python.org/3/howto/pyporting.html#text-versus-binary-data>`__ and also in the
|
||||
`cheat sheet <https://python-future.org/compatible_idioms.html#strings-and-bytes>`__.
|
||||
|
||||
.. _sec-plugins-python3-pitfalls-imports:
|
||||
|
||||
Absolute imports
|
||||
................
|
||||
|
||||
Python 3 now defaults to absolute imports, meaning that trying to import a sub package with a
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import my_sub_package
|
||||
|
||||
will now fail with an error. You'll need to explicitly make the import a relative one:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from . import my_sub_package
|
||||
|
||||
To make your code behave the same in that regard unter both Python 2 and Python 3, you should add the corresponding
|
||||
future import:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from __future__ import absolute_imports
|
||||
|
||||
You can read more about this specific issue in the
|
||||
`cheat sheet <https://python-future.org/compatible_idioms.html#imports-relative-to-a-package>`__ and also in
|
||||
`the book <http://python3porting.com/problems.html#relative-import-problems>`__.
|
||||
|
||||
.. _sec-plugins-python3-pitfalls-intdiv:
|
||||
|
||||
Integer division
|
||||
................
|
||||
|
||||
When you divide two integers in Python 2 you'll get back an integer, rounded down. In Python 3 however you'll now get
|
||||
a float. That means you might have to revisit some places where you do integer divisions and might rely on the result
|
||||
to be an integer as well (e.g. when using a calculation result as an index in an array or something like that).
|
||||
|
||||
Yet again there's a future-import to apply to your files in order to at least have them behave the same in that regard
|
||||
under both Python 2 and Python 3:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from __future__ import division
|
||||
|
||||
You can read more about this specific issue in the `Python porting guide <https://docs.python.org/3/howto/pyporting.html#division>`__
|
||||
and in the `cheat sheet <https://python-future.org/compatible_idioms.html#division>`__.
|
||||
|
||||
.. _sec-plugins-python3-pitfalls-iterators:
|
||||
|
||||
Iterators instead of list from map, filter, zip
|
||||
...............................................
|
||||
|
||||
The built-in functions ``map``, ``filter`` and ``zip`` return a ``list`` with their result in Python 2. In Python 3 they have been
|
||||
switched to returning iterators. That can cause trouble with code handling the result (e.g. if you try to return it as
|
||||
part of a JSON response on an API endpoint).
|
||||
|
||||
The easiest way to solve this is to make sure to wrap any ``map``/``filter``/``zip`` calls into a ``list`` constructor if the result is
|
||||
to be used outside of the calling code (even though that comes with a small performance penalty under Python 2):
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
result1 = filter(lambda x: x is not None, my_collection)
|
||||
result2 = list(filter(lambda x: x is not None, my_collection))
|
||||
|
||||
assert(isinstance(result1, list)) # Python 2 passes, Python 3 fails
|
||||
assert(isinstance(result2, list)) # Python 2 and 3 pass
|
||||
|
||||
There also exist further options, take a look at the `cheat sheet <https://python-future.org/compatible_idioms.html#map>`__.
|
||||
|
||||
.. _sec-plugins-python3-checklist:
|
||||
|
||||
Checklist
|
||||
---------
|
||||
|
||||
As a summary, follow this checklist to migrate your plugin to be compatible to both Python 2 and 3:
|
||||
|
||||
* Create a Python 3 virtualenv and install OctoPrint and your plugin into it for testing.
|
||||
* Tell OctoPrint your plugin is Python 2 and 3 compatible by adding a new property ``__plugin_pycompat__`` to its
|
||||
``__init__.py``:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
__plugin_pythoncompat__ = ">=2.7,<4"
|
||||
|
||||
* Add a compatibility header to all `py` files to ensure similar basic behaviour under Python 2 and Python 3:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
* Thorougly test your plugin under Python 3. Pay special attention to any kind of string handling issues, integer
|
||||
division, relative imports from your plugin package and how the results of ``map``, ``filter`` and ``zip`` are
|
||||
used in your code, as those have proven to be the biggest issues during past migrations.
|
||||
* Once everything works under both Python versions and you've prepared a new release of your plugin, update your
|
||||
registration file in the Official Plugin Repository to include the correct Python compatibility information as well:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
compatibility:
|
||||
python: ">=2.7,<3"
|
||||
|
||||
.. _sec-plugins-python3-furtherreading:
|
||||
|
||||
Further reading
|
||||
---------------
|
||||
|
||||
.. seealso::
|
||||
|
||||
`Porting Python 2 Code to Python 3 <https://docs.python.org/3/howto/pyporting.html>`__
|
||||
The official Python 3 porting guide which sums up all the important changes and also gives hints on how best to
|
||||
go about running a project which supports both versions for now.
|
||||
|
||||
`Cheat Sheet: Writing Python 2-3 compatible code <https://python-future.org/compatible_idioms.html>`__
|
||||
A comprehensive list of idioms that are compatible to both Python 2 and 3 and will make your code run under both,
|
||||
utilizing `future <https://python-future.org/>`__ and `six <https://six.readthedocs.io/>`__. Strongly recommended.
|
||||
|
||||
`Supporting Python 3: An in-depth guide <http://python3porting.com/bookindex.html>`__
|
||||
A free online book on the switch to Python 3. Sadly seems a bit outdated by now, so with regards to compatible
|
||||
idioms to use, best stick to the cheat sheet. Gives some interesting background however.
|
||||
|
||||
`Towards Python 3 and OctoPrint 1.4.0 <https://community.octoprint.org/t/towards-python-3-and-octoprint-1-4-0/12382?u=foosel>`__
|
||||
Forum topic discussing OctoPrint 1.4.0's roadmap including Python 3 compatibility and time frame.
|
||||
|
||||
`Migrating plugins to Python 2 & 3 compatibility - experiences? <https://community.octoprint.org/t/migrating-plugins-to-python-2-3-compatibility-experiences/16294?u=foosel>`__
|
||||
Forum topic collecting experiences by plugin developers in migrating their plugins to achieve Python 2 & 3
|
||||
compatibility.
|
||||
|
||||
|
||||
@@ -126,8 +126,8 @@ class GroupManager(object):
|
||||
return [group.key for group in groups]
|
||||
|
||||
def _to_groups(self, *groups):
|
||||
return filter(lambda x: x is not None,
|
||||
[self._to_group(g) for g in groups])
|
||||
return list(filter(lambda x: x is not None,
|
||||
[self._to_group(g) for g in groups]))
|
||||
|
||||
def _to_group(self, group):
|
||||
# noinspection PyCompatibility
|
||||
|
||||
@@ -105,11 +105,11 @@ class UserManager(GroupChangeListener, object):
|
||||
self._logger.exception("Error in on_user_logged_in on {!r}".format(listener),
|
||||
extra=dict(callback=fqcn(listener)))
|
||||
|
||||
self._logger.debug("Logged in user: %r" % user)
|
||||
self._logger.info("Logged in user: {}".format(user.get_id()))
|
||||
|
||||
return user
|
||||
|
||||
def logout_user(self, user):
|
||||
def logout_user(self, user, stale=False):
|
||||
if user is None or user.is_anonymous or isinstance(user, AdminUser):
|
||||
return
|
||||
|
||||
@@ -129,23 +129,27 @@ class UserManager(GroupChangeListener, object):
|
||||
pass
|
||||
|
||||
if sessionid in self._session_users_by_session:
|
||||
del self._session_users_by_session[sessionid]
|
||||
try:
|
||||
del self._session_users_by_session[sessionid]
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
for listener in self._login_status_listeners:
|
||||
try:
|
||||
listener.on_user_logged_out(user)
|
||||
listener.on_user_logged_out(user, stale=stale)
|
||||
except Exception:
|
||||
self._logger.exception("Error in on_user_logged_out on {!r}".format(listener),
|
||||
extra=dict(callback=fqcn(listener)))
|
||||
|
||||
self._logger.debug("Logged out user: %r" % user)
|
||||
self._logger.info("Logged out user: {}".format(user.get_id()))
|
||||
|
||||
def _cleanup_sessions(self):
|
||||
for session, user in list(self._session_users_by_session.items()):
|
||||
if not isinstance(user, SessionUser):
|
||||
continue
|
||||
if user.created + (24 * 60 * 60) < monotonic_time():
|
||||
self.logout_user(user)
|
||||
self._logger.info("Cleaning up user session {} for user {}".format(session, user.get_id()))
|
||||
self.logout_user(user, stale=True)
|
||||
|
||||
@staticmethod
|
||||
def create_password_hash(password, salt=None, settings=None):
|
||||
@@ -436,7 +440,7 @@ class LoginStatusListener(object):
|
||||
def on_user_logged_in(self, user):
|
||||
pass
|
||||
|
||||
def on_user_logged_out(self, user):
|
||||
def on_user_logged_out(self, user, stale=False):
|
||||
pass
|
||||
|
||||
def on_user_modified(self, user):
|
||||
|
||||
@@ -107,7 +107,7 @@ class MultiStream(io.RawIOBase):
|
||||
their contents in the order they are provided to the constructor.
|
||||
|
||||
Arguments:
|
||||
*streams (io.IOBase): One or more streams to concatenate.
|
||||
*streams (io.RawIOBase): One or more streams to concatenate.
|
||||
"""
|
||||
def __init__(self, *streams):
|
||||
io.RawIOBase.__init__(self)
|
||||
@@ -159,10 +159,12 @@ class LineProcessorStream(io.RawIOBase):
|
||||
While reading from this stream the provided `input_stream` is read line by line, calling the (overridable) method
|
||||
:meth:`.process_line` for each read line.
|
||||
|
||||
Sub classes can thus modify the contents of the `input_stream` in line, while it is being read.
|
||||
Sub classes can thus modify the contents of the `input_stream` in line, while it is being read. Keep in mind that
|
||||
``process_line`` will receive the line as a byte stream - if underlying code needs to operate on unicode you'll need
|
||||
to do the decoding yourself.
|
||||
|
||||
Arguments:
|
||||
input_stream (io.IOBase): The stream to process on the fly.
|
||||
input_stream (io.RawIOBase): The stream to process on the fly.
|
||||
"""
|
||||
|
||||
def __init__(self, input_stream):
|
||||
@@ -220,10 +222,11 @@ class LineProcessorStream(io.RawIOBase):
|
||||
wrapper `input_stream`.
|
||||
|
||||
Arguments:
|
||||
line (str): The line as read from `self.input_stream`
|
||||
line (bytes): The line as read from `self.input_stream` in byte representation (str under Python 2 and
|
||||
bytes under Python 3)
|
||||
|
||||
Returns:
|
||||
str or None: The processed version of the line (might also be multiple lines), or None if the line is to be
|
||||
bytes or None: The processed version of the line (might also be multiple lines), or None if the line is to be
|
||||
stripped from the processed stream.
|
||||
"""
|
||||
return line
|
||||
|
||||
@@ -130,6 +130,14 @@ class PluginInfo(object):
|
||||
Bundled plugins will automatically be assumed to be compatible.
|
||||
"""
|
||||
|
||||
attr_hidden = '__plugin_hidden__'
|
||||
"""
|
||||
Module attribute from which to determine if the plugin's hidden or not.
|
||||
|
||||
Only evaluated for bundled plugins, in order to hide them from the Plugin Manager
|
||||
and similar places.
|
||||
"""
|
||||
|
||||
attr_hooks = '__plugin_hooks__'
|
||||
""" Module attribute from which to retrieve the plugin's provided hooks. """
|
||||
|
||||
@@ -444,6 +452,18 @@ class PluginInfo(object):
|
||||
default=">=2.7,<3",
|
||||
incl_metadata=True)
|
||||
|
||||
@property
|
||||
def hidden(self):
|
||||
"""
|
||||
Hidden flag.
|
||||
|
||||
Returns:
|
||||
bool: Whether the plugin should be flagged as hidden or not
|
||||
"""
|
||||
return self._get_instance_attribute(self.__class__.attr_hidden,
|
||||
default=False,
|
||||
incl_metadata=True)
|
||||
|
||||
@property
|
||||
def hooks(self):
|
||||
"""
|
||||
@@ -600,6 +620,16 @@ class PluginInfo(object):
|
||||
result[key] = a.value.args[0].s
|
||||
|
||||
break
|
||||
|
||||
for key in (self.__class__.attr_hidden,):
|
||||
for a in reversed(assignments):
|
||||
targets = extract_target_ids(a)
|
||||
if key in targets:
|
||||
if isinstance(a.value, ast.Name) and a.value.id in ("True", "False"):
|
||||
result[key] = bool(a.value.id)
|
||||
|
||||
break
|
||||
|
||||
except SyntaxError:
|
||||
self._logger.exception("Invalid syntax in {} for plugin {}".format(path, self.key))
|
||||
self.invalid_syntax = True
|
||||
|
||||
@@ -1391,9 +1391,12 @@ class BlueprintPlugin(OctoPrintPlugin, RestartNeedingPlugin):
|
||||
# noinspection PyMethodMayBeStatic
|
||||
def is_blueprint_protected(self):
|
||||
"""
|
||||
Whether a login session is needed to access the blueprint if the forcelogin plugin is enabled or not. Requiring
|
||||
Whether a login session by a registered user is needed to access the blueprint's endpoints. Requiring
|
||||
a session is the default. Note that this only restricts access to the blueprint's dynamic methods, static files
|
||||
are always accessible.
|
||||
|
||||
If you want your blueprint's endpoints to have specific permissions, return ``False`` for this and do your
|
||||
permissions checks explicitly.
|
||||
"""
|
||||
|
||||
return True
|
||||
|
||||
@@ -242,6 +242,9 @@ class AnnouncementPlugin(octoprint.plugin.AssetPlugin,
|
||||
|
||||
return NO_CONTENT
|
||||
|
||||
def is_blueprint_protected(self):
|
||||
return False
|
||||
|
||||
##~~ EventHandlerPlugin
|
||||
|
||||
def on_event(self, event, payload):
|
||||
|
||||
@@ -322,6 +322,9 @@ class BackupPlugin(octoprint.plugin.SettingsPlugin,
|
||||
|
||||
return flask.jsonify(started=True)
|
||||
|
||||
def is_blueprint_protected(self):
|
||||
return False
|
||||
|
||||
##~~ tornado hook
|
||||
|
||||
def route_hook(self, *args, **kwargs):
|
||||
|
||||
@@ -13,8 +13,8 @@ from octoprint.util.version import get_octoprint_version_string, is_released_oct
|
||||
from flask import jsonify
|
||||
from flask_babel import gettext
|
||||
|
||||
SENTRY_URL_SERVER = "https://a09b5f846ab8459c88b61d01dfc97664@sentry.io/1373987"
|
||||
SENTRY_URL_COREUI = "https://86119a0040914e13b37b8bf47c35fffc@sentry.io/1374096"
|
||||
SENTRY_URL_SERVER = "https://2e668ba966024cfc962ba97eef89dc15@sentry.io/1373987"
|
||||
SENTRY_URL_COREUI = "https://dccc2e2f3c6b4adda72f376bbb7fe561@sentry.io/1374096"
|
||||
|
||||
SETTINGS_DEFAULTS = dict(enabled=False,
|
||||
enabled_unreleased=False,
|
||||
|
||||
@@ -114,6 +114,9 @@ class LoggingPlugin(octoprint.plugin.AssetPlugin,
|
||||
self._set_logging_levels(json_data)
|
||||
return self.get_logging_levels_api()
|
||||
|
||||
def is_blueprint_protected(self):
|
||||
return False
|
||||
|
||||
def _get_usage(self):
|
||||
import psutil
|
||||
usage = psutil.disk_usage(settings().getBaseFolder("logs", check_writable=False))
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
# coding=utf-8
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
|
||||
__copyright__ = "Copyright (C) 2020 The OctoPrint Project - Released under terms of the AGPLv3 License"
|
||||
|
||||
import octoprint.plugin
|
||||
|
||||
from flask_babel import gettext
|
||||
|
||||
from octoprint.access.permissions import Permissions
|
||||
|
||||
from collections import defaultdict
|
||||
import threading
|
||||
|
||||
class LoginUiPlugin(octoprint.plugin.UiPlugin,
|
||||
octoprint.plugin.TemplatePlugin,
|
||||
octoprint.plugin.AssetPlugin):
|
||||
MAX_BACKLOG_LEN = 100
|
||||
|
||||
# noinspection PyMissingConstructor
|
||||
def __init__(self):
|
||||
self._message_backlog = defaultdict(list)
|
||||
self._message_backlog_mutex = threading.RLock()
|
||||
|
||||
@property
|
||||
def active(self):
|
||||
# we are only active if ACL is enabled AND configured
|
||||
return self._user_manager.enabled and self._user_manager.has_been_customized()
|
||||
|
||||
def get_assets(self):
|
||||
return dict(
|
||||
js=["js/viewmodel.js"]
|
||||
)
|
||||
|
||||
def will_handle_ui(self, request):
|
||||
if not self.active:
|
||||
# not active, not responsible
|
||||
return False
|
||||
|
||||
from octoprint.server.util import loginUserFromApiKey, loginUserFromAuthorizationHeader, InvalidApiKeyException
|
||||
from octoprint.server.util.flask import passive_login
|
||||
|
||||
# first try to login via api key & authorization header, just in case that's set
|
||||
try:
|
||||
if loginUserFromApiKey():
|
||||
# successful? No need for handling the UI
|
||||
return False
|
||||
except InvalidApiKeyException:
|
||||
pass # ignored
|
||||
|
||||
if loginUserFromAuthorizationHeader():
|
||||
# successful? No need for handling the UI
|
||||
return False
|
||||
|
||||
# then try a passive login
|
||||
passive_login()
|
||||
if Permissions.STATUS.can() and Permissions.SETTINGS_READ.can():
|
||||
# Status & settings_read permission? No need to handle UI
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
||||
def on_ui_render(self, now, request, render_kwargs):
|
||||
from flask import render_template, make_response
|
||||
|
||||
def add_additional_assets(hook):
|
||||
result = []
|
||||
for name, hook in self._plugin_manager.get_hooks(hook).items():
|
||||
try:
|
||||
assets = hook()
|
||||
if isinstance(assets, (tuple, list)):
|
||||
result += assets
|
||||
except:
|
||||
self._logger.exception("Error fetching theming CSS to include from plugin {}".format(name),
|
||||
extra=dict(plugin=name))
|
||||
return result
|
||||
|
||||
additional_assets = []
|
||||
additional_assets += add_additional_assets("octoprint.plugin.loginui.theming")
|
||||
|
||||
# backwards compatibility to old forcelogin plugin which was replaced by this one
|
||||
additional_assets += add_additional_assets("octoprint.plugin.forcelogin.theming")
|
||||
|
||||
render_kwargs.update(dict(loginui_theming=additional_assets))
|
||||
return make_response(render_template("loginui_index.jinja2", **render_kwargs))
|
||||
|
||||
def get_ui_custom_tracked_files(self):
|
||||
from os.path import join as opj
|
||||
|
||||
paths = [opj("static", "css", "loginui.css"),
|
||||
opj("static", "js", "main.js"),
|
||||
opj("static", "js", "viewmodel.js"),
|
||||
opj("static", "less", "loginui.less"),
|
||||
opj("templates", "parts", "loginui_css.jinja2"),
|
||||
opj("templates", "parts", "loginui_javascripts.jinja2"),
|
||||
opj("templates", "loginui_index.jinja2")]
|
||||
|
||||
return [opj(self._basefolder, path) for path in paths]
|
||||
|
||||
def get_ui_preemptive_caching_enabled(self):
|
||||
return False
|
||||
|
||||
def get_sorting_key(self, context=None):
|
||||
if context == "UiPlugin.on_ui_render":
|
||||
# If a plugin *really* wants to come before this plugin, it'll have to turn to negative numbers.
|
||||
#
|
||||
# This is obviously discouraged for security reasons, but very specific setups might make it necessary,
|
||||
# so we make it possible. If this should get abused long term we can always turn this into -inf.
|
||||
return 0
|
||||
|
||||
__plugin_name__ = "Login UI"
|
||||
__plugin_author__ = "Gina Häußge"
|
||||
__plugin_description__ = "Displays a standalone login UI if needed"
|
||||
__plugin_disabling_discouraged__ = gettext("Without this plugin there will be no dedicated login page for users in "
|
||||
"case anonymous read only access is disabled - instead your non logged in "
|
||||
"visitors will get a broken UI.")
|
||||
__plugin_hidden__ = True
|
||||
|
||||
__plugin_implementation__ = LoginUiPlugin()
|
||||
@@ -0,0 +1 @@
|
||||
body{padding-top:40px;padding-bottom:40px;background-color:#f5f5f5}.form-signin{max-width:300px;padding:19px 29px 29px;margin:0 auto 20px;background-color:#fff;border:1px solid #e5e5e5;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.form-signin .form-signin-heading,.form-signin .checkbox{margin-bottom:10px}.form-signin input[type=text],.form-signin input[type=password]{font-size:16px;height:auto;margin-bottom:15px;padding:7px 9px}#login-error,#login-offline{display:none}#login-error.in,#login-offline.in{display:block}#login-overlay{position:fixed;top:0;left:0;width:100%;height:100%;z-index:10000;display:none}#login-overlay.in{display:block}#login-overlay .background{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#000;filter:alpha(opacity=50);-moz-opacity:.5;-khtml-opacity:.5;opacity:.5}#login-overlay .wrapper{position:absolute;top:0;bottom:0;left:0;right:0}#login-overlay .wrapper .outer{display:table;width:100%;height:100%}#login-overlay .wrapper .outer .inner{display:table-cell;vertical-align:middle}#login-overlay .wrapper .outer .inner .content{text-align:center;color:#fff}
|
||||
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Will get included into the login dialog, NOT into the regular OctoPrint
|
||||
* web application.
|
||||
*/
|
||||
|
||||
$(function() {
|
||||
var overlayElement = $("#login-overlay");
|
||||
var errorElement = $("#login-error");
|
||||
var offlineElement = $("#login-offline");
|
||||
var buttonElement = $("#login-button");
|
||||
var reconnectElement = $("#login-reconnect");
|
||||
|
||||
buttonElement.click(function() {
|
||||
var usernameElement = $("#login-user");
|
||||
var passwordElement = $("#login-password");
|
||||
var rememberElement = $("#login-remember");
|
||||
|
||||
var username = usernameElement.val();
|
||||
var password = passwordElement.val();
|
||||
var remember = rememberElement.prop("checked");
|
||||
|
||||
overlayElement.addClass("in");
|
||||
errorElement.removeClass("in");
|
||||
|
||||
OctoPrint.browser.login(username, password, remember)
|
||||
.done(function() {
|
||||
location.reload();
|
||||
})
|
||||
.fail(function() {
|
||||
usernameElement.val("");
|
||||
passwordElement.val("");
|
||||
|
||||
overlayElement.removeClass("in");
|
||||
errorElement.addClass("in");
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
var OctoPrint = window.OctoPrint;
|
||||
|
||||
OctoPrint.options.baseurl = BASE_URL;
|
||||
|
||||
OctoPrint.socket.onConnected = function() {
|
||||
buttonElement.prop("disabled", false);
|
||||
offlineElement.removeClass("in");
|
||||
};
|
||||
|
||||
OctoPrint.socket.onDisconnected = function() {
|
||||
buttonElement.prop("disabled", true);
|
||||
offlineElement.addClass("in");
|
||||
};
|
||||
|
||||
reconnectElement.click(function() {
|
||||
OctoPrint.socket.reconnect();
|
||||
});
|
||||
|
||||
OctoPrint.socket.connect();
|
||||
});
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* View model that takes care to redirect to / on logout in the regular
|
||||
* OctoPrint web application.
|
||||
*/
|
||||
|
||||
$(function() {
|
||||
function LoginUiViewModel(parameters) {
|
||||
var self = this;
|
||||
self.loginState = parameters[0];
|
||||
self.access = parameters[1];
|
||||
self.coreWizardAcl = parameters[2];
|
||||
|
||||
self.onUserLoggedOut = self.onUserPermissionsChanged = function() {
|
||||
// reload if user now lacks STATUS & SETTINGS_READ permissions and is not in first run setup, or is in
|
||||
// first run setup but the ACL wizard has already run and ACL is active
|
||||
if (!self.loginState.hasAllPermissions(self.access.permissions.STATUS, self.access.permissions.SETTINGS_READ)
|
||||
&& (!CONFIG_FIRST_RUN || (self.coreWizardAcl
|
||||
&& self.coreWizardAcl.setup()
|
||||
&& self.coreWizardAcl.decision()))) {
|
||||
location.reload();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
OCTOPRINT_VIEWMODELS.push({
|
||||
construct: LoginUiViewModel,
|
||||
dependencies: ["loginStateViewModel", "accessViewModel", "coreWizardAclViewModel"],
|
||||
optional: ["coreWizardAclViewModel"]
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,90 @@
|
||||
body {
|
||||
padding-top: 40px;
|
||||
padding-bottom: 40px;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.form-signin {
|
||||
max-width: 300px;
|
||||
padding: 19px 29px 29px;
|
||||
margin: 0 auto 20px;
|
||||
background-color: #fff;
|
||||
border: 1px solid #e5e5e5;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05);
|
||||
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);
|
||||
box-shadow: 0 1px 2px rgba(0,0,0,.05);
|
||||
|
||||
.form-signin-heading, .checkbox {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
input[type="text"], input[type="password"] {
|
||||
font-size: 16px;
|
||||
height: auto;
|
||||
margin-bottom: 15px;
|
||||
padding: 7px 9px;
|
||||
}
|
||||
}
|
||||
|
||||
#login-error,
|
||||
#login-offline {
|
||||
display: none;
|
||||
|
||||
&.in {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
#login-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 10000;
|
||||
display: none;
|
||||
|
||||
&.in {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.background {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #000000;
|
||||
filter:alpha(opacity=50);
|
||||
-moz-opacity:0.5;
|
||||
-khtml-opacity: 0.5;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
|
||||
.outer {
|
||||
display: table;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
.inner {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
|
||||
.content {
|
||||
text-align: center;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-25
@@ -9,32 +9,9 @@
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="{{ url_for('static', filename='img/apple-touch-icon-114x114.png') }}">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="{{ url_for('static', filename='img/apple-touch-icon-144x144.png') }}">
|
||||
|
||||
<!-- le CSS -->
|
||||
{% include "parts/loginui_css.jinja2" %}
|
||||
|
||||
<link rel="stylesheet" href="{{ url_for("static", filename="css/bootstrap.min.css") }}">
|
||||
<link rel="stylesheet" href="{{ url_for("static", filename="css/bootstrap-responsive.min.css") }}">
|
||||
<link rel="stylesheet" href="{{ url_for("static", filename="vendor/font-awesome-4.7.0/css/font-awesome.min.css") }}">
|
||||
<link rel="stylesheet" href="{{ url_for("static", filename="forcelogin/css/forcelogin.css") }}">
|
||||
|
||||
{% for url in forcelogin_theming %}
|
||||
<link rel="stylesheet" href="{{ url }}">
|
||||
{% endfor %}
|
||||
|
||||
<!-- le javascript -->
|
||||
|
||||
<script>
|
||||
var BASE_URL = "{{ url_for('index') }}";
|
||||
</script>
|
||||
<script src="{{ url_for("static", filename="js/lib/jquery/jquery.min.js") }}"></script>
|
||||
<script src="{{ url_for("static", filename="js/lib/sockjs.min.js") }}"></script>
|
||||
<script src="{{ url_for("static", filename="js/lib/bootstrap/bootstrap.js") }}"></script>
|
||||
<script src="{{ url_for("static", filename="js/lib/lodash.min.js") }}"></script>
|
||||
|
||||
{% assets "js_client" %}
|
||||
<script type="text/javascript" src="{{ ASSET_URL }}"></script>
|
||||
{% endassets %}
|
||||
|
||||
<script src="{{ url_for("static", filename="forcelogin/js/forcelogin.js") }}"></script>
|
||||
{% include "parts/loginui_javascripts.jinja2" %}
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
@@ -0,0 +1,10 @@
|
||||
<!-- le CSS -->
|
||||
|
||||
<link rel="stylesheet" href="{{ url_for("static", filename="css/bootstrap.min.css") }}">
|
||||
<link rel="stylesheet" href="{{ url_for("static", filename="css/bootstrap-responsive.min.css") }}">
|
||||
<link rel="stylesheet" href="{{ url_for("static", filename="vendor/font-awesome-4.7.0/css/font-awesome.min.css") }}">
|
||||
<link rel="stylesheet" href="{{ url_for("plugin.loginui.static", filename="css/loginui.css") }}">
|
||||
|
||||
{% for url in forcelogin_theming %}
|
||||
<link rel="stylesheet" href="{{ url }}">
|
||||
{% endfor %}
|
||||
@@ -0,0 +1,15 @@
|
||||
<!-- le javascript -->
|
||||
|
||||
<script>
|
||||
var BASE_URL = "{{ url_for('index') }}";
|
||||
</script>
|
||||
<script src="{{ url_for("static", filename="js/lib/jquery/jquery.min.js") }}"></script>
|
||||
<script src="{{ url_for("static", filename="js/lib/sockjs.min.js") }}"></script>
|
||||
<script src="{{ url_for("static", filename="js/lib/bootstrap/bootstrap.js") }}"></script>
|
||||
<script src="{{ url_for("static", filename="js/lib/lodash.min.js") }}"></script>
|
||||
|
||||
{% assets "js_client" %}
|
||||
<script type="text/javascript" src="{{ ASSET_URL }}"></script>
|
||||
{% endassets %}
|
||||
|
||||
<script src="{{ url_for("plugin.loginui.static", filename="js/main.js") }}"></script>
|
||||
@@ -286,6 +286,9 @@ class PluginManagerPlugin(octoprint.plugin.SimpleApiPlugin,
|
||||
except Exception as e:
|
||||
self._logger.warning("Could not remove temporary file {path} again: {message}".format(path=archive.name, message=str(e)))
|
||||
|
||||
def is_blueprint_protected(self):
|
||||
return False
|
||||
|
||||
##~~ EventHandlerPlugin
|
||||
|
||||
def on_event(self, event, payload):
|
||||
@@ -780,7 +783,7 @@ class PluginManagerPlugin(octoprint.plugin.SimpleApiPlugin,
|
||||
return True
|
||||
|
||||
def command_toggle(self, plugin, command):
|
||||
if plugin.key == "pluginmanager":
|
||||
if plugin.key == "pluginmanager" or (plugin.hidden and plugin.bundled):
|
||||
return make_response("Can't enable/disable Plugin Manager", 400)
|
||||
|
||||
pending = ((command == "disable" and plugin.key in self._pending_enable) or (command == "enable" and plugin.key in self._pending_disable))
|
||||
@@ -1161,7 +1164,7 @@ class PluginManagerPlugin(octoprint.plugin.SimpleApiPlugin,
|
||||
hidden = self._settings.get(["hidden"])
|
||||
result = []
|
||||
for key, plugin in plugins.items():
|
||||
if key in hidden:
|
||||
if key in hidden or (plugin.bundled and plugin.hidden):
|
||||
continue
|
||||
result.append(self._to_external_plugin(plugin))
|
||||
|
||||
@@ -1235,6 +1238,7 @@ __plugin_author__ = "Gina Häußge"
|
||||
__plugin_url__ = "http://docs.octoprint.org/en/master/bundledplugins/pluginmanager.html"
|
||||
__plugin_description__ = "Allows installing and managing OctoPrint plugins"
|
||||
__plugin_license__ = "AGPLv3"
|
||||
__plugin_hidden__ = True
|
||||
|
||||
def __plugin_load__():
|
||||
global __plugin_implementation__
|
||||
|
||||
@@ -668,6 +668,9 @@ class SoftwareUpdatePlugin(octoprint.plugin.BlueprintPlugin,
|
||||
to_be_checked, checks = self.perform_updates(targets=targets, force=force)
|
||||
return flask.jsonify(dict(order=to_be_checked, checks=checks))
|
||||
|
||||
def is_blueprint_protected(self):
|
||||
return False
|
||||
|
||||
#~~ Asset API
|
||||
|
||||
def get_assets(self):
|
||||
|
||||
@@ -100,7 +100,7 @@ import octoprint.filemanager.storage
|
||||
import octoprint.filemanager.analysis
|
||||
import octoprint.slicing
|
||||
from octoprint.server.util import loginFromApiKeyRequestHandler, corsRequestHandler, \
|
||||
corsResponseHandler
|
||||
corsResponseHandler, requireLoginRequestHandler
|
||||
from octoprint.server.util.flask import PreemptiveCache
|
||||
|
||||
VERSION = __version__
|
||||
@@ -478,6 +478,9 @@ class Server(object):
|
||||
class TaggedFuncsPrinter(wrapt.ObjectProxy):
|
||||
def __getattribute__(self, attr):
|
||||
__wrapped__ = super(TaggedFuncsPrinter, self).__getattribute__("__wrapped__")
|
||||
if attr == "__wrapped__":
|
||||
return __wrapped__
|
||||
|
||||
item = getattr(__wrapped__, attr)
|
||||
if callable(item) \
|
||||
and ("tags" in item.__code__.co_varnames or "kwargs" in item.__code__.co_varnames) \
|
||||
@@ -1326,6 +1329,9 @@ class Server(object):
|
||||
blueprint.before_request(loginFromApiKeyRequestHandler)
|
||||
blueprint.after_request(corsResponseHandler)
|
||||
|
||||
if plugin.is_blueprint_protected():
|
||||
blueprint.before_request(requireLoginRequestHandler)
|
||||
|
||||
url_prefix = "/plugin/{name}".format(name=name)
|
||||
app.register_blueprint(blueprint, url_prefix=url_prefix)
|
||||
|
||||
@@ -1350,7 +1356,8 @@ class Server(object):
|
||||
before_hooks = octoprint.plugin.plugin_manager().get_hooks("octoprint.server.api.before_request")
|
||||
after_hooks = octoprint.plugin.plugin_manager().get_hooks("octoprint.server.api.after_request")
|
||||
|
||||
for plugin, hook in before_hooks.items():
|
||||
for name, hook in before_hooks.items():
|
||||
plugin = octoprint.plugin.plugin_manager().get_plugin(name)
|
||||
for blueprint in blueprints:
|
||||
try:
|
||||
result = hook(plugin=plugin)
|
||||
@@ -1359,9 +1366,10 @@ class Server(object):
|
||||
blueprint.before_request(h)
|
||||
except Exception:
|
||||
self._logger.exception("Error processing before_request hooks from plugin {}".format(plugin),
|
||||
extra=dict(plugin=plugin))
|
||||
extra=dict(plugin=name))
|
||||
|
||||
for plugin, hook in after_hooks.items():
|
||||
for name, hook in after_hooks.items():
|
||||
plugin = octoprint.plugin.plugin_manager().get_plugin(name)
|
||||
for blueprint in blueprints:
|
||||
try:
|
||||
result = hook(plugin=plugin)
|
||||
@@ -1370,7 +1378,7 @@ class Server(object):
|
||||
blueprint.after_request(h)
|
||||
except Exception:
|
||||
self._logger.exception("Error processing after_request hooks from plugin {}".format(plugin),
|
||||
extra=dict(plugin=plugin))
|
||||
extra=dict(plugin=name))
|
||||
|
||||
def _setup_mimetypes(self):
|
||||
# Safety measures for Windows... apparently the mimetypes module takes its translation from the windows
|
||||
|
||||
@@ -102,6 +102,18 @@ def loginUser(user, remember=False):
|
||||
return False
|
||||
|
||||
|
||||
def requireLoginRequestHandler():
|
||||
if _flask.request.endpoint.endswith(".static"):
|
||||
return
|
||||
|
||||
if not (octoprint.server.userManager.enabled and octoprint.server.userManager.has_been_customized()):
|
||||
return
|
||||
|
||||
user = flask_login.current_user
|
||||
if user is None or user.is_anonymous or not user.is_active:
|
||||
return flask.make_response("Forbidden", 403)
|
||||
|
||||
|
||||
def corsRequestHandler():
|
||||
"""
|
||||
``before_request`` handler for blueprints which sets CORS headers for OPTIONS requests if enabled
|
||||
@@ -241,9 +253,9 @@ def get_user_for_authorization_header(header):
|
||||
if not octoprint.server.userManager.enabled:
|
||||
return None
|
||||
|
||||
user = octoprint.server.userManager.findUser(userid=name)
|
||||
user = octoprint.server.userManager.find_user(userid=name)
|
||||
if settings().getBoolean(["accessControl", "checkBasicAuthenticationPassword"]) \
|
||||
and not octoprint.server.userManager.checkPassword(name, password):
|
||||
and not octoprint.server.userManager.check_password(name, password):
|
||||
# password check enabled and password don't match
|
||||
return None
|
||||
|
||||
|
||||
@@ -311,11 +311,15 @@ class PrinterStateConnection(octoprint.vendor.sockjs.tornado.SockJSConnection,
|
||||
with self._temperatureBacklogMutex:
|
||||
self._temperatureBacklog.append(data)
|
||||
|
||||
def on_user_logged_out(self, user):
|
||||
if user.get_id() == self._user.get_id() and hasattr(user, "session") and user.session == self._user.session:
|
||||
def on_user_logged_out(self, user, stale=False):
|
||||
if user.get_id() == self._user.get_id() and hasattr(user, "session") and hasattr(self._user, "session") and user.session == self._user.session:
|
||||
self._logger.info("User {} logged out, logging out on socket".format(user.get_id()))
|
||||
self._on_logout()
|
||||
self._sendReauthRequired("logout")
|
||||
|
||||
if stale:
|
||||
self._sendReauthRequired("stale")
|
||||
else:
|
||||
self._sendReauthRequired("logout")
|
||||
|
||||
def on_user_modified(self, user):
|
||||
if user.get_id() == self._user.get_id():
|
||||
|
||||
@@ -12,7 +12,7 @@ import io
|
||||
from past.builtins import basestring
|
||||
|
||||
from collections import defaultdict
|
||||
from flask import request, g, url_for, make_response, render_template, send_from_directory, redirect, abort
|
||||
from flask import request, g, url_for, make_response, render_template, send_from_directory, redirect, abort, Response
|
||||
|
||||
import octoprint.plugin
|
||||
|
||||
@@ -367,7 +367,7 @@ def index():
|
||||
|
||||
return view(now, request, render_kwargs)
|
||||
|
||||
def ui_view():
|
||||
def default_view():
|
||||
filtered_templates = _filter_templates(_templates[locale], default_template_filter)
|
||||
|
||||
wizard = wizard_active(filtered_templates)
|
||||
@@ -407,33 +407,6 @@ def index():
|
||||
dict())
|
||||
return preemptively_cached()
|
||||
|
||||
def login_view():
|
||||
return util.flask.add_non_caching_response_headers(make_response(render_template("forcelogin.jinja2")))
|
||||
|
||||
def evaluate_login():
|
||||
from octoprint.server.util import loginUserFromApiKey, loginUserFromAuthorizationHeader, InvalidApiKeyException
|
||||
from octoprint.server.util.flask import passive_login
|
||||
|
||||
# first try to login via api key & authorization header, just in case that's set
|
||||
try:
|
||||
loginUserFromApiKey()
|
||||
except InvalidApiKeyException:
|
||||
pass # ignored
|
||||
loginUserFromAuthorizationHeader()
|
||||
|
||||
# then try a passive login
|
||||
passive_login()
|
||||
|
||||
def default_view():
|
||||
evaluate_login()
|
||||
|
||||
if request.headers.get("X-Preemptive-Record", None) == "no" \
|
||||
or (Permissions.STATUS.can() and Permissions.SETTINGS_READ.can()) \
|
||||
or settings().getBoolean(["server", "firstRun"]):
|
||||
return ui_view()
|
||||
else:
|
||||
return login_view()
|
||||
|
||||
response = None
|
||||
|
||||
forced_view = request.headers.get("X-Force-View", None)
|
||||
@@ -445,8 +418,12 @@ def index():
|
||||
plugin = pluginManager.get_plugin_info(forced_view, require_enabled=True)
|
||||
if plugin is not None and isinstance(plugin.implementation, octoprint.plugin.UiPlugin):
|
||||
response = plugin_view(plugin.implementation)
|
||||
if _logger.isEnabledFor(logging.DEBUG) and isinstance(response, Response):
|
||||
response.headers["X-Ui-Plugin"] = plugin._identifier
|
||||
else:
|
||||
response = default_view()
|
||||
if _logger.isEnabledFor(logging.DEBUG) and isinstance(response, Response):
|
||||
response.headers["X-Ui-Plugin"] = "_default"
|
||||
|
||||
else:
|
||||
# select view from plugins and fall back on default view if no plugin will handle it
|
||||
@@ -457,6 +434,8 @@ def index():
|
||||
# plugin claims responsibility, let it render the UI
|
||||
response = plugin_view(plugin)
|
||||
if response is not None:
|
||||
if _logger.isEnabledFor(logging.DEBUG) and isinstance(response, Response):
|
||||
response.headers["X-Ui-Plugin"] = plugin._identifier
|
||||
break
|
||||
else:
|
||||
_logger.warning("UiPlugin {} returned an empty response".format(plugin._identifier))
|
||||
@@ -465,6 +444,8 @@ def index():
|
||||
extra=dict(plugin=plugin._identifier))
|
||||
else:
|
||||
response = default_view()
|
||||
if _logger.isEnabledFor(logging.DEBUG) and isinstance(response, Response):
|
||||
response.headers["X-Ui-Plugin"] = "_default"
|
||||
|
||||
if response is None:
|
||||
return abort(404)
|
||||
|
||||
@@ -1 +1 @@
|
||||
.btn{display:inline-block;*display:inline;*zoom:1;padding:4px 12px;margin-bottom:0;font-size:14px;line-height:20px;text-align:center;vertical-align:middle;cursor:pointer;color:#333;text-shadow:0 1px 1px rgba(255,255,255,.75);background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;*background-color:#e6e6e6;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);border:1px solid #ccc;*border:0;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*margin-left:.3em;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}.btn.active,.btn.disabled,.btn:active,.btn:focus,.btn:hover,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn.active,.btn:active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:focus,.btn:hover{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:#333 dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn-large [class*=" icon-"],.btn-large [class^=icon-]{margin-top:4px}.btn-small{padding:2px 10px;font-size:11.9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-small [class*=" icon-"],.btn-small [class^=icon-]{margin-top:0}.btn-mini [class*=" icon-"],.btn-mini [class^=icon-]{margin-top:-1px}.btn-mini{padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-block{display:block;width:100%;padding-left:0;padding-right:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#04c;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-primary.active,.btn-primary.disabled,.btn-primary:active,.btn-primary:focus,.btn-primary:hover,.btn-primary[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.btn-primary.active,.btn-primary:active{background-color:#039 \9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#f89406;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-warning.active,.btn-warning.disabled,.btn-warning:active,.btn-warning:focus,.btn-warning:hover,.btn-warning[disabled]{color:#fff;background-color:#f89406;*background-color:#df8505}.btn-warning.active,.btn-warning:active{background-color:#c67605 \9}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#da4f49;background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to bottom,#ee5f5b,#bd362f);background-repeaLine truncated
|
||||
.btn{display:inline-block;*display:inline;*zoom:1;padding:4px 12px;margin-bottom:0;font-size:14px;line-height:20px;text-align:center;vertical-align:middle;cursor:pointer;color:#333;text-shadow:0 1px 1px rgba(255,255,255,.75);background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;*background-color:#e6e6e6;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);border:1px solid #ccc;*border:0;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*margin-left:.3em;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}.btn.active,.btn.disabled,.btn:active,.btn:focus,.btn:hover,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn.active,.btn:active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:focus,.btn:hover{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:#333 dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn-large [class*=" icon-"],.btn-large [class^=icon-]{margin-top:4px}.btn-small{padding:2px 10px;font-size:11.9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-small [class*=" icon-"],.btn-small [class^=icon-]{margin-top:0}.btn-mini [class*=" icon-"],.btn-mini [class^=icon-]{margin-top:-1px}.btn-mini{padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-block{display:block;width:100%;padding-left:0;padding-right:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#04c;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-primary.active,.btn-primary.disabled,.btn-primary:active,.btn-primary:focus,.btn-primary:hover,.btn-primary[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.btn-primary.active,.btn-primary:active{background-color:#039 \9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#f89406;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-warning.active,.btn-warning.disabled,.btn-warning:active,.btn-warning:focus,.btn-warning:hover,.btn-warning[disabled]{color:#fff;background-color:#f89406;*background-color:#df8505}.btn-warning.active,.btn-warning:active{background-color:#c67605 \9}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#da4f49;background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to bottom,#ee5f5b,#bd362f);background-repeaLine truncated
|
||||
@@ -2,50 +2,12 @@ $(function() {
|
||||
function UiStateViewModel(parameters) {
|
||||
var self = this;
|
||||
|
||||
self.loginState = parameters[0];
|
||||
self.access = parameters[1];
|
||||
|
||||
self.loading = ko.observable(CONFIG_LOADINGANIMATION);
|
||||
self.loading_error = ko.observable(false);
|
||||
self.needlogin = ko.computed(function() {
|
||||
return !self.loading() && !self.loginState.hasAllPermissionsKo(self.access.permissions.STATUS, self.access.permissions.SETTINGS_READ)();
|
||||
});
|
||||
self.visible = ko.pureComputed(function() {
|
||||
return !self.loading() && !self.needlogin();
|
||||
return !self.loading();
|
||||
});
|
||||
|
||||
self.login_username = ko.observable();
|
||||
self.login_password = ko.observable();
|
||||
self.login_remember = ko.observable(false);
|
||||
self.login_error = ko.observable(false);
|
||||
|
||||
self.login = function() {
|
||||
self.login_error(false);
|
||||
self.loginState.login(self.login_username(), self.login_password(), self.login_remember(), false)
|
||||
.done(function() {
|
||||
self.login_username(undefined);
|
||||
self.login_password(undefined);
|
||||
})
|
||||
.fail(function(response) {
|
||||
switch(response.status) {
|
||||
case 401: {
|
||||
self.login_error(gettext("User unknown or wrong password"));
|
||||
break;
|
||||
}
|
||||
case 403: {
|
||||
self.login_error(gettext("Your account is deactivated"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
self.onUserLoggedOut = self.onUserPermissionsChanged = function() {
|
||||
if (!self.loginState.hasAllPermissions(self.access.permissions.STATUS, self.access.permissions.SETTINGS_READ) && !CONFIG_FIRST_RUN) {
|
||||
location.reload();
|
||||
}
|
||||
};
|
||||
|
||||
self.showLoadingError = function(error) {
|
||||
log.error("Loading error: " + error + " Please check prior messages and 'octoprint.log' for possible reasons.");
|
||||
|
||||
@@ -58,7 +20,6 @@ $(function() {
|
||||
|
||||
OCTOPRINT_VIEWMODELS.push({
|
||||
construct: UiStateViewModel,
|
||||
dependencies: ["loginStateViewModel", "accessViewModel"],
|
||||
elements: ["#page-container-main", "#page-container-loading", "#page-container-needlogin"]
|
||||
elements: ["#page-container-main", "#page-container-loading"]
|
||||
});
|
||||
});
|
||||
@@ -1544,35 +1544,6 @@ input[type="number"].input-nospin {
|
||||
}
|
||||
}
|
||||
|
||||
// page wide login form
|
||||
#page-container-needlogin {
|
||||
background-color: #ffffff;
|
||||
.form-signin {
|
||||
max-width: 300px;
|
||||
padding: 19px 29px 29px;
|
||||
margin: 50px auto;
|
||||
background-color: #fff;
|
||||
border: 1px solid #e5e5e5;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05);
|
||||
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);
|
||||
box-shadow: 0 1px 2px rgba(0,0,0,.05);
|
||||
|
||||
.form-signin-heading, .checkbox {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
input[type="text"], input[type="password"] {
|
||||
font-size: 16px;
|
||||
height: auto;
|
||||
margin-bottom: 15px;
|
||||
padding: 7px 9px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// loading overlay
|
||||
#page-container-loading {
|
||||
position: fixed;
|
||||
|
||||
Binary file not shown.
@@ -7,8 +7,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OctoPrint\n"
|
||||
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
|
||||
"POT-Creation-Date: 2020-02-10 16:58+0100\n"
|
||||
"PO-Revision-Date: 2020-02-10 16:59+0100\n"
|
||||
"POT-Creation-Date: 2020-02-26 09:14+0100\n"
|
||||
"PO-Revision-Date: 2020-02-26 09:15+0100\n"
|
||||
"Last-Translator: Gina Häußge <osd@foosel.net>\n"
|
||||
"Language: de\n"
|
||||
"Language-Team: German (http://www.transifex.com/projects/p/octoprint/language/de/)\n"
|
||||
@@ -192,7 +192,7 @@ msgstr "Erlaubt die Verwaltung von Ankündigungen. Beinhaltet die \"Read announc
|
||||
msgid "Announcements"
|
||||
msgstr "Ankündigungen"
|
||||
|
||||
#: src/octoprint/plugins/announcements/__init__.py:533
|
||||
#: src/octoprint/plugins/announcements/__init__.py:536
|
||||
msgid "Without this plugin you might miss important announcements regarding security or other critical issues concerning OctoPrint."
|
||||
msgstr "Ohne dieses Plugin könntest du wichtige Benachrichtigung hinsichtlich Security oder kritischer Fehler in OctoPrint verpassen."
|
||||
|
||||
@@ -444,7 +444,7 @@ msgstr "Erlaubt Zugriff auf und Wiederherstellung von Backups"
|
||||
msgid "Backup & Restore"
|
||||
msgstr "Sicherung & Wiederherstellung"
|
||||
|
||||
#: src/octoprint/plugins/backup/__init__.py:967
|
||||
#: src/octoprint/plugins/backup/__init__.py:970
|
||||
msgid "Without this plugin you will no longer be able to backup & restore your OctoPrint settings and data."
|
||||
msgstr "Ohne dieses Plugin kannst du deine OctoPrint Einstellung und Daten nicht länger sichern & wiederherstellen."
|
||||
|
||||
@@ -667,13 +667,13 @@ msgid "Server Commands"
|
||||
msgstr "Serverbefehle"
|
||||
|
||||
#: src/octoprint/plugins/corewizard/subwizards.py:50
|
||||
#: src/octoprint/server/views.py:642
|
||||
#: src/octoprint/server/views.py:623
|
||||
msgid "Webcam & Timelapse"
|
||||
msgstr "Webcam & Zeitraffer"
|
||||
|
||||
#: src/octoprint/plugins/corewizard/subwizards.py:65
|
||||
#: src/octoprint/plugins/corewizard/templates/corewizard_acl_wizard.jinja2:1
|
||||
#: src/octoprint/server/views.py:648
|
||||
#: src/octoprint/server/views.py:629
|
||||
msgid "Access Control"
|
||||
msgstr "Zugangsbeschränkung"
|
||||
|
||||
@@ -765,6 +765,7 @@ msgstr "<p>\n"
|
||||
"</p>"
|
||||
|
||||
#: src/octoprint/plugins/corewizard/templates/corewizard_acl_wizard.jinja2:27
|
||||
#: src/octoprint/plugins/loginui/templates/loginui_index.jinja2:24
|
||||
#: src/octoprint/templates/navbar/login.jinja2:7
|
||||
#: src/octoprint/templates/navbar/login.jinja2:8
|
||||
#: src/octoprint/templates/snippets/settings/accesscontrol/users.jinja2:83
|
||||
@@ -772,6 +773,7 @@ msgid "Username"
|
||||
msgstr "Username"
|
||||
|
||||
#: src/octoprint/plugins/corewizard/templates/corewizard_acl_wizard.jinja2:33
|
||||
#: src/octoprint/plugins/loginui/templates/loginui_index.jinja2:25
|
||||
#: src/octoprint/templates/dialogs/usersettings/access.jinja2:3
|
||||
#: src/octoprint/templates/navbar/login.jinja2:10
|
||||
#: src/octoprint/templates/navbar/login.jinja2:11
|
||||
@@ -1145,7 +1147,7 @@ msgstr "\n"
|
||||
msgid "Allows to download and delete log files and list and set log levels."
|
||||
msgstr "Erlaubt den Download von Logdateien sowie deren Löschung und das Setzen von Loglevels."
|
||||
|
||||
#: src/octoprint/plugins/logging/__init__.py:223
|
||||
#: src/octoprint/plugins/logging/__init__.py:226
|
||||
msgid "Without this plugin you will no longer be able to retrieve OctoPrint's logs or modify the current logging levels through the web interface."
|
||||
msgstr "Ohne dieses Plugin kannst du OctoPrints Logfiles nicht mehr über das Webinterface herunterladen und auch die aktuellen Loglevel modifizieren."
|
||||
|
||||
@@ -1224,6 +1226,40 @@ msgstr "Entfernen"
|
||||
msgid "Add"
|
||||
msgstr "Hinzufügen"
|
||||
|
||||
#: src/octoprint/plugins/loginui/__init__.py:115
|
||||
msgid "Without this plugin there will be no dedicated login page for users in case anonymous read only access is disabled - instead your non logged in visitors will get a broken UI."
|
||||
msgstr "Ohne dieses Plugin wird es keine Loginpage für User geben, falls anonymer Readonly-Zugriff deaktiviert ist - statt dessen wird deinen nicht eingeloggten Nutzerne eine kaputte UI präsentiert."
|
||||
|
||||
#: src/octoprint/plugins/loginui/templates/loginui_index.jinja2:19
|
||||
msgid "Please log in"
|
||||
msgstr "Bitte einloggen"
|
||||
|
||||
#: src/octoprint/plugins/loginui/templates/loginui_index.jinja2:21
|
||||
msgid "Incorrect username or password."
|
||||
msgstr "Username oder Passwort inkorrekt."
|
||||
|
||||
#: src/octoprint/plugins/loginui/templates/loginui_index.jinja2:22
|
||||
msgid "Server is currently offline."
|
||||
msgstr "Der Server ist offline."
|
||||
|
||||
#: src/octoprint/plugins/loginui/templates/loginui_index.jinja2:22
|
||||
msgid "Reconnect..."
|
||||
msgstr "Erneut verbinden..."
|
||||
|
||||
#: src/octoprint/plugins/loginui/templates/loginui_index.jinja2:26
|
||||
#: src/octoprint/templates/navbar/login.jinja2:9
|
||||
msgid "Forgot password?"
|
||||
msgstr "Passwort vergessen?"
|
||||
|
||||
#: src/octoprint/plugins/loginui/templates/loginui_index.jinja2:28
|
||||
#: src/octoprint/templates/navbar/login.jinja2:13
|
||||
msgid "Remember me"
|
||||
msgstr "Login merken"
|
||||
|
||||
#: src/octoprint/plugins/loginui/templates/loginui_index.jinja2:30
|
||||
msgid "Log in"
|
||||
msgstr "Einloggen"
|
||||
|
||||
#: src/octoprint/plugins/pi_support/__init__.py:199
|
||||
msgid "Allows to check for the Pi's throttling status and environment info"
|
||||
msgstr "Erlaubt die Abfrage des Throttlestatus und der Umgebungsinformationen des Raspberry Pis."
|
||||
@@ -1660,7 +1696,7 @@ msgid "\n"
|
||||
msgstr "OctoPrint scheint zur Zeit keine Verbindung zum Internet zu haben. Daher ist es nicht möglich, neue Plugins aus dem Pluginrepository oder von URL zu installieren."
|
||||
|
||||
#: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:39
|
||||
#: src/octoprint/server/views.py:554
|
||||
#: src/octoprint/server/views.py:535
|
||||
msgid "Plugins"
|
||||
msgstr "Plugins"
|
||||
|
||||
@@ -1999,7 +2035,7 @@ msgid "Python"
|
||||
msgstr "Python"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:588
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1192
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1195
|
||||
msgid "pip"
|
||||
msgstr "pip"
|
||||
|
||||
@@ -2007,13 +2043,13 @@ msgstr "pip"
|
||||
msgid "setuptools"
|
||||
msgstr "setuptools"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:686
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:689
|
||||
#: src/octoprint/plugins/softwareupdate/templates/softwareupdate_wizard.jinja2:1
|
||||
msgid "Software Update"
|
||||
msgstr "Software Update"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1134
|
||||
#: src/octoprint/server/views.py:646
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1137
|
||||
#: src/octoprint/server/views.py:627
|
||||
#: src/octoprint/static/js/app/viewmodels/appearance.js:99
|
||||
#: src/octoprint/static/js/app/viewmodels/appearance.js:104
|
||||
#: src/octoprint/static/js/app/viewmodels/appearance.js:106
|
||||
@@ -2023,7 +2059,7 @@ msgstr "Software Update"
|
||||
msgid "OctoPrint"
|
||||
msgstr "OctoPrint"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1334
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1337
|
||||
msgid "Without this plugin OctoPrint will no longer be able to update itself or any of your installed plugins which might put your system at risk."
|
||||
msgstr "Ohne dieses Plugin wird OctoPrint nicht länger in der Lage sein, sich selbst oder deine installierten Plugins zu aktualisierten. Das könnte dein System gefährden."
|
||||
|
||||
@@ -2589,105 +2625,105 @@ msgstr "\n"
|
||||
" Für Details, was genau getrackt wird, schau bitte auf <a href=\"https://tracking.octoprint.org\" target=\"_blank\" rel=\"noopener noreferrer\">tracking.octoprint.org</a>\n"
|
||||
" sowie die <a href=\"https://tracking.octoprint.org/privacy\" target=\"_blank\" rel=\"noopener noreferrer\">Privacy Policy auf tracking.octoprint.org</a>.\n"
|
||||
|
||||
#: src/octoprint/server/views.py:613
|
||||
#: src/octoprint/server/views.py:594
|
||||
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:12
|
||||
msgid "Connection"
|
||||
msgstr "Verbindung"
|
||||
|
||||
#: src/octoprint/server/views.py:614
|
||||
#: src/octoprint/server/views.py:595
|
||||
#: src/octoprint/templates/sidebar/state.jinja2:1
|
||||
msgid "State"
|
||||
msgstr "Status"
|
||||
|
||||
#: src/octoprint/server/views.py:615
|
||||
#: src/octoprint/server/views.py:596
|
||||
msgid "Files"
|
||||
msgstr "Dateien"
|
||||
|
||||
#: src/octoprint/server/views.py:621
|
||||
#: src/octoprint/server/views.py:602
|
||||
msgid "Temperature"
|
||||
msgstr "Temperatur"
|
||||
|
||||
#: src/octoprint/server/views.py:622
|
||||
#: src/octoprint/server/views.py:603
|
||||
msgid "Control"
|
||||
msgstr "Steuerung"
|
||||
|
||||
#: src/octoprint/server/views.py:623
|
||||
#: src/octoprint/server/views.py:604
|
||||
msgid "GCode Viewer"
|
||||
msgstr "GCode Viewer"
|
||||
|
||||
#: src/octoprint/server/views.py:624
|
||||
#: src/octoprint/server/views.py:605
|
||||
msgid "Terminal"
|
||||
msgstr "Terminal"
|
||||
|
||||
#: src/octoprint/server/views.py:625
|
||||
#: src/octoprint/server/views.py:606
|
||||
#: src/octoprint/templates/sidebar/state.jinja2:9
|
||||
msgid "Timelapse"
|
||||
msgstr "Zeitraffer"
|
||||
|
||||
#: src/octoprint/server/views.py:631
|
||||
#: src/octoprint/server/views.py:612
|
||||
msgid "Printer"
|
||||
msgstr "Drucker"
|
||||
|
||||
#: src/octoprint/server/views.py:633
|
||||
#: src/octoprint/server/views.py:614
|
||||
msgid "Serial Connection"
|
||||
msgstr "Serielle Verbindung"
|
||||
|
||||
#: src/octoprint/server/views.py:634
|
||||
#: src/octoprint/server/views.py:615
|
||||
#: src/octoprint/templates/dialogs/settings/printerprofiles.jinja2:1
|
||||
msgid "Printer Profiles"
|
||||
msgstr "Druckerprofile"
|
||||
|
||||
#: src/octoprint/server/views.py:635
|
||||
#: src/octoprint/server/views.py:616
|
||||
msgid "Temperatures"
|
||||
msgstr "Temperaturen"
|
||||
|
||||
#: src/octoprint/server/views.py:636
|
||||
#: src/octoprint/server/views.py:617
|
||||
msgid "Terminal Filters"
|
||||
msgstr "Terminalfilter"
|
||||
|
||||
#: src/octoprint/server/views.py:637
|
||||
#: src/octoprint/server/views.py:618
|
||||
msgid "GCODE Scripts"
|
||||
msgstr "GCODE Scripts"
|
||||
|
||||
#: src/octoprint/server/views.py:639 src/octoprint/server/views.py:641
|
||||
#: src/octoprint/server/views.py:620 src/octoprint/server/views.py:622
|
||||
msgid "Features"
|
||||
msgstr "Funktionen"
|
||||
|
||||
#: src/octoprint/server/views.py:643
|
||||
#: src/octoprint/server/views.py:624
|
||||
msgid "GCODE Visualizer"
|
||||
msgstr "GCode Viewer"
|
||||
|
||||
#: src/octoprint/server/views.py:644
|
||||
#: src/octoprint/server/views.py:625
|
||||
msgid "API"
|
||||
msgstr "API"
|
||||
|
||||
#: src/octoprint/server/views.py:649
|
||||
#: src/octoprint/server/views.py:630
|
||||
#: src/octoprint/templates/dialogs/settings/folders.jinja2:2
|
||||
#: src/octoprint/templates/sidebar/files_header.jinja2:12
|
||||
msgid "Folders"
|
||||
msgstr "Verzeichnisse"
|
||||
|
||||
#: src/octoprint/server/views.py:650
|
||||
#: src/octoprint/server/views.py:631
|
||||
msgid "Appearance"
|
||||
msgstr "Aussehen"
|
||||
|
||||
#: src/octoprint/server/views.py:651
|
||||
#: src/octoprint/server/views.py:632
|
||||
msgid "Server"
|
||||
msgstr "Server"
|
||||
|
||||
#: src/octoprint/server/views.py:657
|
||||
#: src/octoprint/server/views.py:638
|
||||
msgid "Access"
|
||||
msgstr "Zugriff"
|
||||
|
||||
#: src/octoprint/server/views.py:658
|
||||
#: src/octoprint/server/views.py:639
|
||||
msgid "Interface"
|
||||
msgstr "Interface"
|
||||
|
||||
#: src/octoprint/server/views.py:674
|
||||
#: src/octoprint/server/views.py:655
|
||||
msgid "Start"
|
||||
msgstr "Start"
|
||||
|
||||
#: src/octoprint/server/views.py:675
|
||||
#: src/octoprint/server/views.py:656
|
||||
#: src/octoprint/templates/dialogs/wizard.jinja2:57
|
||||
msgid "Finish"
|
||||
msgstr "Beenden"
|
||||
@@ -3858,14 +3894,6 @@ msgstr "Zeitrafferaufnahme fertig"
|
||||
msgid "New timelapse %(movie_prefix)s is done rendering."
|
||||
msgstr "Neue Zeitrafferaufnahme %(movie_prefix)s wurde fertig gerendert"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/uistate.js:32
|
||||
msgid "User unknown or wrong password"
|
||||
msgstr "Nutzer unbekannt oder falsches Passwort"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/uistate.js:36
|
||||
msgid "Your account is deactivated"
|
||||
msgstr "Dein Account ist deaktiviert"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/usersettings.js:12
|
||||
msgid "Site default"
|
||||
msgstr "Seitenvoreinstellung"
|
||||
@@ -4968,14 +4996,6 @@ msgid "\n"
|
||||
" get you printing in no time!\n"
|
||||
msgstr "Dieser Wizard wird dich nun durch die letzten Schritte begleiten, um deine OctoPrint Instanz fertig einzurichten.\n"
|
||||
|
||||
#: src/octoprint/templates/navbar/login.jinja2:9
|
||||
msgid "Forgot password?"
|
||||
msgstr "Passwort vergessen?"
|
||||
|
||||
#: src/octoprint/templates/navbar/login.jinja2:13
|
||||
msgid "Remember me"
|
||||
msgstr "Login merken"
|
||||
|
||||
#: src/octoprint/templates/navbar/login.jinja2:19
|
||||
msgid "User Settings"
|
||||
msgstr "Nutzereinstellungen"
|
||||
@@ -6936,3 +6956,9 @@ msgstr "Zeitrafferaufnahme rendern"
|
||||
|
||||
#~ msgid "Allows to manage settings"
|
||||
#~ msgstr "Erlaubt die Verwaltung der Einstellungen"
|
||||
|
||||
#~ msgid "User unknown or wrong password"
|
||||
#~ msgstr "Nutzer unbekannt oder falsches Passwort"
|
||||
|
||||
#~ msgid "Your account is deactivated"
|
||||
#~ msgstr "Dein Account ist deaktiviert"
|
||||
+29
-28
@@ -481,7 +481,7 @@ class MachineCom(object):
|
||||
self._errorValue = ""
|
||||
|
||||
self._firmware_detection = settings().getBoolean(["serial", "firmwareDetection"])
|
||||
self._firmware_info_received = not self._firmware_detection
|
||||
self._firmware_info_received = False
|
||||
self._firmware_info = dict()
|
||||
self._firmware_capabilities = dict()
|
||||
|
||||
@@ -1917,43 +1917,44 @@ class MachineCom(object):
|
||||
firmware_name = firmware_name.strip()
|
||||
self._logger.info("Printer reports firmware name \"{}\"".format(firmware_name))
|
||||
|
||||
if "repetier" in firmware_name.lower() or "anet_a8" in firmware_name.lower():
|
||||
self._logger.info("Detected Repetier firmware, enabling relevant features for issue free communication")
|
||||
if self._firmware_detection:
|
||||
if "repetier" in firmware_name.lower() or "anet_a8" in firmware_name.lower():
|
||||
self._logger.info("Detected Repetier firmware, enabling relevant features for issue free communication")
|
||||
|
||||
self._alwaysSendChecksum = True
|
||||
self._blockWhileDwelling = True
|
||||
supportRepetierTargetTemp = True
|
||||
disable_external_heatup_detection = True
|
||||
self._alwaysSendChecksum = True
|
||||
self._blockWhileDwelling = True
|
||||
supportRepetierTargetTemp = True
|
||||
disable_external_heatup_detection = True
|
||||
|
||||
sd_always_available = self._sdAlwaysAvailable
|
||||
self._sdAlwaysAvailable = True
|
||||
if not sd_always_available and not self._sdAvailable:
|
||||
self.initSdCard()
|
||||
sd_always_available = self._sdAlwaysAvailable
|
||||
self._sdAlwaysAvailable = True
|
||||
if not sd_always_available and not self._sdAvailable:
|
||||
self.initSdCard()
|
||||
|
||||
elif "reprapfirmware" in firmware_name.lower():
|
||||
self._logger.info("Detected RepRapFirmware, enabling relevant features for issue free communication")
|
||||
self._sdRelativePath = True
|
||||
elif "reprapfirmware" in firmware_name.lower():
|
||||
self._logger.info("Detected RepRapFirmware, enabling relevant features for issue free communication")
|
||||
self._sdRelativePath = True
|
||||
|
||||
elif "malyan" in firmware_name.lower():
|
||||
self._logger.info("Detected Malyan firmware, enabling relevant features for issue free communication")
|
||||
elif "malyan" in firmware_name.lower():
|
||||
self._logger.info("Detected Malyan firmware, enabling relevant features for issue free communication")
|
||||
|
||||
self._alwaysSendChecksum = True
|
||||
self._blockWhileDwelling = True
|
||||
self._alwaysSendChecksum = True
|
||||
self._blockWhileDwelling = True
|
||||
|
||||
sd_always_available = self._sdAlwaysAvailable
|
||||
self._sdAlwaysAvailable = True
|
||||
if not sd_always_available and not self._sdAvailable:
|
||||
self.initSdCard()
|
||||
sd_always_available = self._sdAlwaysAvailable
|
||||
self._sdAlwaysAvailable = True
|
||||
if not sd_always_available and not self._sdAvailable:
|
||||
self.initSdCard()
|
||||
|
||||
elif "teacup" in firmware_name.lower():
|
||||
self._logger.info("Detected Teacup firmware, enabling relevant features for issue free communication")
|
||||
elif "teacup" in firmware_name.lower():
|
||||
self._logger.info("Detected Teacup firmware, enabling relevant features for issue free communication")
|
||||
|
||||
disable_external_heatup_detection = True # see #2854
|
||||
disable_external_heatup_detection = True # see #2854
|
||||
|
||||
elif "klipper" in firmware_name.lower():
|
||||
self._logger.info("Detected Klipper firmware, enabling relevant features for issue free communication")
|
||||
elif "klipper" in firmware_name.lower():
|
||||
self._logger.info("Detected Klipper firmware, enabling relevant features for issue free communication")
|
||||
|
||||
self._unknownCommandsNeedAck = True
|
||||
self._unknownCommandsNeedAck = True
|
||||
|
||||
self._firmware_info_received = True
|
||||
self._firmware_info = data
|
||||
|
||||
Binary file not shown.
@@ -7,8 +7,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OctoPrint\n"
|
||||
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
|
||||
"POT-Creation-Date: 2020-02-10 16:58+0100\n"
|
||||
"PO-Revision-Date: 2020-02-10 16:59+0100\n"
|
||||
"POT-Creation-Date: 2020-02-26 09:14+0100\n"
|
||||
"PO-Revision-Date: 2020-02-26 09:15+0100\n"
|
||||
"Last-Translator: Gina Häußge <osd@foosel.net>\n"
|
||||
"Language: de\n"
|
||||
"Language-Team: German (http://www.transifex.com/projects/p/octoprint/language/de/)\n"
|
||||
@@ -192,7 +192,7 @@ msgstr "Erlaubt die Verwaltung von Ankündigungen. Beinhaltet die \"Read announc
|
||||
msgid "Announcements"
|
||||
msgstr "Ankündigungen"
|
||||
|
||||
#: src/octoprint/plugins/announcements/__init__.py:533
|
||||
#: src/octoprint/plugins/announcements/__init__.py:536
|
||||
msgid "Without this plugin you might miss important announcements regarding security or other critical issues concerning OctoPrint."
|
||||
msgstr "Ohne dieses Plugin könntest du wichtige Benachrichtigung hinsichtlich Security oder kritischer Fehler in OctoPrint verpassen."
|
||||
|
||||
@@ -444,7 +444,7 @@ msgstr "Erlaubt Zugriff auf und Wiederherstellung von Backups"
|
||||
msgid "Backup & Restore"
|
||||
msgstr "Sicherung & Wiederherstellung"
|
||||
|
||||
#: src/octoprint/plugins/backup/__init__.py:967
|
||||
#: src/octoprint/plugins/backup/__init__.py:970
|
||||
msgid "Without this plugin you will no longer be able to backup & restore your OctoPrint settings and data."
|
||||
msgstr "Ohne dieses Plugin kannst du deine OctoPrint Einstellung und Daten nicht länger sichern & wiederherstellen."
|
||||
|
||||
@@ -667,13 +667,13 @@ msgid "Server Commands"
|
||||
msgstr "Serverbefehle"
|
||||
|
||||
#: src/octoprint/plugins/corewizard/subwizards.py:50
|
||||
#: src/octoprint/server/views.py:642
|
||||
#: src/octoprint/server/views.py:623
|
||||
msgid "Webcam & Timelapse"
|
||||
msgstr "Webcam & Zeitraffer"
|
||||
|
||||
#: src/octoprint/plugins/corewizard/subwizards.py:65
|
||||
#: src/octoprint/plugins/corewizard/templates/corewizard_acl_wizard.jinja2:1
|
||||
#: src/octoprint/server/views.py:648
|
||||
#: src/octoprint/server/views.py:629
|
||||
msgid "Access Control"
|
||||
msgstr "Zugangsbeschränkung"
|
||||
|
||||
@@ -765,6 +765,7 @@ msgstr "<p>\n"
|
||||
"</p>"
|
||||
|
||||
#: src/octoprint/plugins/corewizard/templates/corewizard_acl_wizard.jinja2:27
|
||||
#: src/octoprint/plugins/loginui/templates/loginui_index.jinja2:24
|
||||
#: src/octoprint/templates/navbar/login.jinja2:7
|
||||
#: src/octoprint/templates/navbar/login.jinja2:8
|
||||
#: src/octoprint/templates/snippets/settings/accesscontrol/users.jinja2:83
|
||||
@@ -772,6 +773,7 @@ msgid "Username"
|
||||
msgstr "Username"
|
||||
|
||||
#: src/octoprint/plugins/corewizard/templates/corewizard_acl_wizard.jinja2:33
|
||||
#: src/octoprint/plugins/loginui/templates/loginui_index.jinja2:25
|
||||
#: src/octoprint/templates/dialogs/usersettings/access.jinja2:3
|
||||
#: src/octoprint/templates/navbar/login.jinja2:10
|
||||
#: src/octoprint/templates/navbar/login.jinja2:11
|
||||
@@ -1145,7 +1147,7 @@ msgstr "\n"
|
||||
msgid "Allows to download and delete log files and list and set log levels."
|
||||
msgstr "Erlaubt den Download von Logdateien sowie deren Löschung und das Setzen von Loglevels."
|
||||
|
||||
#: src/octoprint/plugins/logging/__init__.py:223
|
||||
#: src/octoprint/plugins/logging/__init__.py:226
|
||||
msgid "Without this plugin you will no longer be able to retrieve OctoPrint's logs or modify the current logging levels through the web interface."
|
||||
msgstr "Ohne dieses Plugin kannst du OctoPrints Logfiles nicht mehr über das Webinterface herunterladen und auch die aktuellen Loglevel modifizieren."
|
||||
|
||||
@@ -1224,6 +1226,40 @@ msgstr "Entfernen"
|
||||
msgid "Add"
|
||||
msgstr "Hinzufügen"
|
||||
|
||||
#: src/octoprint/plugins/loginui/__init__.py:115
|
||||
msgid "Without this plugin there will be no dedicated login page for users in case anonymous read only access is disabled - instead your non logged in visitors will get a broken UI."
|
||||
msgstr "Ohne dieses Plugin wird es keine Loginpage für User geben, falls anonymer Readonly-Zugriff deaktiviert ist - statt dessen wird deinen nicht eingeloggten Nutzerne eine kaputte UI präsentiert."
|
||||
|
||||
#: src/octoprint/plugins/loginui/templates/loginui_index.jinja2:19
|
||||
msgid "Please log in"
|
||||
msgstr "Bitte einloggen"
|
||||
|
||||
#: src/octoprint/plugins/loginui/templates/loginui_index.jinja2:21
|
||||
msgid "Incorrect username or password."
|
||||
msgstr "Username oder Passwort inkorrekt."
|
||||
|
||||
#: src/octoprint/plugins/loginui/templates/loginui_index.jinja2:22
|
||||
msgid "Server is currently offline."
|
||||
msgstr "Der Server ist offline."
|
||||
|
||||
#: src/octoprint/plugins/loginui/templates/loginui_index.jinja2:22
|
||||
msgid "Reconnect..."
|
||||
msgstr "Erneut verbinden..."
|
||||
|
||||
#: src/octoprint/plugins/loginui/templates/loginui_index.jinja2:26
|
||||
#: src/octoprint/templates/navbar/login.jinja2:9
|
||||
msgid "Forgot password?"
|
||||
msgstr "Passwort vergessen?"
|
||||
|
||||
#: src/octoprint/plugins/loginui/templates/loginui_index.jinja2:28
|
||||
#: src/octoprint/templates/navbar/login.jinja2:13
|
||||
msgid "Remember me"
|
||||
msgstr "Login merken"
|
||||
|
||||
#: src/octoprint/plugins/loginui/templates/loginui_index.jinja2:30
|
||||
msgid "Log in"
|
||||
msgstr "Einloggen"
|
||||
|
||||
#: src/octoprint/plugins/pi_support/__init__.py:199
|
||||
msgid "Allows to check for the Pi's throttling status and environment info"
|
||||
msgstr "Erlaubt die Abfrage des Throttlestatus und der Umgebungsinformationen des Raspberry Pis."
|
||||
@@ -1660,7 +1696,7 @@ msgid "\n"
|
||||
msgstr "OctoPrint scheint zur Zeit keine Verbindung zum Internet zu haben. Daher ist es nicht möglich, neue Plugins aus dem Pluginrepository oder von URL zu installieren."
|
||||
|
||||
#: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:39
|
||||
#: src/octoprint/server/views.py:554
|
||||
#: src/octoprint/server/views.py:535
|
||||
msgid "Plugins"
|
||||
msgstr "Plugins"
|
||||
|
||||
@@ -1999,7 +2035,7 @@ msgid "Python"
|
||||
msgstr "Python"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:588
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1192
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1195
|
||||
msgid "pip"
|
||||
msgstr "pip"
|
||||
|
||||
@@ -2007,13 +2043,13 @@ msgstr "pip"
|
||||
msgid "setuptools"
|
||||
msgstr "setuptools"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:686
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:689
|
||||
#: src/octoprint/plugins/softwareupdate/templates/softwareupdate_wizard.jinja2:1
|
||||
msgid "Software Update"
|
||||
msgstr "Software Update"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1134
|
||||
#: src/octoprint/server/views.py:646
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1137
|
||||
#: src/octoprint/server/views.py:627
|
||||
#: src/octoprint/static/js/app/viewmodels/appearance.js:99
|
||||
#: src/octoprint/static/js/app/viewmodels/appearance.js:104
|
||||
#: src/octoprint/static/js/app/viewmodels/appearance.js:106
|
||||
@@ -2023,7 +2059,7 @@ msgstr "Software Update"
|
||||
msgid "OctoPrint"
|
||||
msgstr "OctoPrint"
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1334
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1337
|
||||
msgid "Without this plugin OctoPrint will no longer be able to update itself or any of your installed plugins which might put your system at risk."
|
||||
msgstr "Ohne dieses Plugin wird OctoPrint nicht länger in der Lage sein, sich selbst oder deine installierten Plugins zu aktualisierten. Das könnte dein System gefährden."
|
||||
|
||||
@@ -2589,105 +2625,105 @@ msgstr "\n"
|
||||
" Für Details, was genau getrackt wird, schau bitte auf <a href=\"https://tracking.octoprint.org\" target=\"_blank\" rel=\"noopener noreferrer\">tracking.octoprint.org</a>\n"
|
||||
" sowie die <a href=\"https://tracking.octoprint.org/privacy\" target=\"_blank\" rel=\"noopener noreferrer\">Privacy Policy auf tracking.octoprint.org</a>.\n"
|
||||
|
||||
#: src/octoprint/server/views.py:613
|
||||
#: src/octoprint/server/views.py:594
|
||||
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:12
|
||||
msgid "Connection"
|
||||
msgstr "Verbindung"
|
||||
|
||||
#: src/octoprint/server/views.py:614
|
||||
#: src/octoprint/server/views.py:595
|
||||
#: src/octoprint/templates/sidebar/state.jinja2:1
|
||||
msgid "State"
|
||||
msgstr "Status"
|
||||
|
||||
#: src/octoprint/server/views.py:615
|
||||
#: src/octoprint/server/views.py:596
|
||||
msgid "Files"
|
||||
msgstr "Dateien"
|
||||
|
||||
#: src/octoprint/server/views.py:621
|
||||
#: src/octoprint/server/views.py:602
|
||||
msgid "Temperature"
|
||||
msgstr "Temperatur"
|
||||
|
||||
#: src/octoprint/server/views.py:622
|
||||
#: src/octoprint/server/views.py:603
|
||||
msgid "Control"
|
||||
msgstr "Steuerung"
|
||||
|
||||
#: src/octoprint/server/views.py:623
|
||||
#: src/octoprint/server/views.py:604
|
||||
msgid "GCode Viewer"
|
||||
msgstr "GCode Viewer"
|
||||
|
||||
#: src/octoprint/server/views.py:624
|
||||
#: src/octoprint/server/views.py:605
|
||||
msgid "Terminal"
|
||||
msgstr "Terminal"
|
||||
|
||||
#: src/octoprint/server/views.py:625
|
||||
#: src/octoprint/server/views.py:606
|
||||
#: src/octoprint/templates/sidebar/state.jinja2:9
|
||||
msgid "Timelapse"
|
||||
msgstr "Zeitraffer"
|
||||
|
||||
#: src/octoprint/server/views.py:631
|
||||
#: src/octoprint/server/views.py:612
|
||||
msgid "Printer"
|
||||
msgstr "Drucker"
|
||||
|
||||
#: src/octoprint/server/views.py:633
|
||||
#: src/octoprint/server/views.py:614
|
||||
msgid "Serial Connection"
|
||||
msgstr "Serielle Verbindung"
|
||||
|
||||
#: src/octoprint/server/views.py:634
|
||||
#: src/octoprint/server/views.py:615
|
||||
#: src/octoprint/templates/dialogs/settings/printerprofiles.jinja2:1
|
||||
msgid "Printer Profiles"
|
||||
msgstr "Druckerprofile"
|
||||
|
||||
#: src/octoprint/server/views.py:635
|
||||
#: src/octoprint/server/views.py:616
|
||||
msgid "Temperatures"
|
||||
msgstr "Temperaturen"
|
||||
|
||||
#: src/octoprint/server/views.py:636
|
||||
#: src/octoprint/server/views.py:617
|
||||
msgid "Terminal Filters"
|
||||
msgstr "Terminalfilter"
|
||||
|
||||
#: src/octoprint/server/views.py:637
|
||||
#: src/octoprint/server/views.py:618
|
||||
msgid "GCODE Scripts"
|
||||
msgstr "GCODE Scripts"
|
||||
|
||||
#: src/octoprint/server/views.py:639 src/octoprint/server/views.py:641
|
||||
#: src/octoprint/server/views.py:620 src/octoprint/server/views.py:622
|
||||
msgid "Features"
|
||||
msgstr "Funktionen"
|
||||
|
||||
#: src/octoprint/server/views.py:643
|
||||
#: src/octoprint/server/views.py:624
|
||||
msgid "GCODE Visualizer"
|
||||
msgstr "GCode Viewer"
|
||||
|
||||
#: src/octoprint/server/views.py:644
|
||||
#: src/octoprint/server/views.py:625
|
||||
msgid "API"
|
||||
msgstr "API"
|
||||
|
||||
#: src/octoprint/server/views.py:649
|
||||
#: src/octoprint/server/views.py:630
|
||||
#: src/octoprint/templates/dialogs/settings/folders.jinja2:2
|
||||
#: src/octoprint/templates/sidebar/files_header.jinja2:12
|
||||
msgid "Folders"
|
||||
msgstr "Verzeichnisse"
|
||||
|
||||
#: src/octoprint/server/views.py:650
|
||||
#: src/octoprint/server/views.py:631
|
||||
msgid "Appearance"
|
||||
msgstr "Aussehen"
|
||||
|
||||
#: src/octoprint/server/views.py:651
|
||||
#: src/octoprint/server/views.py:632
|
||||
msgid "Server"
|
||||
msgstr "Server"
|
||||
|
||||
#: src/octoprint/server/views.py:657
|
||||
#: src/octoprint/server/views.py:638
|
||||
msgid "Access"
|
||||
msgstr "Zugriff"
|
||||
|
||||
#: src/octoprint/server/views.py:658
|
||||
#: src/octoprint/server/views.py:639
|
||||
msgid "Interface"
|
||||
msgstr "Interface"
|
||||
|
||||
#: src/octoprint/server/views.py:674
|
||||
#: src/octoprint/server/views.py:655
|
||||
msgid "Start"
|
||||
msgstr "Start"
|
||||
|
||||
#: src/octoprint/server/views.py:675
|
||||
#: src/octoprint/server/views.py:656
|
||||
#: src/octoprint/templates/dialogs/wizard.jinja2:57
|
||||
msgid "Finish"
|
||||
msgstr "Beenden"
|
||||
@@ -3858,14 +3894,6 @@ msgstr "Zeitrafferaufnahme fertig"
|
||||
msgid "New timelapse %(movie_prefix)s is done rendering."
|
||||
msgstr "Neue Zeitrafferaufnahme %(movie_prefix)s wurde fertig gerendert"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/uistate.js:32
|
||||
msgid "User unknown or wrong password"
|
||||
msgstr "Nutzer unbekannt oder falsches Passwort"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/uistate.js:36
|
||||
msgid "Your account is deactivated"
|
||||
msgstr "Dein Account ist deaktiviert"
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/usersettings.js:12
|
||||
msgid "Site default"
|
||||
msgstr "Seitenvoreinstellung"
|
||||
@@ -4968,14 +4996,6 @@ msgid "\n"
|
||||
" get you printing in no time!\n"
|
||||
msgstr "Dieser Wizard wird dich nun durch die letzten Schritte begleiten, um deine OctoPrint Instanz fertig einzurichten.\n"
|
||||
|
||||
#: src/octoprint/templates/navbar/login.jinja2:9
|
||||
msgid "Forgot password?"
|
||||
msgstr "Passwort vergessen?"
|
||||
|
||||
#: src/octoprint/templates/navbar/login.jinja2:13
|
||||
msgid "Remember me"
|
||||
msgstr "Login merken"
|
||||
|
||||
#: src/octoprint/templates/navbar/login.jinja2:19
|
||||
msgid "User Settings"
|
||||
msgstr "Nutzereinstellungen"
|
||||
@@ -6936,3 +6956,9 @@ msgstr "Zeitrafferaufnahme rendern"
|
||||
|
||||
#~ msgid "Allows to manage settings"
|
||||
#~ msgstr "Erlaubt die Verwaltung der Einstellungen"
|
||||
|
||||
#~ msgid "User unknown or wrong password"
|
||||
#~ msgstr "Nutzer unbekannt oder falsches Passwort"
|
||||
|
||||
#~ msgid "Your account is deactivated"
|
||||
#~ msgstr "Dein Account ist deaktiviert"
|
||||
+76
-53
@@ -6,9 +6,9 @@
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OctoPrint 1.4.0rc5.dev8+g10079b8d9.dirty\n"
|
||||
"Project-Id-Version: OctoPrint 1.4.0rc6.dev17+g054df6874\n"
|
||||
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
|
||||
"POT-Creation-Date: 2020-02-10 16:58+0100\n"
|
||||
"POT-Creation-Date: 2020-02-26 09:14+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@@ -223,7 +223,7 @@ msgstr ""
|
||||
msgid "Announcements"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/announcements/__init__.py:533
|
||||
#: src/octoprint/plugins/announcements/__init__.py:536
|
||||
msgid ""
|
||||
"Without this plugin you might miss important announcements regarding "
|
||||
"security or other critical issues concerning OctoPrint."
|
||||
@@ -483,7 +483,7 @@ msgstr ""
|
||||
msgid "Backup & Restore"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/backup/__init__.py:967
|
||||
#: src/octoprint/plugins/backup/__init__.py:970
|
||||
msgid ""
|
||||
"Without this plugin you will no longer be able to backup & restore your "
|
||||
"OctoPrint settings and data."
|
||||
@@ -730,13 +730,13 @@ msgid "Server Commands"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/corewizard/subwizards.py:50
|
||||
#: src/octoprint/server/views.py:642
|
||||
#: src/octoprint/server/views.py:623
|
||||
msgid "Webcam & Timelapse"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/corewizard/subwizards.py:65
|
||||
#: src/octoprint/plugins/corewizard/templates/corewizard_acl_wizard.jinja2:1
|
||||
#: src/octoprint/server/views.py:648
|
||||
#: src/octoprint/server/views.py:629
|
||||
msgid "Access Control"
|
||||
msgstr ""
|
||||
|
||||
@@ -831,6 +831,7 @@ msgid ""
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/corewizard/templates/corewizard_acl_wizard.jinja2:27
|
||||
#: src/octoprint/plugins/loginui/templates/loginui_index.jinja2:24
|
||||
#: src/octoprint/templates/navbar/login.jinja2:7
|
||||
#: src/octoprint/templates/navbar/login.jinja2:8
|
||||
#: src/octoprint/templates/snippets/settings/accesscontrol/users.jinja2:83
|
||||
@@ -838,6 +839,7 @@ msgid "Username"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/corewizard/templates/corewizard_acl_wizard.jinja2:33
|
||||
#: src/octoprint/plugins/loginui/templates/loginui_index.jinja2:25
|
||||
#: src/octoprint/templates/dialogs/usersettings/access.jinja2:3
|
||||
#: src/octoprint/templates/navbar/login.jinja2:10
|
||||
#: src/octoprint/templates/navbar/login.jinja2:11
|
||||
@@ -1230,7 +1232,7 @@ msgstr ""
|
||||
msgid "Allows to download and delete log files and list and set log levels."
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/logging/__init__.py:223
|
||||
#: src/octoprint/plugins/logging/__init__.py:226
|
||||
msgid ""
|
||||
"Without this plugin you will no longer be able to retrieve OctoPrint's "
|
||||
"logs or modify the current logging levels through the web interface."
|
||||
@@ -1311,6 +1313,43 @@ msgstr ""
|
||||
msgid "Add"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/loginui/__init__.py:115
|
||||
msgid ""
|
||||
"Without this plugin there will be no dedicated login page for users in "
|
||||
"case anonymous read only access is disabled - instead your non logged in "
|
||||
"visitors will get a broken UI."
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/loginui/templates/loginui_index.jinja2:19
|
||||
msgid "Please log in"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/loginui/templates/loginui_index.jinja2:21
|
||||
msgid "Incorrect username or password."
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/loginui/templates/loginui_index.jinja2:22
|
||||
msgid "Server is currently offline."
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/loginui/templates/loginui_index.jinja2:22
|
||||
msgid "Reconnect..."
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/loginui/templates/loginui_index.jinja2:26
|
||||
#: src/octoprint/templates/navbar/login.jinja2:9
|
||||
msgid "Forgot password?"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/loginui/templates/loginui_index.jinja2:28
|
||||
#: src/octoprint/templates/navbar/login.jinja2:13
|
||||
msgid "Remember me"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/loginui/templates/loginui_index.jinja2:30
|
||||
msgid "Log in"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/pi_support/__init__.py:199
|
||||
msgid "Allows to check for the Pi's throttling status and environment info"
|
||||
msgstr ""
|
||||
@@ -1789,7 +1828,7 @@ msgid ""
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2:39
|
||||
#: src/octoprint/server/views.py:554
|
||||
#: src/octoprint/server/views.py:535
|
||||
msgid "Plugins"
|
||||
msgstr ""
|
||||
|
||||
@@ -2155,7 +2194,7 @@ msgid "Python"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:588
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1192
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1195
|
||||
msgid "pip"
|
||||
msgstr ""
|
||||
|
||||
@@ -2163,13 +2202,13 @@ msgstr ""
|
||||
msgid "setuptools"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:686
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:689
|
||||
#: src/octoprint/plugins/softwareupdate/templates/softwareupdate_wizard.jinja2:1
|
||||
msgid "Software Update"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1134
|
||||
#: src/octoprint/server/views.py:646
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1137
|
||||
#: src/octoprint/server/views.py:627
|
||||
#: src/octoprint/static/js/app/viewmodels/appearance.js:99
|
||||
#: src/octoprint/static/js/app/viewmodels/appearance.js:104
|
||||
#: src/octoprint/static/js/app/viewmodels/appearance.js:106
|
||||
@@ -2179,7 +2218,7 @@ msgstr ""
|
||||
msgid "OctoPrint"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1334
|
||||
#: src/octoprint/plugins/softwareupdate/__init__.py:1337
|
||||
msgid ""
|
||||
"Without this plugin OctoPrint will no longer be able to update itself or "
|
||||
"any of your installed plugins which might put your system at risk."
|
||||
@@ -2802,105 +2841,105 @@ msgid ""
|
||||
"tracking.octoprint.org</a>.\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/server/views.py:613
|
||||
#: src/octoprint/server/views.py:594
|
||||
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:12
|
||||
msgid "Connection"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/server/views.py:614
|
||||
#: src/octoprint/server/views.py:595
|
||||
#: src/octoprint/templates/sidebar/state.jinja2:1
|
||||
msgid "State"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/server/views.py:615
|
||||
#: src/octoprint/server/views.py:596
|
||||
msgid "Files"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/server/views.py:621
|
||||
#: src/octoprint/server/views.py:602
|
||||
msgid "Temperature"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/server/views.py:622
|
||||
#: src/octoprint/server/views.py:603
|
||||
msgid "Control"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/server/views.py:623
|
||||
#: src/octoprint/server/views.py:604
|
||||
msgid "GCode Viewer"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/server/views.py:624
|
||||
#: src/octoprint/server/views.py:605
|
||||
msgid "Terminal"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/server/views.py:625
|
||||
#: src/octoprint/server/views.py:606
|
||||
#: src/octoprint/templates/sidebar/state.jinja2:9
|
||||
msgid "Timelapse"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/server/views.py:631
|
||||
#: src/octoprint/server/views.py:612
|
||||
msgid "Printer"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/server/views.py:633
|
||||
#: src/octoprint/server/views.py:614
|
||||
msgid "Serial Connection"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/server/views.py:634
|
||||
#: src/octoprint/server/views.py:615
|
||||
#: src/octoprint/templates/dialogs/settings/printerprofiles.jinja2:1
|
||||
msgid "Printer Profiles"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/server/views.py:635
|
||||
#: src/octoprint/server/views.py:616
|
||||
msgid "Temperatures"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/server/views.py:636
|
||||
#: src/octoprint/server/views.py:617
|
||||
msgid "Terminal Filters"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/server/views.py:637
|
||||
#: src/octoprint/server/views.py:618
|
||||
msgid "GCODE Scripts"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/server/views.py:639 src/octoprint/server/views.py:641
|
||||
#: src/octoprint/server/views.py:620 src/octoprint/server/views.py:622
|
||||
msgid "Features"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/server/views.py:643
|
||||
#: src/octoprint/server/views.py:624
|
||||
msgid "GCODE Visualizer"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/server/views.py:644
|
||||
#: src/octoprint/server/views.py:625
|
||||
msgid "API"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/server/views.py:649
|
||||
#: src/octoprint/server/views.py:630
|
||||
#: src/octoprint/templates/dialogs/settings/folders.jinja2:2
|
||||
#: src/octoprint/templates/sidebar/files_header.jinja2:12
|
||||
msgid "Folders"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/server/views.py:650
|
||||
#: src/octoprint/server/views.py:631
|
||||
msgid "Appearance"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/server/views.py:651
|
||||
#: src/octoprint/server/views.py:632
|
||||
msgid "Server"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/server/views.py:657
|
||||
#: src/octoprint/server/views.py:638
|
||||
msgid "Access"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/server/views.py:658
|
||||
#: src/octoprint/server/views.py:639
|
||||
msgid "Interface"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/server/views.py:674
|
||||
#: src/octoprint/server/views.py:655
|
||||
msgid "Start"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/server/views.py:675
|
||||
#: src/octoprint/server/views.py:656
|
||||
#: src/octoprint/templates/dialogs/wizard.jinja2:57
|
||||
msgid "Finish"
|
||||
msgstr ""
|
||||
@@ -4186,14 +4225,6 @@ msgstr ""
|
||||
msgid "New timelapse %(movie_prefix)s is done rendering."
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/uistate.js:32
|
||||
msgid "User unknown or wrong password"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/uistate.js:36
|
||||
msgid "Your account is deactivated"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/static/js/app/viewmodels/usersettings.js:12
|
||||
msgid "Site default"
|
||||
msgstr ""
|
||||
@@ -5476,14 +5507,6 @@ msgid ""
|
||||
" get you printing in no time!\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/navbar/login.jinja2:9
|
||||
msgid "Forgot password?"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/navbar/login.jinja2:13
|
||||
msgid "Remember me"
|
||||
msgstr ""
|
||||
|
||||
#: src/octoprint/templates/navbar/login.jinja2:19
|
||||
msgid "User Settings"
|
||||
msgstr ""
|
||||
|
||||
Reference in new issue
Block a user