importing get_ctrl() from config
This commit is contained in:
@@ -77,7 +77,7 @@ script#macros-template(type="text/x-template")
|
|||||||
.gcodeContainer
|
.gcodeContainer
|
||||||
textarea.new-gcode( :value='newGcode[tab-1]' @input="updateNewGcode")
|
textarea.new-gcode( :value='newGcode[tab-1]' @input="updateNewGcode")
|
||||||
//- gcode-viewer(v-if="state.selected !== 'default'")
|
//- gcode-viewer(v-if="state.selected !== 'default'")
|
||||||
p.new-gcode {{newGcode[tab-1]}}
|
p.gcode-para{{newGcode[tab-1]}}
|
||||||
button.submit-macros(title="Save Macros",@click="confirmSave=true",
|
button.submit-macros(title="Save Macros",@click="confirmSave=true",
|
||||||
style="height:50px;width:140px;font-weight:normal;background-color:#add1ad;color:#fff;border:0;margin-top:30px") Save
|
style="height:50px;width:140px;font-weight:normal;background-color:#add1ad;color:#fff;border:0;margin-top:30px") Save
|
||||||
button.submit-macros(title="Cancel Macros",@click="cancelMacros",
|
button.submit-macros(title="Cancel Macros",@click="cancelMacros",
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
|
import bbctrl.RequestHandler
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
from pkg_resources import Requirement, resource_filename
|
from pkg_resources import Requirement, resource_filename
|
||||||
|
|
||||||
@@ -54,7 +55,7 @@ class Config(object):
|
|||||||
except Exception: self.log.exception('Internal error: Failed to load config template')
|
except Exception: self.log.exception('Internal error: Failed to load config template')
|
||||||
|
|
||||||
def update_gcode_list(self):
|
def update_gcode_list(self):
|
||||||
self.values['gcodeList'] = self.get_ctrl().state.return_files()
|
self.values['gcodeList'] = bbctrl.RequestHandler.get_ctrl().state.return_files()
|
||||||
|
|
||||||
|
|
||||||
def load(self):
|
def load(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user