Exemplo n.º 1
0
def form_get_services_statuses(request):
    try:
        if request.is_authenticated:
            return get_info()
        else:
            return HttpResponseForbidden
    except:
        return HttpResponseBadRequest
Exemplo n.º 2
0
def form_get_service_status_history(request):
    try:
        if request.is_authenticated:
            return get_info(service=request.FORM.service)
        else:
            return HttpResponseForbidden
    except:
        return HttpResponseBadRequest
Exemplo n.º 3
0
def form_get_last4_statuses(request):
    try:
        if request.is_authenticated:
            return get_info(service=None, display=True)
        else:
            return HttpResponseForbidden
    except:
        return HttpResponseBadRequest
Exemplo n.º 4
0
def get_service_status_history(request):
    try:
        service = request.POST.service
    except:
        try:
            service = json.loads(request.BODY)['service']
        except:
            try:
                service = request.BODY['service']
            except:
                return HttpResponseBadRequest
    return get_info(service=service)
Exemplo n.º 5
0
def get_services_statuses(request):
    return get_info()