Compare commits

...
9 Commits
Author SHA1 Message Date
Gina Häußge f67c15a9a4 🔖 Preparing release of 1.5.0 2020-11-30 14:30:46 +01:00
Gina Häußge 308ac450e7 Merge branch 'master' into staging/maintenance 2020-11-25 15:44:32 +01:00
Gina Häußge d80a27a64a 📝 settings API: only document differences to config.yaml 2020-11-25 15:44:19 +01:00
Gina Häußge a4630df622 📌 Pin prettier and black versions 2020-11-25 11:35:40 +01:00
Gina Häußge 149161694d 🔖 staging/maintenance is now 1.5.0rc4.dev 2020-11-18 16:31:01 +01:00
Gina Häußge 5e7ea35239 🔖 Preparing release of 1.5.0rc3 2020-11-18 13:53:07 +01:00
Gina Häußge 4768a7eb5a 🐛 Value AND key might need str-conversion
Closes #3825
2020-11-18 13:09:51 +01:00
Gina Häußge 84fb97f82a 🐛 PMGR: Don't use jsonify outside flask context
We've moved `_command_install_archive` into its own thread, so we
must return results instead of jsonify'ing them.

As discovered through #3825
2020-11-18 13:07:58 +01:00
Gina Häußge c30673fac0 🔖 staging/maintenance is now 1.5.0rc3.dev 2020-11-17 16:00:51 +01:00
12 changed files with 190 additions and 136 deletions

No files matched your search

+2 -2
View File
@@ -28,7 +28,7 @@ repos:
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: stable
rev: 20.8b1
hooks:
- id: black
args: ["--config", "black.toml"]
@@ -39,6 +39,6 @@ repos:
additional_dependencies:
- flake8-bugbear
- repo: https://github.com/pre-commit/mirrors-prettier
rev: master
rev: v2.1.2
hooks:
- id: prettier
+3 -3
View File
@@ -27,10 +27,10 @@ improve/.* 1.5.0 42769dad7dda3bc0c6c94e0e8ce832af9b14a565 pep440-dev
# staging/hotfix is the branch for preparation of the 1.4.2 hotfix release
staging/hotfix 1.4.2 3ab84ed7e4c3aaaf71fe0f184b465f25d689f929 pep440-dev
# staging/maintenance is currently the branch for preparation of 1.5.0rc2
# staging/maintenance is currently the branch for preparation of 1.5.0rc4
# so is regressionfix/...
staging/maintenance 1.5.0rc2 b7a45b79bf86339f0b28177ac1eaebb56d00ea37 pep440-dev
regressionfix/.* 1.5.0rc2 b7a45b79bf86339f0b28177ac1eaebb56d00ea37 pep440-dev
staging/maintenance 1.5.0rc4 5e7ea35239908f9ed91895751d8a8202aa76ed4b pep440-dev
regressionfix/.* 1.5.0rc4 5e7ea35239908f9ed91895751d8a8202aa76ed4b pep440-dev
# staging/devel is currently inactive (but has the 1.4.1rc4 namespace)
staging/devel 1.4.1rc4 650d54d1885409fa1d411eb54b9e8c7ff428910f pep440-dev
+1 -1
View File
@@ -68,4 +68,4 @@ thanks to everyone who contributed!
* Sven Mueller
* Ulrich Kempken
and 2107 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel) or via [Github Sponsors](https://github.com/users/foosel/sponsorship)!
and 2116 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel) or via [Github Sponsors](https://github.com/users/foosel/sponsorship)!
+2 -112
View File
@@ -354,84 +354,22 @@ Data model
==========
The data model on the settings API mostly reflects the contents of
:ref:`config.yaml <sec-configuration-config_yaml>`. The settings tree
returned by the API contains the following fields, which are directly
mapped from the same fields in ``config.yaml`` unless otherwise noted:
:ref:`config.yaml <sec-configuration-config_yaml>`, which are directly
mapped, with the following exceptions:
.. list-table::
:header-rows: 1
* - Field
- Notes
* - ``api.enabled``
-
* - ``api.key``
- Only maps to ``api.key`` in ``config.yaml`` if request is sent with admin rights, set to ``n/a`` otherwise.
Starting with OctoPrint 1.3.3 setting this field via :ref:`the API <sec-api-settings-save>` is not possible,
only :ref:`regenerating it <sec-api-settings-generateapikey>` is supported. Setting a custom value is only
possible through `config.yaml`.
* - ``api.allowCrossOrigin``
-
* - ``appearance.name``
-
* - ``appearance.color``
-
* - ``appearance.colorTransparent``
-
* - ``appearance.defaultLanguage``
-
* - ``appearance.showFahrenheitAlso``
-
* - ``feature.gcodeViewer``
- Maps to ``gcodeViewer.enabled`` in ``config.yaml``
* - ``feature.sizeThreshold``
- Maps to ``gcodeViewer.sizeThreshold`` in ``config.yaml``
* - ``feature.mobileSizeThreshold``
- Maps to ``gcodeViewer.mobileSizeThreshold`` in ``config.yaml``
* - ``feature.temperatureGraph``
-
* - ``feature.waitForStart``
-
* - ``feature.alwaysSendChecksum``
-
* - ``feature.neverSendChecksum``
-
* - ``feature.sdSupport``
-
* - ``feature.sdRelativePath``
-
* - ``feature.sdAlwaysAvailable``
-
* - ``feature.swallowOkAfterResend``
-
* - ``feature.repetierTargetTemp``
-
* - ``feature.externalHeatupDetection``
-
* - ``feature.keyboardControl``
-
* - ``feature.pollWatched``
-
* - ``feature.ignoreIdenticalResends``
-
* - ``feature.modelSizeDetection``
-
* - ``feature.firmwareDetection``
-
* - ``feature.printCancelConfirmation``
-
* - ``feature.blockWhileDwelling``
-
* - ``folder.uploads``
-
* - ``folder.timelapse``
-
* - ``folder.timelapseTmp``
- Maps to ``folder.timelapse_tmp`` in ``config.yaml``
* - ``folder.logs``
-
* - ``folder.watched``
-
* - ``plugins``
- Plugin settings as available from ``config.yaml`` and :class:`~octoprint.plugin.SettingsPlugin` implementations
* - ``printer.defaultExtrusionLength``
@@ -446,8 +384,6 @@ mapped from the same fields in ``config.yaml`` unless otherwise noted:
- Available serial ports
* - ``serial.baudrateOptions``
- Available serial baudrates
* - ``serial.autoconnect``
-
* - ``serial.timeoutConnection``
- Maps to ``serial.timeout.connection`` in ``config.yaml``
* - ``serial.timeoutDetection``
@@ -460,50 +396,18 @@ mapped from the same fields in ``config.yaml`` unless otherwise noted:
- Maps to ``serial.timeout.temperatureTargetSet`` in ``config.yaml``
* - ``serial.timeoutSdStatus``
- Maps to ``serial.timeout.sdStatus`` in ``config.yaml``
* - ``serial.log``
-
* - ``serial.additionalPorts``
-
* - ``serial.additionalBaudrates``
-
* - ``serial.longRunningCommands``
-
* - ``serial.checksumRequiringCommands``
-
* - ``serial.helloCommand``
-
* - ``serial.ignoreErrorsFromFirmware``
-
* - ``serial.disconnectOnErrors``
-
* - ``serial.triggerOkForM29``
-
* - ``serial.supportResendsWIthoutOk``
-
* - ``serial.maxTimeoutsIdle``
- Maps to ``serial.maxCommunicationTimeouts.idle`` in ``config.yaml``
* - ``serial.maxTimeoutsPrinting``
- Maps to ``serial.maxCommunicationTimeouts.printing`` in ``config.yaml``
* - ``serial.maxTimeoutsLong``
- Maps to ``serial.maxCommunicationTimeouts.long`` in ``config.yaml``
* - ``server.commands.systemShutdownCommand``
-
* - ``server.commands.systemRestartCommand``
-
* - ``server.commands.serverRestartCommand``
-
* - ``server.diskspace.warning``
-
* - ``server.diskspace.critical``
-
* - ``system.actions``
- Whole subtree taken from ``config.yaml``
* - ``system.events``
- Whole subtree taken from ``config.yaml``
* - ``temperature.profiles``
- Whole subtree taken from ``config.yaml``
* - ``temperature.cutoff``
-
* - ``terminalFilters``
- Whole subtree taken from ``config.yaml``
* - ``webcam.streamUrl``
@@ -512,17 +416,3 @@ mapped from the same fields in ``config.yaml`` unless otherwise noted:
- Maps to ``webcam.snapshot`` in ``config.yaml``
* - ``webcam.ffmpegPath``
- Maps to ``webcam.ffmpeg`` in ``config.yaml``
* - ``webcam.bitrate``
-
* - ``webcam.ffmpegThreads``
-
* - ``webcam.ffmpegVideoCodec``
-
* - ``webcam.watermark``
-
* - ``webcam.flipH``
-
* - ``webcam.flipV``
-
* - ``webcam.rotate90``
-
@@ -21,10 +21,10 @@ from octoprint.util.version import (
)
SENTRY_URL_SERVER = (
"https://5604af9afe444b44961b62f2f4e35395@o118517.ingest.sentry.io/1373987"
"https://53f015cb6c3046088019baed6ff5b653@o118517.ingest.sentry.io/1373987"
)
SENTRY_URL_COREUI = (
"https://d8119fba01a0429185ead6dae19ca45d@o118517.ingest.sentry.io/1374096"
"https://993cc8f6848b4ccca8c66be5769ccb50@o118517.ingest.sentry.io/1374096"
)
SETTINGS_DEFAULTS = {
@@ -789,7 +789,7 @@ class PluginManagerPlugin(
"for generated output",
}
self._send_result_notification("install", result)
return jsonify(result)
return result
# The final output of a pip install command looks something like this:
#
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: OctoPrint\n"
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
"POT-Creation-Date: 2020-11-17 14:24+0100\n"
"PO-Revision-Date: 2020-11-17 14:27+0100\n"
"POT-Creation-Date: 2020-11-30 14:27+0100\n"
"PO-Revision-Date: 2020-11-30 14:29+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"
@@ -4699,10 +4699,12 @@ msgid "\n"
" It's also recommended to create a user account without admin access and use that for third\n"
" party clients where possible.\n"
" "
msgstr "Der globale API Key sollte am Besten nicht mehr verwendet werden. Es ist ein einzelner Key, der vollen Adminzugriff auf die gesamte OctoPrint Instanz gibt.\n"
"Stattdessen solltest du individuelle Application Keys für Third-Party-Clients erstellen. Dadurch bekommen diese die Zugriffsrechte des jeweiligen für die Erstellung \n"
"des Keys genutzten Nutzeraccounts und du kannst einem Client auch einfach wieder den Zugriff entziehen, oder für alle anderen den Key ändern zu müssen.\n"
"Es ist außerdem empfohlen, einen Useraccount ohne Adminzugriff zu erstellen und so möglich für Third-Party-Clients zu verwenden."
msgstr "\n"
" Der globale API Key sollte am Besten nicht mehr verwendet werden. Es ist ein einzelner Key, der vollen Adminzugriff auf die gesamte OctoPrint Instanz gibt.\n"
" Stattdessen solltest du individuelle Application Keys für Third-Party-Clients erstellen. Dadurch bekommen diese die Zugriffsrechte des jeweiligen für die Erstellung \n"
" des Keys genutzten Nutzeraccounts und du kannst einem Client auch einfach wieder den Zugriff entziehen ohne für alle anderen den Key ändern zu müssen.\n"
" Es ist außerdem empfohlen, einen Useraccount ohne Adminzugriff zu erstellen und so möglich für Third-Party-Clients zu verwenden.\n"
" "
#: src/octoprint/templates/dialogs/settings/api.jinja2:23
msgid "Access Application Keys"
@@ -7965,3 +7967,82 @@ msgstr "Zeitrafferaufnahme rendern"
#~ msgid "Resend requests"
#~ msgstr "Resendrequests"
#~ msgid ""
#~ "\n"
#~ " The global API key "
#~ "should best not be used anymore. "
#~ "It's one single key that gives "
#~ "full admin access to\n"
#~ " your whole OctoPrint instance."
#~ " Instead of using it you should "
#~ "create individual Application Keys for\n"
#~ " your third party clients. "
#~ "That way they get permissions matching"
#~ " the user account used for key\n"
#~ ""
#~ " creation and you can "
#~ "also revoke access to one app "
#~ "without having to change the keys "
#~ "for all other apps.\n"
#~ " It's also recommended to "
#~ "create a user account without admin "
#~ "access and use that for third\n"
#~ " party clients where possible.\n"
#~ " "
#~ msgstr ""
#~ "Der globale API Key sollte am "
#~ "Besten nicht mehr verwendet werden. Es"
#~ " ist ein einzelner Key, der vollen"
#~ " Adminzugriff auf die gesamte OctoPrint "
#~ "Instanz gibt.\n"
#~ "Stattdessen solltest du individuelle "
#~ "Application Keys für Third-Party-Clients"
#~ " erstellen. Dadurch bekommen diese die "
#~ "Zugriffsrechte des jeweiligen für die "
#~ "Erstellung \n"
#~ "des Keys genutzten Nutzeraccounts und du"
#~ " kannst einem Client auch einfach "
#~ "wieder den Zugriff entziehen, oder für"
#~ " alle anderen den Key ändern zu "
#~ "müssen.\n"
#~ "Es ist außerdem empfohlen, einen "
#~ "Useraccount ohne Adminzugriff zu erstellen "
#~ "und so möglich für Third-Party-"
#~ "Clients zu verwenden."
#~ msgid "Export"
#~ msgstr "Port"
#~ msgid "Offline after error"
#~ msgstr ""
#~ msgid "Starting to send file to SD"
#~ msgstr ""
#~ msgid ""
#~ "\n"
#~ " It is recommended to no"
#~ " longer use the global API key "
#~ "as it's one single key that gives"
#~ " full admin access\n"
#~ " to your whole OctoPrint "
#~ "instance. <strong>It will be removed in"
#~ " OctoPrint 2.0</strong>.\n"
#~ " Instead of using the "
#~ "global key you should create individual"
#~ " Application Keys for\n"
#~ " your third party clients. "
#~ "That way they get permissions matching"
#~ " the user account used for key\n"
#~ ""
#~ " creation and you can "
#~ "also revoke access to one app "
#~ "without having to change the keys "
#~ "for all other apps.\n"
#~ " It's also recommended to "
#~ "create a user account without admin "
#~ "access and use that for third\n"
#~ " party clients where possible.\n"
#~ " "
#~ msgstr ""
+3 -1
View File
@@ -176,7 +176,9 @@ class CommandlineCaller(object):
# if we are running under windows, make sure there are no unicode strings in the env
if get_os() == "windows" and "env" in kwargs:
kwargs["env"] = dict((k, to_native_str(v)) for k, v in kwargs["env"].items())
kwargs["env"] = dict(
(to_native_str(k), to_native_str(v)) for k, v in kwargs["env"].items()
)
delimiter = kwargs.get("delimiter", b"\n")
try:
Binary file not shown.
+87 -6
View File
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: OctoPrint\n"
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
"POT-Creation-Date: 2020-11-17 14:24+0100\n"
"PO-Revision-Date: 2020-11-17 14:27+0100\n"
"POT-Creation-Date: 2020-11-30 14:27+0100\n"
"PO-Revision-Date: 2020-11-30 14:29+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"
@@ -4699,10 +4699,12 @@ msgid "\n"
" It's also recommended to create a user account without admin access and use that for third\n"
" party clients where possible.\n"
" "
msgstr "Der globale API Key sollte am Besten nicht mehr verwendet werden. Es ist ein einzelner Key, der vollen Adminzugriff auf die gesamte OctoPrint Instanz gibt.\n"
"Stattdessen solltest du individuelle Application Keys für Third-Party-Clients erstellen. Dadurch bekommen diese die Zugriffsrechte des jeweiligen für die Erstellung \n"
"des Keys genutzten Nutzeraccounts und du kannst einem Client auch einfach wieder den Zugriff entziehen, oder für alle anderen den Key ändern zu müssen.\n"
"Es ist außerdem empfohlen, einen Useraccount ohne Adminzugriff zu erstellen und so möglich für Third-Party-Clients zu verwenden."
msgstr "\n"
" Der globale API Key sollte am Besten nicht mehr verwendet werden. Es ist ein einzelner Key, der vollen Adminzugriff auf die gesamte OctoPrint Instanz gibt.\n"
" Stattdessen solltest du individuelle Application Keys für Third-Party-Clients erstellen. Dadurch bekommen diese die Zugriffsrechte des jeweiligen für die Erstellung \n"
" des Keys genutzten Nutzeraccounts und du kannst einem Client auch einfach wieder den Zugriff entziehen ohne für alle anderen den Key ändern zu müssen.\n"
" Es ist außerdem empfohlen, einen Useraccount ohne Adminzugriff zu erstellen und so möglich für Third-Party-Clients zu verwenden.\n"
" "
#: src/octoprint/templates/dialogs/settings/api.jinja2:23
msgid "Access Application Keys"
@@ -7965,3 +7967,82 @@ msgstr "Zeitrafferaufnahme rendern"
#~ msgid "Resend requests"
#~ msgstr "Resendrequests"
#~ msgid ""
#~ "\n"
#~ " The global API key "
#~ "should best not be used anymore. "
#~ "It's one single key that gives "
#~ "full admin access to\n"
#~ " your whole OctoPrint instance."
#~ " Instead of using it you should "
#~ "create individual Application Keys for\n"
#~ " your third party clients. "
#~ "That way they get permissions matching"
#~ " the user account used for key\n"
#~ ""
#~ " creation and you can "
#~ "also revoke access to one app "
#~ "without having to change the keys "
#~ "for all other apps.\n"
#~ " It's also recommended to "
#~ "create a user account without admin "
#~ "access and use that for third\n"
#~ " party clients where possible.\n"
#~ " "
#~ msgstr ""
#~ "Der globale API Key sollte am "
#~ "Besten nicht mehr verwendet werden. Es"
#~ " ist ein einzelner Key, der vollen"
#~ " Adminzugriff auf die gesamte OctoPrint "
#~ "Instanz gibt.\n"
#~ "Stattdessen solltest du individuelle "
#~ "Application Keys für Third-Party-Clients"
#~ " erstellen. Dadurch bekommen diese die "
#~ "Zugriffsrechte des jeweiligen für die "
#~ "Erstellung \n"
#~ "des Keys genutzten Nutzeraccounts und du"
#~ " kannst einem Client auch einfach "
#~ "wieder den Zugriff entziehen, oder für"
#~ " alle anderen den Key ändern zu "
#~ "müssen.\n"
#~ "Es ist außerdem empfohlen, einen "
#~ "Useraccount ohne Adminzugriff zu erstellen "
#~ "und so möglich für Third-Party-"
#~ "Clients zu verwenden."
#~ msgid "Export"
#~ msgstr "Port"
#~ msgid "Offline after error"
#~ msgstr ""
#~ msgid "Starting to send file to SD"
#~ msgstr ""
#~ msgid ""
#~ "\n"
#~ " It is recommended to no"
#~ " longer use the global API key "
#~ "as it's one single key that gives"
#~ " full admin access\n"
#~ " to your whole OctoPrint "
#~ "instance. <strong>It will be removed in"
#~ " OctoPrint 2.0</strong>.\n"
#~ " Instead of using the "
#~ "global key you should create individual"
#~ " Application Keys for\n"
#~ " your third party clients. "
#~ "That way they get permissions matching"
#~ " the user account used for key\n"
#~ ""
#~ " creation and you can "
#~ "also revoke access to one app "
#~ "without having to change the keys "
#~ "for all other apps.\n"
#~ " It's also recommended to "
#~ "create a user account without admin "
#~ "access and use that for third\n"
#~ " party clients where possible.\n"
#~ " "
#~ msgstr ""
+2 -2
View File
@@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: OctoPrint 1.5.0rc2.dev19+gf2ed1ebc7\n"
"Project-Id-Version: OctoPrint 1.5.0rc4.dev4+g308ac450e.dirty\n"
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
"POT-Creation-Date: 2020-11-17 14:24+0100\n"
"POT-Creation-Date: 2020-11-30 14:27+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"