示例#1
0
 def get(self, bundle):
     if not bundle.endswith(os.sep):
         bundle += os.sep
     result = []
     for plugin in get_all_plugins():
         if bundle in plugin['bundles']:
             result.append(plugin)
     self.set_header('Content-Type', 'application/json')
     self.write(json.dumps(result))
示例#2
0
文件: webserver.py 项目: EQ4/mod-ui
 def get(self, bundle):
     if not bundle.endswith(os.sep):
         bundle += os.sep
     result = []
     for plugin in get_all_plugins():
         if bundle in plugin['bundles']:
             result.append(plugin)
     self.set_header('Content-Type', 'application/json')
     self.write(json.dumps(result))
示例#3
0
文件: webserver.py 项目: EQ4/mod-ui
def prepare():
    def run_server():
        application.listen(DEVICE_WEBSERVER_PORT, address="0.0.0.0")
        if LOG:
            tornado.log.enable_pretty_logging()

    def check():
        if SESSION.host.sock is None:
            print("Host failed to initialize, is ingen running?")
            sys.exit(1)

        check_environment()

    lv2_init()

    if not APP:
        print("Scanning plugins, this may take a little...")
        get_all_plugins()
        print("Done!")

    run_server()
    tornado.ioloop.IOLoop.instance().add_callback(check)
示例#4
0
def prepare():
    def run_server():
        application.listen(DEVICE_WEBSERVER_PORT, address="0.0.0.0")
        if LOG:
            tornado.log.enable_pretty_logging()

    def check():
        if SESSION.host.sock is None:
            print("Host failed to initialize, is ingen running?")
            sys.exit(1)

        check_environment()

    lv2_init()

    if not APP:
        print("Scanning plugins, this may take a little...")
        get_all_plugins()
        print("Done!")

    run_server()
    tornado.ioloop.IOLoop.instance().add_callback(check)
示例#5
0
文件: webserver.py 项目: EQ4/mod-ui
 def get(self):
     data = get_all_plugins()
     self.set_header('Content-Type', 'application/json')
     self.write(json.dumps(data))
示例#6
0
 def get(self):
     data = get_all_plugins()
     self.set_header('Content-Type', 'application/json')
     self.write(json.dumps(data))
示例#7
0
 def list(self):
     return get_all_plugins()