Example #1
0
def select_storage(request):
    if request.method == "GET":
        extra_content = {'wizard_title': u'Selecione o armazenamento',
                         'title': u"Recuperação do sistema",
                         'devices' : offsite.list_disk_labels()}
        return render_to_response(request, "recovery_select_storage.html",
                                  extra_content)
    else:
        raise Http404()
Example #2
0
def select_storage(request):
    if request.method == "GET":
        extra_content = {
            'wizard_title': u'Selecione o armazenamento',
            'title': u"Recuperação do sistema",
            'devices': offsite.list_disk_labels()
        }
        return render_to_response(request, "recovery_select_storage.html",
                                  extra_content)
    else:
        raise Http404()
Example #3
0
def umount(request):
    if request.method == "GET":
        devices = offsite.list_disk_labels()
        title = u'Remover dispositivo externo com segurança'
        return render_to_response(request, "umount_storage.html", locals())

    if request.method == "POST":
        device = request.POST.get("device")

        try:
            manager = StorageDeviceManager(device)
            manager.umount()
        except UmountError, e:
            error = e
            messages.error(request, u"Erro ao remover unidade")

        messages.success(request, u"Unidade removida corretamente.")
        return redirect('nimbus.base.views.home')
Example #4
0
def umount(request):
    if request.method == "GET":
        devices = offsite.list_disk_labels()
        title = u'Remover dispositivo externo com segurança'
        return render_to_response(request, "umount_storage.html", locals())

    if request.method == "POST":
        device = request.POST.get("device")

        try:
            manager = StorageDeviceManager(device)
            manager.umount()
        except UmountError, e:
            error = e
            messages.error(request, u"Erro ao remover unidade")

        messages.success(request, u"Unidade removida corretamente.")
        return redirect('nimbus.base.views.home')
Example #5
0
def select_storage(request):
    return render_to_response(request, 
                              "select_storage.html",
                              {"devices" : managers.list_disk_labels()})
Example #6
0
def select_storage(request):
    devices = offsite.list_disk_labels()
    title = u'Cópia de segurança'
    return render_to_response(request, "system_select_storage.html", locals())
Example #7
0
def select_storage(request):
    devices = offsite.list_disk_labels()
    title = u'Cópia de segurança'
    return render_to_response(request, "system_select_storage.html", locals())
Example #8
0
def select_storage(request):
    return render_to_response(request, "select_storage.html",
                              {"devices": managers.list_disk_labels()})