Exemple #1
0
def StatusCheckSearchViewFBV(request, name=None):
    if request.method == 'GET':
        form = HostSearchForm(request.GET)
        if form.is_valid():
            name = form.cleaned_data['name']
            return redirect('checks_search', name=name)
        else:
            return redirect('checks')
    else:
        return redirect('checks')
Exemple #2
0
def StatusCheckSearchViewFBV(request, name=None):
    if request.method == 'GET':
        form = HostSearchForm(request.GET)
        if form.is_valid():
            name = form.cleaned_data['name']
            return redirect('checks_search', name=name)
        else:
            return redirect('checks')
    else:
        return redirect('checks')
Exemple #3
0
def ServiceSearchViewFBV(request, name=None):
    if request.method == 'GET':
        form = HostSearchForm(request.GET)
        if form.is_valid():
            name = form.cleaned_data['name']
            try:
                service = Service.objects.get(name=name)
                return redirect('service', pk=service.pk)
            except Service.DoesNotExist:
                # return redirect('instances')
                return redirect('service_search', name=name)
            return redirect('service_search', name=name)
        else:
            return redirect('services')
    else:
        return redirect("services")
Exemple #4
0
def StatusCheckSearchViewFBV(request, name=None):
    if request.method == 'GET':
        form = HostSearchForm(request.GET)
        if form.is_valid():
            name = form.cleaned_data['name']

            try:
                check = StatusCheck.objects.get(name=name)
                return redirect('check', pk=check.pk)
            except StatusCheck.DoesNotExist:
                # return redirect('instances')
                return redirect('checks_search', name=name)
        else:
            return redirect('checks')
    else:
        return redirect('checks')
Exemple #5
0
def ServiceSearchViewFBV(request, name=None):
    if request.method == 'GET':
        form = HostSearchForm(request.GET)
        if form.is_valid():
            name = form.cleaned_data['name']
            try:
                service = Service.objects.get(name=name)
                return redirect('service', pk=service.pk)
            except Service.DoesNotExist:
                # return redirect('instances')
                return redirect('service_search', name=name)
            return redirect('service_search', name=name)
        else:
            return redirect('services')
    else:
        return redirect("services")
Exemple #6
0
def StatusCheckSearchViewFBV(request, name=None):
    if request.method == 'GET':
        form = HostSearchForm(request.GET)
        if form.is_valid():
            name = form.cleaned_data['name']

            try:
                check = StatusCheck.objects.get(name=name)
                return redirect('check', pk=check.pk)
            except StatusCheck.DoesNotExist:
                # return redirect('instances')
                return redirect('checks_search', name=name)
        else:
            return redirect('checks')
    else:
        return redirect('checks')