示例#1
0
文件: preloader.py 项目: ooici/ape
    def perform_preload(self):
        self.loader.path = self.config.path
        self.loader.categories = self.config.resources
        self.loader.attachment_path = "res/preload/r2_ioc/attachments"

        if self.config.uipath:
            ui_loader = UILoader(self.loader)
            ui_loader.load_ui(self.config.uipath)

        self.loader.load_ion(self.config.scenarios)
示例#2
0
    def reset_ui_specs(self, url=''):
        url = url or self.CFG.get_safe("service.directory.default_uispecs_url")
        #if type(url) is not str or not url.startswith("http"):
        if type(url) is not str:
            raise BadRequest("URL not valid: %s" % url)

        ui_loader = UILoader(self)
        ui_loader.load_ui(url)

        return ui_loader.warnings
示例#3
0
    def reset_ui_specs(self, url=''):
        url = url or self.CFG.get_safe("service.directory.default_uispecs_url")
        #if type(url) is not str or not url.startswith("http"):
        if type(url) is not str:
            raise BadRequest("URL not valid: %s" % url)

        ui_loader = UILoader(self)
        ui_loader.load_ui(url)

        return ui_loader.warnings