" + gettext("Be sure to read through any linked release notes, especially those for OctoPrint since they might contain important information you need to know before upgrading.") + "
"
- + "
" + gettext("This action may disrupt any ongoing print jobs.") + "
"
- + "
" + gettext("Depending on your printer's controller and general setup, restarting OctoPrint may cause your printer to be reset.") + "
"
- + "
" + gettext("Are you sure you want to proceed?") + "
";
- showConfirmationDialog({
- title: gettext("Are you sure you want to update now?"),
- html: html,
- proceed: gettext("Proceed"),
- onproceed: function() {
- self.performUpdate((force === true),
- _.map(items, function(info) { return info.key }));
- },
- onclose: function() {
- self._updateClicked = false;
- }
- });
+ return;
}
+ if (self.piSupport && self.piSupport.currentIssue()) {
+ self._showPopup({
+ title: gettext("Can't update while throttled"),
+ text: gettext("Your system is currently throttled. OctoPrint refuses to run updates while in this state due to possible stability issues."),
+ type: "error"
+ });
+ self._updateClicked = false;
+ return;
+ }
+
+ var html = "
" + gettext("This will update the following components and restart the server:") + "
" + gettext("Be sure to read through any linked release notes, especially those for OctoPrint since they might contain important information you need to know before upgrading.") + "
"
+ + "
" + gettext("This action may disrupt any ongoing print jobs.") + "
"
+ + "
" + gettext("Depending on your printer's controller and general setup, restarting OctoPrint may cause your printer to be reset.") + "
"
+ + "
" + gettext("Are you sure you want to proceed?") + "
";
+ showConfirmationDialog({
+ title: gettext("Are you sure you want to update now?"),
+ html: html,
+ proceed: gettext("Proceed"),
+ onproceed: function() {
+ self.performUpdate((force === true),
+ _.map(items, function(info) { return info.key }));
+ },
+ onclose: function() {
+ self._updateClicked = false;
+ }
+ });
};
self._showWorkingDialog = function(title) {
@@ -795,7 +814,8 @@ $(function() {
OCTOPRINT_VIEWMODELS.push({
construct: SoftwareUpdateViewModel,
- dependencies: ["loginStateViewModel", "printerStateViewModel", "settingsViewModel"],
+ dependencies: ["loginStateViewModel", "printerStateViewModel", "settingsViewModel", "piSupportViewModel"],
+ optional: ["piSupportViewModel"],
elements: ["#settings_plugin_softwareupdate", "#softwareupdate_confirmation_dialog", "#wizard_plugin_softwareupdate"]
});
});
diff --git a/src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2 b/src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2
index 0871b6fc8..9be154fe6 100644
--- a/src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2
+++ b/src/octoprint/plugins/softwareupdate/templates/softwareupdate_settings.jinja2
@@ -32,6 +32,26 @@
Please take a look at this FAQ entry on how to proceed.
{% endtrans %}
+
{% trans %}
+
+ OctoPrint is running on a throttled system, updates are disabled.
+
+
+ To reduce the likelihood of running into update problems on throttled and hence potentially unstable systems
+ as seen in the past, OctoPrint doesn't support updating under such conditions. Please fix the current issue
+ before trying to update. Take a look at the displayed warning in the navigation bar to learn about what is
+ wrong and to get hints on how to solve the problem.
+
+{% endtrans %}
+
{% trans %}
+
+ OctoPrint is currently printing, updates are disabled.
+
+
+ Running updates is not supported while printing in order to not risk any kind of disruption to the print job.
+ Please let the print finish before trying to update.
+