def get_module_by_opmodule(name): op_modules = public.model_to_list( data_mgr_models.JobInfo.objects.raw( "select * from data_mgr_jobinfo where name=\"newlabs_" + name + "\"GROUP BY tag")) if len(op_modules) == 0: return "" else: return op_modules[0].get("tag")
def get_scene_api(module_id, scene_id): data = models.ApiScene.objects.filter(module_id=module_id, scene_id=scene_id) ret = public.model_to_list(data) return ret
def get_module_api(module_id): apis = models.Api.objects.filter(module_id=module_id) return public.model_to_list(apis)
def get_api_record(api_id): return public.model_to_list(models.ApiRecord.objects.filter(api_id=api_id))
def get_online_package_version(module): online_module = public.model_to_list( data_mgr_models.OnlinePackage.objects.raw( "select * from data_mgr_onlinepackage where name=\"" + module + "\"")) return online_module.get("package")
def get_api_record(api_id): return public.model_to_list(models.ApiRecord.objects.filter(api_id = api_id))
def get_module_by_opmodule(name): op_modules = public.model_to_list(data_mgr_models.JobInfo.objects.raw("select * from data_mgr_jobinfo where name=\"newlabs_" + name + "\"GROUP BY tag")) if len(op_modules) == 0: return "" else: return op_modules[0].get("tag")
def get_online_package_version(module): online_module = public.model_to_list(data_mgr_models.OnlinePackage.objects.raw("select * from data_mgr_onlinepackage where name=\"" + module +"\"")) return online_module.get("package")