Merge branch 'maintenance' of github.com:foosel/OctoPrint into maintenance
This commit is contained in:
commit
04da8afb07
29 files changed
+143
-89
No files matched your search
@@ -108,6 +108,8 @@ date of first contribution):
|
||||
* [Piotr Usewicz](https://github.com/pusewicz)
|
||||
* [Aliaksei Pilko](https://github.com/aliaksei135)
|
||||
* [Ben Yarmis](https://github.com/byarmis)
|
||||
* [Florian Heilmann](https://github.com/FHeilmann)
|
||||
* [Ludovico de Nittis](https://github.com/RyuzakiKK)
|
||||
|
||||
OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by
|
||||
[Daid Braam](https://github.com/daid). Parts of its communication layer and
|
||||
|
||||
+1
-1
@@ -13,5 +13,5 @@ octoprint.init => /etc/init.d/octoprint
|
||||
## systemd
|
||||
|
||||
```
|
||||
octoprint.service => /etc/systemd/service/octoprint.service
|
||||
octoprint.service => /etc/systemd/system/octoprint.service
|
||||
```
|
||||
@@ -207,8 +207,11 @@ class ActionCommandPromptPlugin(octoprint.plugin.AssetPlugin,
|
||||
return
|
||||
|
||||
self._close_prompt()
|
||||
self._printer.commands(["{command} S{choice}".format(command=self._command,
|
||||
choice=choice)])
|
||||
if "{choice}" in self._command:
|
||||
self._printer.commands([self._command.format(choice=choice)])
|
||||
else:
|
||||
self._printer.commands(["{command} S{choice}".format(command=self._command,
|
||||
choice=choice)])
|
||||
|
||||
|
||||
__plugin_name__ = "Action Command Prompt Support"
|
||||
|
||||
@@ -52,7 +52,7 @@ $(function() {
|
||||
.done(self.requestData);
|
||||
};
|
||||
|
||||
showConfirmationDialog(_.sprintf(gettext("You are about to revoke the application key \"%(key)s\"."), {key: key}),
|
||||
showConfirmationDialog(_.sprintf(gettext("You are about to revoke the application key \"%(key)s\"."), {key: _.escape(key)}),
|
||||
perform);
|
||||
};
|
||||
|
||||
@@ -68,7 +68,7 @@ $(function() {
|
||||
|
||||
self.promptForAccess = function(app, token) {
|
||||
var message = gettext("\"<strong>%(app)s</strong>\" has requested access to control OctoPrint through the API.");
|
||||
message = _.sprintf(message, {app: app});
|
||||
message = _.sprintf(message, {app: _.escape(app)});
|
||||
message = "<p>" + message + "</p><p>" + gettext("Do you want to allow access to this application with your user account?") + "</p>";
|
||||
return new PNotify({
|
||||
title: gettext("Access Request"),
|
||||
@@ -210,7 +210,7 @@ $(function() {
|
||||
.done(self.requestData);
|
||||
};
|
||||
|
||||
showConfirmationDialog(_.sprintf(gettext("You are about to revoke the application key \"%(key)s\"."), {key: key}),
|
||||
showConfirmationDialog(_.sprintf(gettext("You are about to revoke the application key \"%(key)s\"."), {key: _.escape(key)}),
|
||||
perform);
|
||||
};
|
||||
|
||||
@@ -258,11 +258,11 @@ $(function() {
|
||||
handler = function(key) {
|
||||
return OctoPrint.plugins.appkeys.revokeKey(key)
|
||||
.done(function() {
|
||||
deferred.notify(_.sprintf(gettext("Revoked %(key)s..."), {key: key}), true);
|
||||
deferred.notify(_.sprintf(gettext("Revoked %(key)s..."), {key: _.escape(key)}), true);
|
||||
})
|
||||
.fail(function(jqXHR) {
|
||||
var short = _.sprintf(gettext("Revocation of %(key)s failed, continuing..."), {key: key});
|
||||
var long = _.sprintf(gettext("Deletion of %(key)s failed: %(error)s"), {key: key, error: jqXHR.responseText});
|
||||
var short = _.sprintf(gettext("Revocation of %(key)s failed, continuing..."), {key: _.escape(key)});
|
||||
var long = _.sprintf(gettext("Deletion of %(key)s failed: %(error)s"), {key: _.escape(key), error: _.escape(jqXHR.responseText)});
|
||||
deferred.notify(short, long, false);
|
||||
});
|
||||
};
|
||||
|
||||
@@ -85,7 +85,7 @@ $(function() {
|
||||
self.requestData();
|
||||
});
|
||||
};
|
||||
showConfirmationDialog(_.sprintf(gettext("You are about to delete backup file \"%(name)s\"."), {name: backup}),
|
||||
showConfirmationDialog(_.sprintf(gettext("You are about to delete backup file \"%(name)s\"."), {name: _.escape(backup)}),
|
||||
perform);
|
||||
};
|
||||
|
||||
@@ -101,7 +101,7 @@ $(function() {
|
||||
|
||||
OctoPrint.plugins.backup.restoreBackup(backup);
|
||||
};
|
||||
showConfirmationDialog(_.sprintf(gettext("You are about to restore the backup file \"%(name)s\". This cannot be undone."), {name: backup}),
|
||||
showConfirmationDialog(_.sprintf(gettext("You are about to restore the backup file \"%(name)s\". This cannot be undone."), {name: _.escape(backup)}),
|
||||
perform);
|
||||
};
|
||||
|
||||
@@ -117,7 +117,7 @@ $(function() {
|
||||
|
||||
self.backupUploadData.submit();
|
||||
};
|
||||
showConfirmationDialog(_.sprintf(gettext("You are about to upload and restore the backup file \"%(name)s\". This cannot be undone."), {name: self.backupUploadName()}),
|
||||
showConfirmationDialog(_.sprintf(gettext("You are about to upload and restore the backup file \"%(name)s\". This cannot be undone."), {name: _.escape(self.backupUploadName())}),
|
||||
perform);
|
||||
};
|
||||
|
||||
@@ -182,7 +182,7 @@ $(function() {
|
||||
self.backupInProgress(false);
|
||||
new PNotify({
|
||||
title: gettext("Creating the backup failed"),
|
||||
text: _.sprintf(gettext("OctoPrint could not create your backup. Please consult <code>octoprint.log</code> for details. Error: %(error)s"), {error:data.error}),
|
||||
text: _.sprintf(gettext("OctoPrint could not create your backup. Please consult <code>octoprint.log</code> for details. Error: %(error)s"), {error: _.escape(data.error)}),
|
||||
type: "error",
|
||||
hide: false
|
||||
});
|
||||
@@ -200,13 +200,13 @@ $(function() {
|
||||
} else if (data.type === "installing_plugin") {
|
||||
self.loglines.push({line: " ", stream: "message"});
|
||||
self.loglines.push({
|
||||
line: _.sprintf(gettext("Installing plugin \"%(plugin)s\"..."), {plugin: data.plugin}),
|
||||
line: _.sprintf(gettext("Installing plugin \"%(plugin)s\"..."), {plugin: _.escape(data.plugin)}),
|
||||
stream: "message"
|
||||
});
|
||||
} else if (data.type === "plugin_incompatible") {
|
||||
self.loglines.push({line: " ", stream: "message"});
|
||||
self.loglines.push({
|
||||
line: _.sprintf(gettext("Cannot install plugin \"%(plugin)s\" due to it being incompatible to this OctoPrint version and/or underlying operating system"), {plugin: data.plugin.key}),
|
||||
line: _.sprintf(gettext("Cannot install plugin \"%(plugin)s\" due to it being incompatible to this OctoPrint version and/or underlying operating system"), {plugin: _.escape(data.plugin.key)}),
|
||||
stream: "stderr"
|
||||
});
|
||||
} else if (data.type === "unknown_plugins") {
|
||||
@@ -245,11 +245,11 @@ $(function() {
|
||||
handler = function(filename) {
|
||||
return OctoPrint.plugins.backup.deleteBackup(filename)
|
||||
.done(function() {
|
||||
deferred.notify(_.sprintf(gettext("Deleted %(filename)s..."), {filename: filename}), true);
|
||||
deferred.notify(_.sprintf(gettext("Deleted %(filename)s..."), {filename: _.escape(filename)}), true);
|
||||
})
|
||||
.fail(function(jqXHR) {
|
||||
var short = _.sprintf(gettext("Deletion of %(filename)s failed, continuing..."), {filename: filename});
|
||||
var long = _.sprintf(gettext("Deletion of %(filename)s failed: %(error)s"), {filename: filename, error: jqXHR.responseText});
|
||||
var short = _.sprintf(gettext("Deletion of %(filename)s failed, continuing..."), {filename: _.escape(filename)});
|
||||
var long = _.sprintf(gettext("Deletion of %(filename)s failed: %(error)s"), {filename: _.escape(filename), error: _.escape(jqXHR.responseText)});
|
||||
deferred.notify(short, long, false);
|
||||
});
|
||||
};
|
||||
|
||||
@@ -121,7 +121,7 @@ $(function() {
|
||||
.done(self.requestData);
|
||||
};
|
||||
|
||||
showConfirmationDialog(_.sprintf(gettext("You are about to delete log file \"%(name)s\"."), {name: filename}),
|
||||
showConfirmationDialog(_.sprintf(gettext("You are about to delete log file \"%(name)s\"."), {name: _.escape(filename)}),
|
||||
perform);
|
||||
};
|
||||
|
||||
@@ -172,11 +172,11 @@ $(function() {
|
||||
var handler = function(filename) {
|
||||
return OctoPrint.plugins.logging.deleteLog(filename)
|
||||
.done(function() {
|
||||
deferred.notify(_.sprintf(gettext("Deleted %(filename)s..."), {filename: filename}), true);
|
||||
deferred.notify(_.sprintf(gettext("Deleted %(filename)s..."), {filename: _.escape(filename)}), true);
|
||||
})
|
||||
.fail(function(jqXHR) {
|
||||
var short = _.sprintf(gettext("Deletion of %(filename)s failed, continuing..."), {filename: filename});
|
||||
var long = _.sprintf(gettext("Deletion of %(filename)s failed: %(error)s"), {filename: filename, error: jqXHR.responseText});
|
||||
var short = _.sprintf(gettext("Deletion of %(filename)s failed, continuing..."), {filename: _.escape(filename)});
|
||||
var long = _.sprintf(gettext("Deletion of %(filename)s failed: %(error)s"), {filename: _.escape(filename), error: _.escape(jqXHR.responseText)});
|
||||
deferred.notify(short, long, false);
|
||||
});
|
||||
};
|
||||
|
||||
@@ -1 +1 @@
|
||||
#settings_plugin_pluginmanager_pluginlist{display:block;width:auto;height:400px;overflow-x:hidden;overflow-y:scroll;padding-right:2px;margin-bottom:1em}#settings_plugin_pluginmanager_pluginlist table td.settings_plugin_plugin_manager_plugins_name,#settings_plugin_pluginmanager_pluginlist table th.settings_plugin_plugin_manager_plugins_name{text-overflow:ellipsis;text-align:left}#settings_plugin_pluginmanager_pluginlist table td.settings_plugin_plugin_manager_plugins_actions,#settings_plugin_pluginmanager_pluginlist table th.settings_plugin_plugin_manager_plugins_actions{text-align:center;width:80px}#settings_plugin_pluginmanager_pluginlist table td.settings_plugin_plugin_manager_plugins_actions a,#settings_plugin_pluginmanager_pluginlist table th.settings_plugin_plugin_manager_plugins_actions a{text-decoration:none;color:#000}#settings_plugin_pluginmanager_pluginlist table td.settings_plugin_plugin_manager_plugins_actions a.disabled,#settings_plugin_pluginmanager_pluginlist table th.settings_plugin_plugin_manager_plugins_actions a.disabled{color:#ccc;cursor:default}#settings_plugin_pluginmanager_repositorydialog h4{position:relative}#settings_plugin_pluginmanager_repositorydialog h4 a.dropdown-toggle{color:inherit;text-decoration:none;font-size:14px}#settings_plugin_pluginmanager_repositorydialog h4 ul.dropdown-menu{font-size:14px}#settings_plugin_pluginmanager_repositorydialog .form-search{text-align:center;margin-bottom:5px!important}#settings_plugin_pluginmanager_repositorydialog .form-inline{padding:5px 10px 5px 5px;margin-bottom:0}#settings_plugin_pluginmanager_repositorydialog .form-inline .help-block{margin-bottom:0;font-size:85%}#settings_plugin_pluginmanager_repositorydialog #settings_plugin_pluginmanager_repositorydialog_unavailable{overflow:hidden;width:100%;height:300px;background-image:url(../img/repo_unavailable.png);text-align:center;display:table}#settings_plugin_pluginmanager_repositorydialog #settings_plugin_pluginmanager_repositorydialog_unavailable div{display:table-cell;vertical-align:middle}#settings_plugin_pluginmanager_repositorydialog #settings_plugin_pluginmanager_repositorydialog_list{width:auto;height:300px;overflow-x:hidden;overflow-y:scroll;padding-right:2px}#settings_plugin_pluginmanager_repositorydialog #settings_plugin_pluginmanager_repositorydialog_list .entry{border-bottom:1px solid #ddd;padding:5px}#settings_plugin_pluginmanager_workingdialog_output .message{font-weight:700}#settings_plugin_pluginmanager_workingdialog_output .error{font-weight:700;color:#900}#settings_plugin_pluginmanager_workingdialog_output .stdout{color:#333}#settings_plugin_pluginmanager_workingdialog_output .stderr{color:#900}#settings_plugin_pluginmanager_workingdialog_output .call{color:#009}
|
||||
#settings_plugin_pluginmanager .form-search{text-align:center;margin-bottom:5px!important}#settings_plugin_pluginmanager_pluginlist{display:block;width:auto;height:400px;overflow-x:hidden;overflow-y:scroll;padding-right:2px;margin-bottom:1em}#settings_plugin_pluginmanager_pluginlist table th.settings_plugin_plugin_manager_plugins_name,#settings_plugin_pluginmanager_pluginlist table td.settings_plugin_plugin_manager_plugins_name{text-overflow:ellipsis;text-align:left}#settings_plugin_pluginmanager_pluginlist table th.settings_plugin_plugin_manager_plugins_actions,#settings_plugin_pluginmanager_pluginlist table td.settings_plugin_plugin_manager_plugins_actions{text-align:center;width:80px}#settings_plugin_pluginmanager_pluginlist table th.settings_plugin_plugin_manager_plugins_actions a,#settings_plugin_pluginmanager_pluginlist table td.settings_plugin_plugin_manager_plugins_actions a{text-decoration:none;color:#000}#settings_plugin_pluginmanager_pluginlist table th.settings_plugin_plugin_manager_plugins_actions a.disabled,#settings_plugin_pluginmanager_pluginlist table td.settings_plugin_plugin_manager_plugins_actions a.disabled{color:#ccc;cursor:default}#settings_plugin_pluginmanager_repositorydialog h4{position:relative}#settings_plugin_pluginmanager_repositorydialog h4 a.dropdown-toggle{color:inherit;text-decoration:none;font-size:14px}#settings_plugin_pluginmanager_repositorydialog h4 ul.dropdown-menu{font-size:14px}#settings_plugin_pluginmanager_repositorydialog .form-search{text-align:center;margin-bottom:5px!important}#settings_plugin_pluginmanager_repositorydialog .form-inline{padding:5px;padding-right:10px;margin-bottom:0}#settings_plugin_pluginmanager_repositorydialog .form-inline .help-block{margin-bottom:0;font-size:85%}#settings_plugin_pluginmanager_repositorydialog #settings_plugin_pluginmanager_repositorydialog_unavailable{overflow:hidden;width:100%;height:300px;background-image:url(../img/repo_unavailable.png);text-align:center;display:table}#settings_plugin_pluginmanager_repositorydialog #settings_plugin_pluginmanager_repositorydialog_unavailable div{display:table-cell;vertical-align:middle}#settings_plugin_pluginmanager_repositorydialog #settings_plugin_pluginmanager_repositorydialog_list{width:auto;height:300px;overflow-x:hidden;overflow-y:scroll;padding-right:2px}#settings_plugin_pluginmanager_repositorydialog #settings_plugin_pluginmanager_repositorydialog_list .entry{border-bottom:1px solid #ddd;padding:5px}#settings_plugin_pluginmanager_workingdialog_output .message{font-weight:700}#settings_plugin_pluginmanager_workingdialog_output .error{font-weight:700;color:#900}#settings_plugin_pluginmanager_workingdialog_output .stdout{color:#333}#settings_plugin_pluginmanager_workingdialog_output .stderr{color:#900}#settings_plugin_pluginmanager_workingdialog_output .call{color:#009}
|
||||
@@ -93,6 +93,11 @@ $(function() {
|
||||
self.performRepositorySearch();
|
||||
});
|
||||
|
||||
self.listingSearchQuery = ko.observable();
|
||||
self.listingSearchQuery.subscribe(function() {
|
||||
self.performListingSearch();
|
||||
});
|
||||
|
||||
self.installUrl = ko.observable();
|
||||
self.uploadFilename = ko.observable();
|
||||
|
||||
@@ -291,9 +296,21 @@ $(function() {
|
||||
}
|
||||
});
|
||||
|
||||
self.performListingSearch = function() {
|
||||
var query = self.listingSearchQuery();
|
||||
if (query !== undefined && query.trim() !== "") {
|
||||
query = query.toLocaleLowerCase();
|
||||
self.plugins.changeSearchFunction(function (entry) {
|
||||
return entry && (entry["name"].toLocaleLowerCase().indexOf(query) > -1 || (entry.description && entry.description.toLocaleLowerCase().indexOf(query) > -1));
|
||||
});
|
||||
} else {
|
||||
self.plugins.resetSearch();
|
||||
}
|
||||
}
|
||||
|
||||
self.performRepositorySearch = function() {
|
||||
var query = self.repositorySearchQuery();
|
||||
if (query !== undefined && query.trim() != "") {
|
||||
if (query !== undefined && query.trim() !== "") {
|
||||
query = query.toLocaleLowerCase();
|
||||
self.repositoryplugins.changeSearchFunction(function(entry) {
|
||||
return entry && (entry["title"].toLocaleLowerCase().indexOf(query) > -1 || entry["description"].toLocaleLowerCase().indexOf(query) > -1);
|
||||
@@ -427,7 +444,7 @@ $(function() {
|
||||
|
||||
// always warn if plugin is marked "disabling discouraged"
|
||||
if (data.disabling_discouraged) {
|
||||
var message = _.sprintf(gettext("You are about to disable \"%(name)s\"."), {name: data.name})
|
||||
var message = _.sprintf(gettext("You are about to disable \"%(name)s\"."), {name: _.escape(data.name)})
|
||||
+ "</p><p>" + data.disabling_discouraged;
|
||||
showConfirmationDialog({
|
||||
title: gettext("This is not recommended"),
|
||||
@@ -441,7 +458,7 @@ $(function() {
|
||||
// warn if global "warn disabling" setting is set"
|
||||
else if (self.settingsViewModel.settings.plugins.pluginmanager.confirm_disable()) {
|
||||
showConfirmationDialog({
|
||||
message: _.sprintf(gettext("You are about to disable \"%(name)s\""), {name: data.name}),
|
||||
message: _.sprintf(gettext("You are about to disable \"%(name)s\""), {name: _.escape(data.name)}),
|
||||
cancel: gettext("Keep enabled"),
|
||||
proceed: gettext("Disable plugin"),
|
||||
onproceed: performDisabling,
|
||||
@@ -500,13 +517,13 @@ $(function() {
|
||||
if (!reinstall) {
|
||||
workTitle = gettext("Installing plugin...");
|
||||
if (name) {
|
||||
workText = _.sprintf(gettext("Installing plugin \"%(name)s\" from %(url)s..."), {url: url, name: name});
|
||||
workText = _.sprintf(gettext("Installing plugin \"%(name)s\" from %(url)s..."), {url: _.escape(url), name: _.escape(name)});
|
||||
} else {
|
||||
workText = _.sprintf(gettext("Installing plugin from %(url)s..."), {url: url});
|
||||
workText = _.sprintf(gettext("Installing plugin from %(url)s..."), {url: _.escape(url)});
|
||||
}
|
||||
} else {
|
||||
workTitle = gettext("Reinstalling plugin...");
|
||||
workText = _.sprintf(gettext("Reinstalling plugin \"%(name)s\" from %(url)s..."), {url: url, name: name});
|
||||
workText = _.sprintf(gettext("Reinstalling plugin \"%(name)s\" from %(url)s..."), {url: _.escape(url), name: _.escape(name)});
|
||||
}
|
||||
self._markWorking(workTitle, workText);
|
||||
|
||||
@@ -555,7 +572,7 @@ $(function() {
|
||||
// defining actual uninstall logic as functor in order to handle
|
||||
// the confirm/no-confirm logic without duplication of logic
|
||||
var performUninstall = function() {
|
||||
self._markWorking(gettext("Uninstalling plugin..."), _.sprintf(gettext("Uninstalling plugin \"%(name)s\""), {name: data.name}));
|
||||
self._markWorking(gettext("Uninstalling plugin..."), _.sprintf(gettext("Uninstalling plugin \"%(name)s\""), {name: _.escape(data.name)}));
|
||||
|
||||
OctoPrint.plugins.pluginmanager.uninstall(data.key)
|
||||
.done(function() {
|
||||
@@ -577,7 +594,7 @@ $(function() {
|
||||
if (self.settingsViewModel.settings.plugins.pluginmanager.confirm_uninstall()) {
|
||||
// confirmation needed. Show confirmation dialog and call performUninstall if user clicks Yes
|
||||
showConfirmationDialog({
|
||||
message: _.sprintf(gettext("You are about to uninstall the plugin \"%(name)s\""), {name: data.name}),
|
||||
message: _.sprintf(gettext("You are about to uninstall the plugin \"%(name)s\""), {name: _.escape(data.name)}),
|
||||
cancel: gettext("Keep installed"),
|
||||
proceed: gettext("Uninstall"),
|
||||
onproceed: performUninstall,
|
||||
@@ -739,7 +756,7 @@ $(function() {
|
||||
}
|
||||
|
||||
text += "<li>"
|
||||
+ _.sprintf(line, {plugin: step.plugin, result: step.result ? "<i class=\"fa fa-check\"></i>" : "<i class=\"fa fa-remove\"></i>"})
|
||||
+ _.sprintf(line, {plugin: _.escape(step.plugin), result: step.result ? "<i class=\"fa fa-check\"></i>" : "<i class=\"fa fa-remove\"></i>"})
|
||||
+ "</li>";
|
||||
});
|
||||
text += "</ul></p>";
|
||||
@@ -917,16 +934,16 @@ $(function() {
|
||||
|
||||
var title;
|
||||
if (important) {
|
||||
title = _.sprintf(gettext("Important notice regarding plugin \"%(name)s\""), {name: name});
|
||||
title = _.sprintf(gettext("Important notice regarding plugin \"%(name)s\""), {name: _.escape(name)});
|
||||
} else {
|
||||
title = _.sprintf(gettext("Notice regarding plugin \"%(name)s\""), {name: name});
|
||||
title = _.sprintf(gettext("Notice regarding plugin \"%(name)s\""), {name: _.escape(name)});
|
||||
}
|
||||
|
||||
var text = "";
|
||||
|
||||
if (notification.versions && notification.versions.length > 0) {
|
||||
var versions = _.map(notification.versions, function(v) { return (v == version) ? "<strong>" + v + "</strong>" : v; }).join(", ");
|
||||
text += "<small>" + _.sprintf(gettext("Affected versions: %(versions)s"), {versions: versions}) + "</small>";
|
||||
text += "<small>" + _.sprintf(gettext("Affected versions: %(versions)s"), {versions: _.escape(versions)}) + "</small>";
|
||||
} else {
|
||||
text += "<small>" + gettext("Affected versions: all") + "</small>";
|
||||
}
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
#settings_plugin_pluginmanager {
|
||||
.form-search {
|
||||
text-align: center;
|
||||
margin-bottom: 5px !important;
|
||||
}
|
||||
}
|
||||
|
||||
#settings_plugin_pluginmanager_pluginlist {
|
||||
display: block;
|
||||
width: auto;
|
||||
|
||||
@@ -50,6 +50,10 @@
|
||||
|
||||
<h3>{{ _('Installed Plugins') }}</h3>
|
||||
|
||||
<form class="form-search" data-bind="submit: performListingSearch">
|
||||
<input type="text" class="input-block search-query" data-bind="value: listingSearchQuery, valueUpdate: 'input'" placeholder="{{ _('Search...')|edq }}">
|
||||
</form>
|
||||
|
||||
<div id="settings_plugin_pluginmanager_pluginlist">
|
||||
<table class="table table-striped table-hover table-condensed table-hover">
|
||||
<thead>
|
||||
|
||||
@@ -216,13 +216,13 @@ $(function() {
|
||||
}
|
||||
|
||||
var fullNameTemplate = gettext("%(name)s: %(version)s");
|
||||
value.fullNameLocal = _.sprintf(fullNameTemplate, {name: value.displayName, version: value.displayVersion});
|
||||
value.fullNameLocal = _.sprintf(fullNameTemplate, {name: _.escape(value.displayName), version: _.escape(value.displayVersion)});
|
||||
|
||||
var fullNameRemoteVars = {name: value.displayName, version: gettext("unknown")};
|
||||
if (value.hasOwnProperty("information") && value.information.hasOwnProperty("remote") && value.information.remote.hasOwnProperty("name")) {
|
||||
fullNameRemoteVars.version = value.information.remote.name;
|
||||
}
|
||||
value.fullNameRemote = _.sprintf(fullNameTemplate, fullNameRemoteVars);
|
||||
value.fullNameRemote = _.sprintf(fullNameTemplate, _.escape(fullNameRemoteVars));
|
||||
|
||||
versions.push(value);
|
||||
});
|
||||
@@ -656,7 +656,7 @@ $(function() {
|
||||
case "updating": {
|
||||
console.log(JSON.stringify(messageData));
|
||||
|
||||
text = _.sprintf(gettext("Now updating %(name)s to %(version)s"), {name: messageData.name, version: messageData.version});
|
||||
text = _.sprintf(gettext("Now updating %(name)s to %(version)s"), {name: _.escape(messageData.name), version: _.escape(messageData.version)});
|
||||
self.loglines.push({line: "", stream: "separator"});
|
||||
self.loglines.push({line: _.repeat("+", text.length), stream: "separator"});
|
||||
self.loglines.push({line: text, stream: "message"});
|
||||
|
||||
@@ -536,7 +536,9 @@ class Server(object):
|
||||
|
||||
self._router = SockJSRouter(self._create_socket_connection, "/sockjs",
|
||||
session_kls=util.sockjs.ThreadSafeSession,
|
||||
user_settings=dict(websocket_allow_origin="*" if enable_cors else ""))
|
||||
user_settings=dict(websocket_allow_origin="*" if enable_cors else "",
|
||||
jsessionid=False,
|
||||
sockjs_url="../../static/js/lib/sockjs.min.js"))
|
||||
|
||||
upload_suffixes = dict(name=self._settings.get(["server", "uploads", "nameSuffix"]), path=self._settings.get(["server", "uploads", "pathSuffix"]))
|
||||
|
||||
@@ -647,7 +649,11 @@ class Server(object):
|
||||
self._logger.debug("Adding additional route {route} handled by handler {handler} and with additional arguments {kwargs!r}".format(**locals()))
|
||||
server_routes.append((route, handler, kwargs))
|
||||
|
||||
headers = {"X-Robots-Tag": "noindex, nofollow, noimageindex"}
|
||||
headers = {"X-Robots-Tag": "noindex, nofollow, noimageindex",
|
||||
"X-Content-Type-Options": "nosniff"}
|
||||
if not settings().getBoolean(["server", "allowFraming"]):
|
||||
headers["X-Frame-Options"] = "sameorigin"
|
||||
|
||||
removed_headers = ["Server"]
|
||||
|
||||
server_routes.append((r".*", util.tornado.UploadStorageFallbackHandler, dict(fallback=util.tornado.WsgiInputContainer(app.wsgi_app,
|
||||
|
||||
@@ -236,7 +236,8 @@ def getSettings():
|
||||
"enabled": s.getBoolean(["server", "pluginBlacklist", "enabled"]),
|
||||
"url": s.get(["server", "pluginBlacklist", "url"]),
|
||||
"ttl": int(s.getInt(["server", "pluginBlacklist", "ttl"]) / 60)
|
||||
}
|
||||
},
|
||||
"allowFraming": s.getBoolean(["server", "allowFraming"])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -554,6 +555,8 @@ def _saveSettings(data):
|
||||
s.setInt(["server", "pluginBlacklist", "ttl"], ttl * 60)
|
||||
except ValueError:
|
||||
pass
|
||||
if "allowFraming" in data["server"]:
|
||||
s.setBoolean(["server", "allowFraming"], data["server"]["allowFraming"])
|
||||
|
||||
if "plugins" in data:
|
||||
for plugin in octoprint.plugin.plugin_manager().get_implementations(octoprint.plugin.SettingsPlugin):
|
||||
|
||||
@@ -214,7 +214,8 @@ default_settings = {
|
||||
"ipCheck": {
|
||||
"enabled": True,
|
||||
"trustedSubnets": []
|
||||
}
|
||||
},
|
||||
"allowFraming": False
|
||||
},
|
||||
"webcam": {
|
||||
"webcamEnabled": True,
|
||||
|
||||
@@ -174,7 +174,7 @@ function DataUpdater(allViewModels, connectCallback, disconnectCallback) {
|
||||
|
||||
self._safeModePopup = new PNotify({
|
||||
title: gettext("Safe mode is active"),
|
||||
text: _.sprintf(gettext("<p>The server is currently running in safe mode. Third party plugins and language packs are disabled and cannot be enabled.</p><p>Reason: %(reason)s</p>"), {reason: reason}),
|
||||
text: _.sprintf(gettext("<p>The server is currently running in safe mode. Third party plugins and language packs are disabled and cannot be enabled.</p><p>Reason: %(reason)s</p>"), {reason: _.escape(reason)}),
|
||||
hide: false
|
||||
});
|
||||
}
|
||||
@@ -251,7 +251,7 @@ function DataUpdater(allViewModels, connectCallback, disconnectCallback) {
|
||||
}
|
||||
self._printerErrorCancelNotification = new PNotify({
|
||||
title: gettext("Error reported by printer"),
|
||||
text: _.sprintf(gettext("Your printer's firmware reported an error. Due to that the ongoing print job will be cancelled. Reported error: %(firmwareError)s"), payload),
|
||||
text: _.sprintf(gettext("Your printer's firmware reported an error. Due to that the ongoing print job will be cancelled. Reported error: %(firmwareError)s"), _.escape(payload)),
|
||||
type: "error",
|
||||
hide: false
|
||||
});
|
||||
@@ -262,24 +262,24 @@ function DataUpdater(allViewModels, connectCallback, disconnectCallback) {
|
||||
switch (payload.reason) {
|
||||
case "firmware": {
|
||||
title = gettext("Error reported by printer");
|
||||
text = _.sprintf(gettext("Your printer's firmware reported an error. Due to that OctoPrint will disconnect. Reported error: %(error)s"), payload);
|
||||
text = _.sprintf(gettext("Your printer's firmware reported an error. Due to that OctoPrint will disconnect. Reported error: %(error)s"), _.escape(payload));
|
||||
break;
|
||||
}
|
||||
case "resend":
|
||||
case "resend_loop":
|
||||
case "timeout": {
|
||||
title = gettext("Communication error");
|
||||
text = _.sprintf(gettext("There was a communication error while talking to your printer. Please consult the terminal output and octoprint.log for details. Error: %(error)s"), payload);
|
||||
text = _.sprintf(gettext("There was a communication error while talking to your printer. Please consult the terminal output and octoprint.log for details. Error: %(error)s"), _.escape(payload));
|
||||
break;
|
||||
}
|
||||
case "connection": {
|
||||
title = gettext("Error connecting to printer");
|
||||
text = _.sprintf(gettext("There was an error while trying to connect to your printer. Error: %(error)s"), payload);
|
||||
text = _.sprintf(gettext("There was an error while trying to connect to your printer. Error: %(error)s"), _.escape(payload));
|
||||
break;
|
||||
}
|
||||
case "start_print": {
|
||||
title = gettext("Error starting a print");
|
||||
text = _.sprintf(gettext("There was an error while trying to start a print job. Error: %(error)s"), payload);
|
||||
text = _.sprintf(gettext("There was an error while trying to start a print job. Error: %(error)s"), _.escape(payload));
|
||||
break;
|
||||
}
|
||||
case "autodetect_port":
|
||||
@@ -289,7 +289,7 @@ function DataUpdater(allViewModels, connectCallback, disconnectCallback) {
|
||||
}
|
||||
default: {
|
||||
title = gettext("Unknown error");
|
||||
text = _.sprintf(gettext("There was an unknown error while talking to your printer. Please consult the terminal output and octoprint.log for details. Error: %(error)s"), payload);
|
||||
text = _.sprintf(gettext("There was an unknown error while talking to your printer. Please consult the terminal output and octoprint.log for details. Error: %(error)s"), _.escape(payload));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ $(function() {
|
||||
if (mapping[filetype]) {
|
||||
result.push({key: filetype, text: mapping[filetype]});
|
||||
} else {
|
||||
result.push({key: filetype, text: _.sprintf(gettext("Only show %(type)s files"), {type: filetype})});
|
||||
result.push({key: filetype, text: _.sprintf(gettext("Only show %(type)s files"), {type: _.escape(filetype)})});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -436,7 +436,7 @@ $(function() {
|
||||
if (folder.weight > 0) {
|
||||
// confirm recursive delete
|
||||
var options = {
|
||||
message: _.sprintf(gettext("You are about to delete the folder \"%(folder)s\" which still contains files and/or sub folders."), {folder: folder.name}),
|
||||
message: _.sprintf(gettext("You are about to delete the folder \"%(folder)s\" which still contains files and/or sub folders."), {folder: _.escape(folder.name)}),
|
||||
onproceed: function() {
|
||||
self._removeEntry(folder, event);
|
||||
}
|
||||
@@ -727,7 +727,7 @@ $(function() {
|
||||
}
|
||||
|
||||
// model not within bounds, we need to prepare a warning
|
||||
var warning = "<p>" + _.sprintf(gettext("Object in %(name)s exceeds the print volume of the currently selected printer profile, be careful when printing this."), data) + "</p>";
|
||||
var warning = "<p>" + _.sprintf(gettext("Object in %(name)s exceeds the print volume of the currently selected printer profile, be careful when printing this."), {name: _.escape(data.name)}) + "</p>";
|
||||
var info = "";
|
||||
|
||||
var formatData = {
|
||||
@@ -957,7 +957,7 @@ $(function() {
|
||||
|
||||
new PNotify({
|
||||
title: gettext("Slicing done"),
|
||||
text: _.sprintf(gettext("Sliced %(stl)s to %(gcode)s, took %(time).2f seconds"), payload),
|
||||
text: _.sprintf(gettext("Sliced %(stl)s to %(gcode)s, took %(time).2f seconds"), {stl: _.escape(payload.stl), gcode: _.escape(payload.gcode), time: payload.time}),
|
||||
type: "success"
|
||||
});
|
||||
|
||||
@@ -972,7 +972,7 @@ $(function() {
|
||||
.css("width", "0%");
|
||||
self.uploadProgressText("");
|
||||
|
||||
var html = _.sprintf(gettext("Could not slice %(stl)s to %(gcode)s: %(reason)s"), payload);
|
||||
var html = _.sprintf(gettext("Could not slice %(stl)s to %(gcode)s: %(reason)s"), {stl: _.escape(payload.stl), gcode: _.escape(payload.gcode), reason: _.escape(payload.reason)});
|
||||
new PNotify({title: gettext("Slicing failed"), text: html, type: "error", hide: false});
|
||||
};
|
||||
|
||||
@@ -1003,7 +1003,7 @@ $(function() {
|
||||
|
||||
new PNotify({
|
||||
title: gettext("Streaming done"),
|
||||
text: _.sprintf(gettext("Streamed %(local)s to %(remote)s on SD, took %(time).2f seconds"), payload),
|
||||
text: _.sprintf(gettext("Streamed %(local)s to %(remote)s on SD, took %(time).2f seconds"), {local: _.escape(payload.local), remote: _.escape(payload.remote), time: payload.time}),
|
||||
type: "success"
|
||||
});
|
||||
|
||||
@@ -1020,7 +1020,7 @@ $(function() {
|
||||
|
||||
new PNotify({
|
||||
title: gettext("Streaming failed"),
|
||||
text: _.sprintf(gettext("Did not finish streaming %(local)s to %(remote)s on SD"), payload),
|
||||
text: _.sprintf(gettext("Did not finish streaming %(local)s to %(remote)s on SD"), {local: _.escape(payload.local), remote: _.escape(payload.remote)}),
|
||||
type: "error"
|
||||
});
|
||||
|
||||
@@ -1121,10 +1121,10 @@ $(function() {
|
||||
extensions = extensions.join(", ");
|
||||
var error = "<p>"
|
||||
+ _.sprintf(gettext("Could not upload the file. Make sure that it is a readable, valid file with one of these extensions: %(extensions)s"),
|
||||
{extensions: extensions})
|
||||
{extensions: _.escape(extensions)})
|
||||
+ "</p>";
|
||||
if (data.jqXHR.responseText) {
|
||||
error += pnotifyAdditionalInfo("<pre>" + data.jqXHR.responseText + "</pre>");
|
||||
error += pnotifyAdditionalInfo("<pre>" + _.escape(data.jqXHR.responseText) + "</pre>");
|
||||
}
|
||||
new PNotify({
|
||||
title: "Upload failed",
|
||||
|
||||
@@ -32,7 +32,7 @@ $(function() {
|
||||
|
||||
self.userMenuTitle = ko.pureComputed(function() {
|
||||
if (self.loggedIn()) {
|
||||
return _.sprintf(gettext("Logged in as %(name)s"), {name: self.username()});
|
||||
return _.sprintf(gettext("Logged in as %(name)s"), {name: _.escape(self.username())});
|
||||
} else {
|
||||
return gettext("Login");
|
||||
}
|
||||
@@ -160,7 +160,7 @@ $(function() {
|
||||
|
||||
return OctoPrint.browser.login(username, password, remember)
|
||||
.done(function(response) {
|
||||
new PNotify({title: gettext("Login successful"), text: _.sprintf(gettext('You are now logged in as "%(username)s"'), {username: response.name}), type: "success"});
|
||||
new PNotify({title: gettext("Login successful"), text: _.sprintf(gettext('You are now logged in as "%(username)s"'), {username: _.escape(response.name)}), type: "success"});
|
||||
self.fromResponse(response);
|
||||
|
||||
self.loginUser("");
|
||||
|
||||
@@ -533,7 +533,7 @@ $(function() {
|
||||
});
|
||||
};
|
||||
|
||||
showConfirmationDialog(_.sprintf(gettext("You are about to delete the printer profile \"%(name)s\"."), {name: data.name}),
|
||||
showConfirmationDialog(_.sprintf(gettext("You are about to delete the printer profile \"%(name)s\"."), {name: _.escape(data.name)}),
|
||||
perform);
|
||||
};
|
||||
|
||||
@@ -568,7 +568,7 @@ $(function() {
|
||||
var dialogTitle = $("h3.modal-title", editDialog);
|
||||
|
||||
var add = data === undefined;
|
||||
dialogTitle.text(add ? gettext("Add Printer Profile") : _.sprintf(gettext("Edit Printer Profile \"%(name)s\""), {name: data.name}));
|
||||
dialogTitle.text(add ? gettext("Add Printer Profile") : _.sprintf(gettext("Edit Printer Profile \"%(name)s\""), {name: _.escape(data.name)}));
|
||||
confirmButton.unbind("click");
|
||||
confirmButton.bind("click", function() {
|
||||
if (self.enableEditorSubmitButton()) {
|
||||
|
||||
@@ -244,6 +244,8 @@ $(function() {
|
||||
self.server_pluginBlacklist_url = ko.observable();
|
||||
self.server_pluginBlacklist_ttl = ko.observable();
|
||||
|
||||
self.server_allowFraming = ko.observable();
|
||||
|
||||
self.settings = undefined;
|
||||
self.lastReceivedSettings = undefined;
|
||||
|
||||
@@ -373,7 +375,7 @@ $(function() {
|
||||
"image. Got this as a content type header: <code>%(content_type)s</code>. Please " +
|
||||
"double check that the URL is returning static images, not multipart data " +
|
||||
"or videos.");
|
||||
errorText = _.sprintf(errorText, {content_type: response.response.content_type});
|
||||
errorText = _.sprintf(errorText, {content_type: _.escape(response.response.content_type)});
|
||||
}
|
||||
|
||||
showMessageDialog({
|
||||
|
||||
@@ -146,7 +146,7 @@ $(function() {
|
||||
self.target = target;
|
||||
self.file(file);
|
||||
self.path = path;
|
||||
self.title(_.sprintf(gettext("Slicing %(filename)s"), {filename: display}));
|
||||
self.title(_.sprintf(gettext("Slicing %(filename)s"), {filename: _.escape(display)}));
|
||||
self.destinationFilename(destination);
|
||||
self.printerProfile(self.printerProfiles.currentProfile());
|
||||
self.afterSlicing("none");
|
||||
|
||||
@@ -56,15 +56,15 @@ $(function() {
|
||||
|
||||
new PNotify({
|
||||
title: "Success",
|
||||
text: _.sprintf(text, {command: commandSpec.name}),
|
||||
text: _.sprintf(text, {command: _.escape(commandSpec.name)}),
|
||||
type: "success"
|
||||
});
|
||||
deferred.resolve(["success", arguments]);
|
||||
})
|
||||
.fail(function(jqXHR, textStatus, errorThrown) {
|
||||
if (!commandSpec.hasOwnProperty("ignore") || !commandSpec.ignore) {
|
||||
var error = "<p>" + _.sprintf(gettext("The command \"%(command)s\" could not be executed."), {command: commandSpec.name}) + "</p>";
|
||||
error += pnotifyAdditionalInfo("<pre>" + jqXHR.responseText + "</pre>");
|
||||
var error = "<p>" + _.sprintf(gettext("The command \"%(command)s\" could not be executed."), {command: _.escape(commandSpec.name)}) + "</p>";
|
||||
error += pnotifyAdditionalInfo("<pre>" + _.escape(jqXHR.responseText) + "</pre>");
|
||||
new PNotify({title: gettext("Error"), text: error, type: "error", hide: false});
|
||||
deferred.reject(["error", arguments]);
|
||||
} else {
|
||||
|
||||
@@ -58,11 +58,11 @@ $(function() {
|
||||
item: undefined,
|
||||
|
||||
title: ko.pureComputed(function() {
|
||||
return _.sprintf(gettext("Changing Offset of %(name)s"), {name: self.changingOffset.name()});
|
||||
return _.sprintf(gettext("Changing Offset of %(name)s"), {name: _.escape(self.changingOffset.name())});
|
||||
}),
|
||||
description: ko.pureComputed(function() {
|
||||
return _.sprintf(gettext("Use the form below to specify a new offset to apply to all temperature commands sent from printed files for \"%(name)s\""),
|
||||
{name: self.changingOffset.name()});
|
||||
{name: _.escape(self.changingOffset.name())});
|
||||
})
|
||||
};
|
||||
self.changeOffsetDialog = undefined;
|
||||
@@ -348,7 +348,7 @@ $(function() {
|
||||
value = "" + value + "°C";
|
||||
}
|
||||
|
||||
return _.sprintf(text, {name: profile.name, value: value});
|
||||
return _.sprintf(text, {name: _.escape(profile.name), value: _.escape(value)});
|
||||
};
|
||||
|
||||
self.updatePlot = function() {
|
||||
|
||||
@@ -238,8 +238,8 @@ $(function() {
|
||||
self.requestData()
|
||||
})
|
||||
.fail(function(jqXHR) {
|
||||
var html = "<p>" + _.sprintf(gettext("Failed to remove timelapse %(name)s.</p><p>Please consult octoprint.log for details.</p>"), {name: filename});
|
||||
html += pnotifyAdditionalInfo('<pre style="overflow: auto">' + jqXHR.responseText + '</pre>');
|
||||
var html = "<p>" + _.sprintf(gettext("Failed to remove timelapse %(name)s.</p><p>Please consult octoprint.log for details.</p>"), {name: _.escape(filename)});
|
||||
html += pnotifyAdditionalInfo('<pre style="overflow: auto">' + _.escape(jqXHR.responseText) + '</pre>');
|
||||
new PNotify({
|
||||
title: gettext("Could not remove timelapse"),
|
||||
text: html,
|
||||
@@ -249,7 +249,7 @@ $(function() {
|
||||
});
|
||||
};
|
||||
|
||||
showConfirmationDialog(_.sprintf(gettext("You are about to delete timelapse file \"%(name)s\"."), {name: filename}),
|
||||
showConfirmationDialog(_.sprintf(gettext("You are about to delete timelapse file \"%(name)s\"."), {name: _.escape(filename)}),
|
||||
perform)
|
||||
};
|
||||
|
||||
@@ -286,7 +286,7 @@ $(function() {
|
||||
});
|
||||
};
|
||||
|
||||
showConfirmationDialog(_.sprintf(gettext("You are about to delete unrendered timelapse \"%(name)s\"."), {name: name}),
|
||||
showConfirmationDialog(_.sprintf(gettext("You are about to delete unrendered timelapse \"%(name)s\"."), {name: _.escape(name)}),
|
||||
perform)
|
||||
};
|
||||
|
||||
@@ -311,11 +311,11 @@ $(function() {
|
||||
handler = function(filename) {
|
||||
return OctoPrint.timelapse.delete(filename)
|
||||
.done(function() {
|
||||
deferred.notify(_.sprintf(gettext("Deleted %(filename)s..."), {filename: filename}), true);
|
||||
deferred.notify(_.sprintf(gettext("Deleted %(filename)s..."), {filename: _.escape(filename)}), true);
|
||||
})
|
||||
.fail(function(jqXHR) {
|
||||
var short = _.sprintf(gettext("Deletion of %(filename)s failed, continuing..."), {filename: filename});
|
||||
var long = _.sprintf(gettext("Deletion of %(filename)s failed: %(error)s"), {filename: filename, error: jqXHR.responseText});
|
||||
var short = _.sprintf(gettext("Deletion of %(filename)s failed, continuing..."), {filename: _.escape(filename)});
|
||||
var long = _.sprintf(gettext("Deletion of %(filename)s failed: %(error)s"), {filename: _.escape(filename), error: _.escape(jqXHR.responseText)});
|
||||
deferred.notify(short, long, false);
|
||||
});
|
||||
}
|
||||
@@ -325,10 +325,10 @@ $(function() {
|
||||
handler = function(filename) {
|
||||
return OctoPrint.timelapse.deleteUnrendered(filename)
|
||||
.done(function() {
|
||||
deferred.notify(_.sprintf(gettext("Deleted %(filename)s..."), {filename: filename}), true);
|
||||
deferred.notify(_.sprintf(gettext("Deleted %(filename)s..."), {filename: _.escape(filename)}), true);
|
||||
})
|
||||
.fail(function() {
|
||||
deferred.notify(_.sprintf(gettext("Deletion of %(filename)s failed, continuing..."), {filename: filename}), false);
|
||||
deferred.notify(_.sprintf(gettext("Deletion of %(filename)s failed, continuing..."), {filename: _.escape(filename)}), false);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
@@ -419,7 +419,7 @@ $(function() {
|
||||
|
||||
var text;
|
||||
if (!payload.postroll_duration) {
|
||||
text = _.sprintf(gettext("Now capturing timelapse post roll, this will take only a moment..."), format);
|
||||
text = _.sprintf(gettext("Now capturing timelapse post roll, this will take only a moment..."));
|
||||
} else {
|
||||
var format = {
|
||||
time: moment().add(payload.postroll_duration, "s").format("LT")
|
||||
@@ -473,7 +473,7 @@ $(function() {
|
||||
self.onEventMovieRendering = function(payload) {
|
||||
self.displayTimelapsePopup({
|
||||
title: gettext("Rendering timelapse"),
|
||||
text: _.sprintf(gettext("Now rendering timelapse %(movie_prefix)s. Due to performance reasons it is not recommended to start a print job while a movie is still rendering."), payload),
|
||||
text: _.sprintf(gettext("Now rendering timelapse %(movie_prefix)s. Due to performance reasons it is not recommended to start a print job while a movie is still rendering."), {movie_prefix: _.escape(payload.movie_prefix)}),
|
||||
hide: false
|
||||
});
|
||||
};
|
||||
@@ -483,14 +483,14 @@ $(function() {
|
||||
|
||||
if (payload.reason === "no_frames") {
|
||||
title = gettext("Cannot render timelapse");
|
||||
html = "<p>" + _.sprintf(gettext("Rendering of timelapse %(movie_prefix)s is not possible since no frames were captured. Is the snapshot URL configured correctly?"), payload) + "</p>";
|
||||
html = "<p>" + _.sprintf(gettext("Rendering of timelapse %(movie_prefix)s is not possible since no frames were captured. Is the snapshot URL configured correctly?"), {movie_prefix: _.escape(payload.movie_prefix)}) + "</p>";
|
||||
} else if (payload.reason = "returncode") {
|
||||
title = gettext("Rendering timelapse failed");
|
||||
html = "<p>" + _.sprintf(gettext("Rendering of timelapse %(movie_prefix)s failed with return code %(returncode)s"), payload) + "</p>";
|
||||
html = "<p>" + _.sprintf(gettext("Rendering of timelapse %(movie_prefix)s failed with return code %(returncode)s"), {movie_prefix: _.escape(payload.movie_prefix), returncode: _.escape(payload.returncode)}) + "</p>";
|
||||
html += pnotifyAdditionalInfo('<pre style="overflow: auto">' + payload.error + '</pre>');
|
||||
} else {
|
||||
title = gettext("Rendering timelapse failed");
|
||||
html = "<p>" + _.sprintf(gettext("Rendering of timelapse %(movie_prefix)s failed due to an unknown error, please consult the log file"), payload) + "</p>";
|
||||
html = "<p>" + _.sprintf(gettext("Rendering of timelapse %(movie_prefix)s failed due to an unknown error, please consult the log file"), {movie_prefix: _.escape(payload.movie_prefix)}) + "</p>";
|
||||
}
|
||||
|
||||
self.displayTimelapsePopup({
|
||||
@@ -504,7 +504,7 @@ $(function() {
|
||||
self.onEventMovieDone = function(payload) {
|
||||
self.displayTimelapsePopup({
|
||||
title: gettext("Timelapse ready"),
|
||||
text: _.sprintf(gettext("New timelapse %(movie_prefix)s is done rendering."), payload),
|
||||
text: _.sprintf(gettext("New timelapse %(movie_prefix)s is done rendering."), {movie_prefix: _.escape(payload.movie_prefix)}),
|
||||
type: "success",
|
||||
callbacks: {
|
||||
before_close: function(notice) {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<form class="form-horizontal">
|
||||
{% include "snippets/settings/server/serverAllowFraming.jinja2" %}
|
||||
|
||||
<h3>{{ _('Commands') }}</h3>
|
||||
|
||||
{% include "snippets/settings/server/serverCommandServerRestart.jinja2" %}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: server_allowFraming" id="settings-serverAllowFraming"> {{ _('Allow embedding the web interface into a frame or iframe') }} <span class="label">Needs restart</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -26,7 +26,7 @@
|
||||
<input type="number" min="1" class="input-mini" id="webcam_timelapse_minDelay" data-bind="value: timelapseMinDelay, valueUpdate: 'afterkeydown', enable: !isPrinting() && loginState.isUser()">
|
||||
<span class="add-on">{{ _('sec') }}</span>
|
||||
</div>
|
||||
<span class="help-block">{{ _('OctoPrint will rate limit snapshots to this minimum interval. This it to prevent against performance issues with vase mode/continous z prints.') }}</span>
|
||||
<span class="help-block">{{ _('OctoPrint will rate limit snapshots to this minimum interval. This is to prevent against performance issues with vase mode/continous z prints.') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -7087,7 +7087,7 @@ msgstr "Minimales Intervall"
|
||||
|
||||
#: src/octoprint/templates/tabs/timelapse.jinja2:29
|
||||
msgid ""
|
||||
"OctoPrint will rate limit snapshots to this minimum interval. This it to "
|
||||
"OctoPrint will rate limit snapshots to this minimum interval. This is to "
|
||||
"prevent against performance issues with vase mode/continous z prints."
|
||||
msgstr ""
|
||||
"OctoPrint wird Zeitrafferaufnahmen auf dieses minimale Intervall "
|
||||
|
||||
@@ -7087,7 +7087,7 @@ msgstr "Minimales Intervall"
|
||||
|
||||
#: src/octoprint/templates/tabs/timelapse.jinja2:29
|
||||
msgid ""
|
||||
"OctoPrint will rate limit snapshots to this minimum interval. This it to "
|
||||
"OctoPrint will rate limit snapshots to this minimum interval. This is to "
|
||||
"prevent against performance issues with vase mode/continous z prints."
|
||||
msgstr ""
|
||||
"OctoPrint wird Zeitrafferaufnahmen auf dieses minimale Intervall "
|
||||
|
||||
@@ -6133,7 +6133,7 @@ msgstr ""
|
||||
|
||||
#: src/octoprint/templates/tabs/timelapse.jinja2:29
|
||||
msgid ""
|
||||
"OctoPrint will rate limit snapshots to this minimum interval. This it to "
|
||||
"OctoPrint will rate limit snapshots to this minimum interval. This is to "
|
||||
"prevent against performance issues with vase mode/continous z prints."
|
||||
msgstr ""
|
||||
|
||||
|
||||
Reference in new issue
Block a user