Example #1
0
def get_group_view(request):
    data = {}
    data["auth"] = utils.check_auth(request)
    param = {}
    param["id"] = request.GET.get("id")
    param["work_id"] = request.GET.get("work_id", "")
    data["work_id"] = param["work_id"]
    data["group"] = data_utils.get_api_group_list(param)
    return render(request, 'api_group.html', {"data": data})
Example #2
0
def get_group_view(request):
    data = {}
    data["auth"] = utils.check_auth(request)
    param = {}
    param["id"] = request.GET.get("id")
    param["work_id"] = request.GET.get("work_id", "")
    data["work_id"] = param["work_id"]
    data["group"] = data_utils.get_api_group_list(param)
    return render(request, 'api_group.html', {"data": data})
Example #3
0
def add_interface_view(request):
    if request.method == "POST":
        ret = data_utils.save_api(request)
        return public.success_result_http(ret)
    else:
        data = {}
        data["auth"] = utils.check_auth(request)
        data["work_id"] = request.GET.get("work_id", "")
        data["group_id"] = request.GET.get("group_id", "")
        data["group"] = data_utils.get_api_group_list({"work_id": data["work_id"]})
        data["work"] = data_utils.get_api_work()
        data["urlHost"] = data_utils.get_url_host_list()
        data["structure"] = data_utils.get_data_structure()
        data["api_tag"] = data_utils.get_api_tag_list()
        data["api"] = data_utils.get_api(request.GET.get("id"))
        return render(request, 'add_interface.html', {"data": data})
Example #4
0
def add_interface_view(request):
    if request.method == "POST":
        ret = data_utils.save_api(request)
        return public.success_result_http(ret)
    else:
        data = {}
        data["auth"] = utils.check_auth(request)
        data["work_id"] = request.GET.get("work_id", "")
        data["group_id"] = request.GET.get("group_id", "")
        data["group"] = data_utils.get_api_group_list(
            {"work_id": data["work_id"]})
        data["work"] = data_utils.get_api_work()
        data["urlHost"] = data_utils.get_url_host_list()
        data["structure"] = data_utils.get_data_structure()
        data["api_tag"] = data_utils.get_api_tag_list()
        data["api"] = data_utils.get_api(request.GET.get("id"))
        return render(request, 'add_interface.html', {"data": data})