From 1c43e193ba1b384c069c3b7c39b42d48220551b0 Mon Sep 17 00:00:00 2001 From: Daniele Forsi Date: Mon, 19 Mar 2018 18:55:14 +0100 Subject: [PATCH 1/5] Remove unneeded format() filter --- .../templates/dialogs/settings/serialconnection.jinja2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/octoprint/templates/dialogs/settings/serialconnection.jinja2 b/src/octoprint/templates/dialogs/settings/serialconnection.jinja2 index 9cfd52039..52c90663b 100644 --- a/src/octoprint/templates/dialogs/settings/serialconnection.jinja2 +++ b/src/octoprint/templates/dialogs/settings/serialconnection.jinja2 @@ -40,7 +40,7 @@
- {{ _('Use this to define additional serial port baud rates to list for connecting with, e.g. 123456. Comma separated.')|format(glob_url="http://docs.python.org/2/library/glob.html") }} + {{ _('Use this to define additional serial port baud rates to list for connecting with, e.g. 123456. Comma separated.') }}
From 819d4d0fdffcd352288bd5adc293450b3d44d19e Mon Sep 17 00:00:00 2001 From: Daniele Forsi Date: Tue, 20 Mar 2018 16:12:49 +0100 Subject: [PATCH 2/5] Expand the description of custom system commands Fixes #2487 --- docs/configuration/config_yaml.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/configuration/config_yaml.rst b/docs/configuration/config_yaml.rst index 790702fd1..7d4107174 100644 --- a/docs/configuration/config_yaml.rst +++ b/docs/configuration/config_yaml.rst @@ -1092,7 +1092,12 @@ System Use the following settings to add custom system commands to the "System" dropdown within OctoPrint's top bar. -Commands consist of a name, an action identifier, the commandline to execute and an optional confirmation message to +Commands consist of a ``name`` shown to the user, an ``action`` identifier used by the code and the actual +``command`` including any argument needed for its execution. +By default OctoPrint blocks until the command has returned so that the exit code can be used to show a success +or failure message; use the flag ``async: true`` for commands that don't return. + +Optionally you can add a confirmation message to display before actually executing the command (should be set to False if a confirmation dialog is not desired). The following example defines a command for shutting down the system under Linux. It assumes that the user under which From cb18d3fe32cebd70e6cedc22a1a7484da362e41b Mon Sep 17 00:00:00 2001 From: Daniele Forsi Date: Wed, 21 Mar 2018 12:52:05 +0100 Subject: [PATCH 3/5] Fix some invalid HTML Fixes 4 kinds of errors found with https://validator.w3.org/nu/#textarea Bad value javascript for attribute lang on element script Bad character after < . Probable cause: Unescaped < . Try escaping it as < . The element label must not appear as a descendant of the label element. Element legend not allowed as child of element form in this context. Note: the change related to seems big because of the increased indent of the existing code (use "git diff --ignore-all-space" or "git log --patch --ignore-all-space" to see the lines actually added). --- .../templates/pluginmanager_settings.jinja2 | 91 ++++++++++--------- .../dialogs/settings/serialconnection.jinja2 | 2 +- src/octoprint/templates/initscript.jinja2 | 2 +- .../templates/tabs/gcodeviewer.jinja2 | 4 +- 4 files changed, 53 insertions(+), 46 deletions(-) diff --git a/src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2 b/src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2 index 6541c2b58..f66f9f35b 100644 --- a/src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2 +++ b/src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2 @@ -245,57 +245,64 @@

{% trans %}You should normally not have to change any of the following settings, they are purely provided for convenience here.{% endtrans %}

- {{ _('Plugin repository configuration') }} +
+ {{ _('Plugin repository configuration') }} -
- -
- -
-
-
- -
-
- - min +
+ +
+
-
- - {{ _('Notices configuration') }} - -
- -
- -
-
-
- -
-
- - min +
+ +
+
+ + min +
-
+
- {{ _('pip configuration') }} +
+ {{ _('Notices configuration') }} -
- -
- +
+ +
+ +
-
-
-
- +
+ +
+
+ + min +
+
-
+
+ +
+ {{ _('pip configuration') }} + +
+ +
+ +
+
+
+
+ +
+
+
+
diff --git a/src/octoprint/templates/initscript.jinja2 b/src/octoprint/templates/initscript.jinja2 index 722830bf3..7ffa07a26 100644 --- a/src/octoprint/templates/initscript.jinja2 +++ b/src/octoprint/templates/initscript.jinja2 @@ -1,4 +1,4 @@ -