示例#1
0
def userHttpConfCheck(request):
    langDict = getLangTextDict(request)
    context = {}

    context["httpUserCenterUserHttpConfPage"] = "current-page"
    context["userName"] = request.session.get("userName")
    if not isRelease:
        context["env"] = "test"
    # 文本
    text = {}
    text["pageTitle"] = langDict["web"]["httpUserCenterUserHttpConfPageTitle"]
    text["subPageTitle"] = langDict["web"][
        "httpUserCenterUserHttpConfSubPageTitle"]
    context["text"] = text
    serviceConf = ServiceConfService.getServiceConf()
    context["services"] = serviceConf
    # context["uriServices"] = UriService.getUri(request)
    # context["dubboServices"] = dbModelListToListDict(TbConfigUri.objects.filter(state=1,protocol="DUBBO").order_by("level"))
    context["envConfList"] = HttpConfService.getAllHttpConf(request)
    # context["uri"] = UriService.getUri(request, "ALL")
    context["page"] = 1
    context["title"] = "环境配置"

    return render(request, "InterfaceTest/user_center/user_http_conf.html",
                  context)
示例#2
0
def userEnvUriCheck(request):
    langDict = getLangTextDict(request)
    context = {}

    context["httpUserCenterEnvURIConfPage"] = "current-page"
    context["userName"] = request.session.get("userName")
    if not isRelease:
        context["env"] = "test"
    # 文本
    text = {}
    text["pageTitle"] = "请求地址配置"
    text["subPageTitle"] = "请求地址查看"
    context["text"] = text
    context["page"] = 1
    context["envConfList"] = HttpConfService.getAllHttpConf(request)
    context["uri"] = UriService.getUri(request, "ALL")
    context["title"] = "请求地址配置"

    return render(request, "InterfaceTest/user_center/user_env_uri_conf.html",
                  context)