importing get_ctrl() from config

This commit is contained in:
sanjayk03-dev
2024-01-22 12:41:54 +05:30
parent 99cce4b9ee
commit f6861f7630
2 changed files with 3 additions and 2 deletions

View File

@@ -77,7 +77,7 @@ script#macros-template(type="text/x-template")
.gcodeContainer
textarea.new-gcode( :value='newGcode[tab-1]' @input="updateNewGcode")
//- 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",
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",

View File

@@ -27,6 +27,7 @@
import os
import json
import bbctrl.RequestHandler
import pkg_resources
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')
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):