Added system API to client lib and migrated users to it

This commit is contained in:
Gina Häußge committed 2015-10-01 14:57:41 +02:00
1 parent 8875f257ea
commit 085ab77c57
5 files changed
+51 -34

No files matched your search

@@ -580,25 +580,19 @@ $(function() {
showConfirmationDialog({
message: gettext("This will restart your OctoPrint server."),
onproceed: function() {
$.ajax({
url: self.restartCommandSpec.resource,
type: "POST",
dataType: "json",
data: "{}",
contentType: "application/json; charset=UTF-8",
success: function() {
OctoPrint.system.executeCommand("core", "restart")
.done(function() {
new PNotify({
title: gettext("Restart in progress"),
text: gettext("The server is now being restarted in the background")
})
},
error: function() {
})
.fail(function() {
new PNotify({
title: gettext("Something went wrong"),
text: gettext("Trying to restart the server produced an error, please check octoprint.log for details. You'll have to restart manually.")
})
}
});
});
}
});
}