def interface_show_view(request): data = {} data["auth"] = utils.check_auth(request) data["urlHost"] = data_utils.get_url_host_list() data["api"] = data_utils.get_api(request.GET.get("id")) data["structure"] = data_utils.get_data_structure() data["mob_version"] = data_utils.get_mob_version_list() return render(request, 'interface_show.html', {"data": data})
def save_data_structure_view(request): if request.method == "POST": ret = data_utils.save_data_structure(request) return public.success_result_http(ret) else: data = {} data["structure"] = data_utils.get_data_structure() data["current"] = data_utils.get_structure_dict(request.GET.get("id")) return render(request, 'edit_structure.html', {"data": data})
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})
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})
def get_data_structure_view(request): data = {} data["structure"] = data_utils.get_data_structure() return render(request, 'data_structure.html', {"data": data})