Update logger settings from JsonEditor

This commit is contained in:
Tamius Han 2020-03-12 00:49:24 +01:00
parent 217206ca1e
commit d7d0f69a58

View File

@ -55,7 +55,7 @@
</div>
<div class="settings-panel flex flex-noshrink flex-column">
<JsonObject :value="currentSettings" key="logger-settings"></JsonObject>
<JsonObject :value="currentSettings" label="logger-settings" @change="updateSettingsUi"></JsonObject>
</div>
<!-- LOGGER OUTPUT/START LOGGING -->
@ -212,6 +212,15 @@ export default {
this.confHasError = true;
}
},
updateSettingsUi(val) {
try {
this.parsedSettings = JSON.stringify(val, null, 2);
this.lastSettings = val;
this.currentSettings = JSON.parse(JSON.stringify(this.lastSettings));
} catch (e) {
}
},
restoreLoggerSettings() {
this.getLoggerSettings();
this.confHasError = false;