Feature flag to enable legacy plugin assets
Work around issues like #2246 until the plugins that are affected are fixed. To be removed in 1.3.8. See also #2200
This commit is contained in:
parent
aa65671ac7
commit
5c20e264e2
5 changed files with 29 additions and 4 deletions
|
|
@ -1261,7 +1261,12 @@ class Server(object):
|
|||
|
||||
# JS
|
||||
js_filters = ["sourcemap_remove", "js_delimiter_bundler"]
|
||||
js_plugin_filters = ["sourcemap_remove", "js_delimiter_bundler"] # TODO: replace with IIFE wrapper again, see #2200
|
||||
|
||||
if self._settings.getBoolean(["feature", "legacyPluginAssets"]):
|
||||
# TODO remove again in 1.3.8
|
||||
js_plugin_filters = ["sourcemap_remove", "js_delimiter_bundler"]
|
||||
else:
|
||||
js_plugin_filters = ["sourcemap_remove", "js_plugin_delimiter_bundler"]
|
||||
|
||||
js_libs_bundle = Bundle(*js_libs, output="webassets/packed_libs.js", filters=",".join(js_filters))
|
||||
|
||||
|
|
|
|||
|
|
@ -130,7 +130,8 @@ def getSettings():
|
|||
"firmwareDetection": s.getBoolean(["feature", "firmwareDetection"]),
|
||||
"printCancelConfirmation": s.getBoolean(["feature", "printCancelConfirmation"]),
|
||||
"blockWhileDwelling": s.getBoolean(["feature", "blockWhileDwelling"]),
|
||||
"g90InfluencesExtruder": s.getBoolean(["feature", "g90InfluencesExtruder"])
|
||||
"g90InfluencesExtruder": s.getBoolean(["feature", "g90InfluencesExtruder"]),
|
||||
"legacyPluginAssets": s.getBoolean(["feature", "legacyPluginAssets"])
|
||||
},
|
||||
"serial": {
|
||||
"port": connectionOptions["portPreference"],
|
||||
|
|
@ -358,6 +359,7 @@ def _saveSettings(data):
|
|||
if "printCancelConfirmation" in data["feature"]: s.setBoolean(["feature", "printCancelConfirmation"], data["feature"]["printCancelConfirmation"])
|
||||
if "blockWhileDwelling" in data["feature"]: s.setBoolean(["feature", "blockWhileDwelling"], data["feature"]["blockWhileDwelling"])
|
||||
if "g90InfluencesExtruder" in data["feature"]: s.setBoolean(["feature", "g90InfluencesExtruder"], data["feature"]["g90InfluencesExtruder"])
|
||||
if "legacyPluginAssets" in data["feature"]: s.setBoolean(["feature", "legacyPluginAssets"], data["feature"]["legacyPluginAssets"])
|
||||
|
||||
if "serial" in data.keys():
|
||||
if "autoconnect" in data["serial"]: s.setBoolean(["serial", "autoconnect"], data["serial"]["autoconnect"])
|
||||
|
|
|
|||
|
|
@ -33,7 +33,9 @@ import uuid
|
|||
import copy
|
||||
import time
|
||||
|
||||
# noinspection PyCompatibility
|
||||
from builtins import bytes
|
||||
# noinspection PyCompatibility
|
||||
from past.builtins import basestring
|
||||
|
||||
try:
|
||||
|
|
@ -223,7 +225,8 @@ default_settings = {
|
|||
"firmwareDetection": True,
|
||||
"printCancelConfirmation": True,
|
||||
"blockWhileDwelling": False,
|
||||
"g90InfluencesExtruder": False
|
||||
"g90InfluencesExtruder": False,
|
||||
"legacyPluginAssets": False # TODO remove again in 1.3.8
|
||||
},
|
||||
"folder": {
|
||||
"uploads": None,
|
||||
|
|
|
|||
|
|
@ -150,6 +150,7 @@ $(function() {
|
|||
self.feature_printCancelConfirmation = ko.observable(undefined);
|
||||
self.feature_blockWhileDwelling = ko.observable(undefined);
|
||||
self.feature_g90InfluencesExtruder = ko.observable(undefined);
|
||||
self.feature_legacyPluginAssets = ko.observable(undefined);
|
||||
|
||||
self.serial_port = ko.observable();
|
||||
self.serial_baudrate = ko.observable();
|
||||
|
|
|
|||
|
|
@ -1,4 +1,18 @@
|
|||
<form class="form-horizontal">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: feature_legacyPluginAssets" id="settings-legacyPluginAssets"> {{ _('Enable legacy plugin asset bundling') }} <span class="label label-info">Compatibility</span>
|
||||
<span class="help-block">{% trans url="https://github.com/foosel/OctoPrint/releases/tag/1.3.6" %}
|
||||
Enable this, save and restart your server if you are running into issues with plugins with OctoPrint
|
||||
1.3.6 or later that used to work with OctoPrint up to version 1.3.5. See <a href="{{ url }}">here</a>
|
||||
for details on why this is happening. Note that this legacy flag will be removed in a future
|
||||
OctoPrint version (currently planned for 1.3.8), so urge the authors of affected plugins to push
|
||||
an update with a fix.
|
||||
{% endtrans %}</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
|
|
@ -52,7 +66,7 @@
|
|||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: feature_firmwareDetection" id="settings-firmwareDetection"> {{ _('Enable automatic firmware detection') }}
|
||||
<span class="help-inline">{% trans %}
|
||||
<span class="help-block">{% trans %}
|
||||
If enabled, OctoPrint will try to figure out your printer's firmware automatically and adjust some communication parameters based on that.
|
||||
If that doesn't work out, or you want more granular control, uncheck this and the parameters in question will become visible for you to adjust.
|
||||
{% endtrans %}</span>
|
||||
|
|
|
|||
Loading…
Reference in a new issue