Esempio n. 1
0
def clawer_analysis_history(request):
    clawer_id = request.GET.get("clawer_id")

    queryset = ClawerAnalysis.objects.filter(clawer_id=clawer_id)

    pager = EasyUIPager(queryset, request)
    return pager.query()
Esempio n. 2
0
def get_all(request):
    province = request.GET.get("province")
    q = request.GET.get("q")  # use like

    queryset = Enterprise.objects
    if q:
        queryset = queryset.filter(name__icontains=q)
    if province:
        queryset = queryset.filter(province=int(province))

    pager = EasyUIPager(queryset, request)
    return pager.query()
Esempio n. 3
0
def clawer_generate_log(request):
    status = request.GET.get("status")
    clawer_id = request.GET.get("clawer")

    queryset = ClawerGenerateLog.objects
    if status:
        queryset = queryset.filter(status=status)
    if clawer_id:
        queryset = queryset.filter(clawer_id=clawer_id)

    pager = EasyUIPager(queryset, request)
    return pager.query()
Esempio n. 4
0
def clawer_task(request):
    task_id = request.GET.get("id")
    status = request.GET.get("status")
    clawer_id = request.GET.get("clawer")

    queryset = ClawerTask.objects
    if status:
        queryset = queryset.filter(status=status)
    if task_id:
        queryset = queryset.filter(id=task_id)
    if clawer_id:
        queryset = queryset.filter(clawer_id=clawer_id)

    pager = EasyUIPager(queryset, request)
    return pager.query()
Esempio n. 5
0
def clawer_download_log(request):
    status = request.GET.get("status")
    clawer_id = request.GET.get("clawer")
    task_id = request.GET.get("task_id")

    queryset = ClawerDownloadLog.objects.filter()
    if status:
        queryset = queryset.filter(status=status)
    if clawer_id:
        queryset = queryset.filter(clawer_id=clawer_id)
    if task_id:
        queryset = queryset.filter(task_id=task_id)

    pager = EasyUIPager(queryset, request)
    return pager.query()
Esempio n. 6
0
def clawer_all(request):
    obj_id = request.GET.get("obj_id")
    status = request.GET.get("status")
    q = request.POST.get("q")  # use like

    queryset = Clawer.objects
    if obj_id:
        queryset = queryset.filter(id=int(obj_id))
    if q:
        queryset = queryset.filter(name__icontains=q)
    if status:
        queryset = queryset.filter(status=int(status))

    pager = EasyUIPager(queryset, request)
    return pager.query()
Esempio n. 7
0
def day(request):
    clawer_id = request.GET.get("clawer")
    
    qs = ClawerDayMonitor.objects.all()
    if clawer_id:
        qs = qs.filter(clawer_id=clawer_id)
        
    return EasyUIPager(qs, request).query()
Esempio n. 8
0
def clawer_analysis_log(request):
    status = request.GET.get("status")
    date = request.GET.get("date")
    clawer_id = request.GET.get("clawer")
    task_id = request.GET.get("task_id")

    queryset = ClawerAnalysisLog.objects
    if status:
        queryset = queryset.filter(status=status)
    if clawer_id:
        queryset = queryset.filter(clawer_id=clawer_id)
    if date:
        start = datetime.datetime.strptime(date, "%Y-%m-%d").replace(hour=0,
                                                                     minute=0,
                                                                     second=0)
        end = start + datetime.timedelta(1)
        queryset = queryset.filter(add_datetime__range=(start, end))
    if task_id:
        queryset = queryset.filter(task_id=task_id)

    pager = EasyUIPager(queryset, request)
    return pager.query()
Esempio n. 9
0
def all(request):
    qs = Logger.objects
    pager = EasyUIPager(qs, request)
    return pager.query()
Esempio n. 10
0
def clawer_task_generator_history(request):
    clawer_id = request.GET.get("clawer_id")

    qs = ClawerTaskGenerator.objects.filter(clawer_id=clawer_id)
    pager = EasyUIPager(qs, request)
    return pager.query()