Add bindings to Cura settings.
This commit is contained in:
parent
87edcc4966
commit
40650f1bde
3 changed files with 22 additions and 9 deletions
|
|
@ -80,11 +80,11 @@ default_settings = {
|
|||
"userManager": "octoprint.users.FilebasedUserManager",
|
||||
"userfile": None
|
||||
},
|
||||
"curaEngine": {
|
||||
"enabled": False,
|
||||
"cura_path": "",
|
||||
"cura_config": ""
|
||||
}
|
||||
"curaEngine": {
|
||||
"enabled": True,
|
||||
"cura_path": "",
|
||||
"cura_config": ""
|
||||
}
|
||||
}
|
||||
|
||||
valid_boolean_trues = ["true", "yes", "y", "1"]
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ function ConnectionViewModel(loginStateViewModel) {
|
|||
self.selectedBaudrate = ko.observable(undefined);
|
||||
self.saveSettings = ko.observable(undefined);
|
||||
|
||||
self.isErrorOrClosed = ko.observable(undefined);
|
||||
self.isErrorOrClosed = ko.observable(undefined);
|
||||
self.isOperational = ko.observable(undefined);
|
||||
self.isPrinting = ko.observable(undefined);
|
||||
self.isPaused = ko.observable(undefined);
|
||||
|
|
@ -1340,6 +1340,9 @@ function SettingsViewModel(loginStateViewModel, usersViewModel) {
|
|||
self.folder_timelapse = ko.observable(undefined);
|
||||
self.folder_timelapseTmp = ko.observable(undefined);
|
||||
self.folder_logs = ko.observable(undefined);
|
||||
|
||||
self.cura_engine_path = ko.observable(undefined);
|
||||
self.cura_config_path = ko.observable(undefined);
|
||||
|
||||
self.temperature_profiles = ko.observableArray(undefined);
|
||||
|
||||
|
|
@ -1387,6 +1390,10 @@ function SettingsViewModel(loginStateViewModel, usersViewModel) {
|
|||
self.folder_timelapse(response.folder.timelapse);
|
||||
self.folder_timelapseTmp(response.folder.timelapseTmp);
|
||||
self.folder_logs(response.folder.logs);
|
||||
|
||||
self.cura_enabled(response.curaEngine.cura_enabled);
|
||||
self.cura_engine_path(response.curaEngine.cura_path);
|
||||
self.cura_config_path(response.curaEngine.config_path);
|
||||
|
||||
self.temperature_profiles(response.temperature.profiles);
|
||||
|
||||
|
|
@ -1431,7 +1438,13 @@ function SettingsViewModel(loginStateViewModel, usersViewModel) {
|
|||
},
|
||||
"system": {
|
||||
"actions": self.system_actions()
|
||||
}
|
||||
},
|
||||
"curaEngine": {
|
||||
"enabled": self.cura_enabled(),
|
||||
"cura_path": self.cura_engine_path(),
|
||||
"cura_config": self.cura_config_path()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
|
|
|
|||
|
|
@ -22,13 +22,13 @@
|
|||
<div class="control-group">
|
||||
<label class="control-label" for="settings-curaPath">CuraEngine Path</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level">
|
||||
<input type="text" class="input-block-level" data-bind="value: cura_engine_path">
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="settings-curaPath">Cura Config</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="input-block-level">
|
||||
<input type="text" class="input-block-level" data-bind="value: cura_config_path">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
|||
Loading…
Reference in a new issue