Fixed a bunch of issues with the software update wizard

This commit is contained in:
Gina Häußge committed 2016-03-30 15:45:13 +02:00
1 parent aecedfa57f
commit 45a79b1939
4 files changed
+42 -4

No files matched your search

@@ -11,8 +11,23 @@
var checkUrl = url + "check";
var updateUrl = url + "update";
exports.checkEntries = function(entries, force, opts) {
entries = entries || [];
if (typeof entries == "string") {
entries = [entries];
}
var data = {
force: !!force
};
if (entries && entries.length) {
data["check"] = entries.join(",")
}
return OctoPrint.getWithQuery(checkUrl, data, opts);
};
exports.check = function(force, opts) {
return OctoPrint.get(checkUrl + ((!!force) ? "?force=true" : ""), opts);
return exports.checkEntries([], force, opts);
};
exports.update = function(entries, force, opts) {
@@ -432,6 +447,11 @@ $(function() {
return true;
};
self.onAfterWizardFinish = function() {
// we might have changed our config, so we need to refresh our check data from the server
self.performCheck();
};
self.onStartup = function() {
self.workingDialog = $("#settings_plugin_softwareupdate_workingdialog");
self.workingOutput = $("#settings_plugin_softwareupdate_workingdialog_output");