Example #1
0
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")
Example #2
0
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
Example #3
0
def get_module_api(module_id):
    apis = models.Api.objects.filter(module_id=module_id)
    return public.model_to_list(apis)
Example #4
0
def get_api_record(api_id):
    return public.model_to_list(models.ApiRecord.objects.filter(api_id=api_id))
Example #5
0
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")
Example #6
0
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
Example #7
0
def get_module_api(module_id):
    apis = models.Api.objects.filter(module_id=module_id)
    return public.model_to_list(apis)
Example #8
0
def get_api_record(api_id):
    return public.model_to_list(models.ApiRecord.objects.filter(api_id = api_id))
Example #9
0
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")
Example #10
0
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")