mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-24 23:25:24 +00:00
add title to snapshot operations and fix redirect path
This commit is contained in:
parent
33513ca648
commit
cb5b0c1ecb
2 changed files with 5 additions and 5 deletions
|
@ -512,7 +512,7 @@
|
||||||
</li>
|
</li>
|
||||||
<li role="presentation">
|
<li role="presentation">
|
||||||
<a href="#managesnapshot" aria-controls="managesnapshot" role="tab" data-toggle="tab">
|
<a href="#managesnapshot" aria-controls="managesnapshot" role="tab" data-toggle="tab">
|
||||||
{% trans "Manage Snapshot" %}
|
{% trans "Manage Snapshots" %}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -560,7 +560,7 @@
|
||||||
<form action="" method="post" style="height:10px" role="form">{% csrf_token %}
|
<form action="" method="post" style="height:10px" role="form">{% csrf_token %}
|
||||||
<input type="hidden" name="name" value="{{ snap.name }}">
|
<input type="hidden" name="name" value="{{ snap.name }}">
|
||||||
{% ifequal status 5 %}
|
{% ifequal status 5 %}
|
||||||
<button type="submit" class="btn btn-sm btn-default" name="revert_snapshot" onclick="return confirm('Are you sure?')">
|
<button type="submit" class="btn btn-sm btn-default" name="revert_snapshot" title="Revert to this Snapshot" onclick="return confirm('Are you sure?')">
|
||||||
<span class="glyphicon glyphicon-save"></span>
|
<span class="glyphicon glyphicon-save"></span>
|
||||||
</button>
|
</button>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -573,7 +573,7 @@
|
||||||
<td style="width:30px;">
|
<td style="width:30px;">
|
||||||
<form action="" method="post" role="form">{% csrf_token %}
|
<form action="" method="post" role="form">{% csrf_token %}
|
||||||
<input type="hidden" name="name" value="{{ snap.name }}">
|
<input type="hidden" name="name" value="{{ snap.name }}">
|
||||||
<button type="submit" class="btn btn-sm btn-default" name="delete_snapshot" onclick="return confirm('{% trans "Are you sure?" %}')">
|
<button type="submit" class="btn btn-sm btn-default" name="delete_snapshot" title="Delete Snapshot" onclick="return confirm('{% trans "Are you sure?" %}')">
|
||||||
<span class="glyphicon glyphicon-trash"></span>
|
<span class="glyphicon glyphicon-trash"></span>
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -565,14 +565,14 @@ def instance(request, compute_id, vname):
|
||||||
conn.create_snapshot(name)
|
conn.create_snapshot(name)
|
||||||
msg = _("New snapshot")
|
msg = _("New snapshot")
|
||||||
addlogmsg(request.user.username, instance.name, msg)
|
addlogmsg(request.user.username, instance.name, msg)
|
||||||
return HttpResponseRedirect(request.get_full_path() + '#restoresnapshot')
|
return HttpResponseRedirect(request.get_full_path() + '#managesnapshot')
|
||||||
|
|
||||||
if 'delete_snapshot' in request.POST:
|
if 'delete_snapshot' in request.POST:
|
||||||
snap_name = request.POST.get('name', '')
|
snap_name = request.POST.get('name', '')
|
||||||
conn.snapshot_delete(snap_name)
|
conn.snapshot_delete(snap_name)
|
||||||
msg = _("Delete snapshot")
|
msg = _("Delete snapshot")
|
||||||
addlogmsg(request.user.username, instance.name, msg)
|
addlogmsg(request.user.username, instance.name, msg)
|
||||||
return HttpResponseRedirect(request.get_full_path() + '#restoresnapshot')
|
return HttpResponseRedirect(request.get_full_path() + '#managesnapshot')
|
||||||
|
|
||||||
if 'revert_snapshot' in request.POST:
|
if 'revert_snapshot' in request.POST:
|
||||||
snap_name = request.POST.get('name', '')
|
snap_name = request.POST.get('name', '')
|
||||||
|
|
Loading…
Reference in a new issue