Example #1
0
def taskResultCheck(request):
    langDict = getLangTextDict(request)

    context = {}
    if not isRelease:
        context["env"] = "test"
    context["taskExecuteResult"] = "current-page"
    context["checkBusinessLine"] = dbModelListToListDict(
        BusinessService.getAllBusinessLine())
    context["checkModules"] = dbModelListToListDict(
        ModulesService.getAllModules())
    context["httpConf"] = HttpConfService.queryHttpConfSort(request)
    # 文本
    text = {}
    text["pageTitle"] = langDict["web"]["httpTaskCheckPageHeadings_check"]
    context["text"] = text

    context["page"] = 1
    return render(request, "InterfaceTest/HTTPTask/HTTP_task_ExecResult.html",
                  context)
Example #2
0
def getTaskForId(request):
    langDict = getLangTextDict(request)
    id = request.GET.get("id")
    if VersionService.isCurrentVersion(request):
        taskData = HTTP_taskService.getTaskForId(id)
    else:
        taskData = HTTP_taskService.getVersionTaskForId(
            id, VersionService.getVersionName(request))

    if not taskData:
        return HttpResponse(ApiReturn(ApiReturn.CODE_TASK_EXCEPITON).toJson())
    taskDataDict = dbModelToDict(taskData)
    taskDataUser = dbModelToDict(taskData.addBy)
    del taskDataUser["id"]
    taskDataDict.update(taskDataUser)
    context = {}
    context.update(getServiceConf(request))
    context["httpConf"] = HttpConfService.queryHttpConfSort(request)
    context["taskData"] = taskDataDict
    context["option"] = request.GET.get("option")
    return render(request,
                  "InterfaceTest/HTTPTask/SubPages/task_Run_DetailsPage.html",
                  context)