parent
bc6302e967
commit
c1e2cb5ae0
|
@ -118,19 +118,19 @@ class KlipperPlugin(
|
||||||
)
|
)
|
||||||
return data
|
return data
|
||||||
|
|
||||||
def reloadConfigfile(self):
|
def reloadConfigfile(self):
|
||||||
data = octoprint.plugin.SettingsPlugin.on_settings_load(self)
|
data = octoprint.plugin.SettingsPlugin.on_settings_load(self)
|
||||||
|
|
||||||
filepath = os.path.expanduser(
|
filepath = os.path.expanduser(
|
||||||
self._settings.get(["configuration", "configpath"]))
|
self._settings.get(["configuration", "configpath"]))
|
||||||
try:
|
try:
|
||||||
f = open(filepath, "r", encoding="utf-8")
|
f = open(filepath, "r", encoding="utf-8")
|
||||||
data["config"] = f.read()
|
data["config"] = f.read()
|
||||||
f.close()
|
f.close()
|
||||||
except IOError:
|
except IOError:
|
||||||
self._logger.error(
|
self._logger.error(
|
||||||
"Error: Klipper config file not found at: {}".format(filepath))
|
"Error: Klipper config file not found at: {}".format(filepath))
|
||||||
return data
|
return data
|
||||||
|
|
||||||
def on_settings_save(self, data):
|
def on_settings_save(self, data):
|
||||||
if "config" in data:
|
if "config" in data:
|
||||||
|
|
|
@ -42,11 +42,11 @@
|
||||||
padding: 1px;
|
padding: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul#klipper-settings {
|
ul#klipper-settings {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#klipper-settings a{
|
#klipper-settings a{
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,8 +62,6 @@ ul#klipper-settings {
|
||||||
}
|
}
|
||||||
|
|
||||||
#tab_plugin_klipper_main .span8 {
|
#tab_plugin_klipper_main .span8 {
|
||||||
min-width: 50%;
|
|
||||||
width: unset;
|
|
||||||
flex-grow: 8;
|
flex-grow: 8;
|
||||||
float: left;
|
float: left;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
Loading…
Reference in New Issue