mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-24 15:15:22 +00:00
Add forcibly power off option to suspended instance
This commit is contained in:
parent
a3be93874c
commit
b757c62d4f
1 changed files with 28 additions and 17 deletions
|
@ -136,12 +136,11 @@
|
|||
{% trans "Resume" %}
|
||||
</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li role="presentation" class="active">
|
||||
<a href="#resume" aria-controls="resume" role="tab" data-toggle="tab">
|
||||
{% trans "Resume" %}
|
||||
</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#powerforce" aria-controls="powerforce" role="tab" data-toggle="tab">
|
||||
{% trans "Force Off" %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endifequal %}
|
||||
{% ifequal status 5 %}
|
||||
|
@ -186,19 +185,31 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
{% endifequal %}
|
||||
{% ifequal status 3 %}
|
||||
<div role="tabpanel" class="tab-pane tab-pane-bordered active" id="resume">
|
||||
<form action="" method="post" role="form">{% csrf_token %}
|
||||
{% if request.user.is_superuser %}
|
||||
{% ifequal status 3 %}
|
||||
{% if request.user.is_superuser %}
|
||||
<div role="tabpanel" class="tab-pane tab-pane-bordered active" id="resume">
|
||||
<p>{% trans "This action restore the instance after suspend." %}</p>
|
||||
<input type="submit" name="resume" class="btn btn-lg btn-success pull-right" value="{% trans "Resume" %}">
|
||||
{% else %}
|
||||
<form action="" method="post" role="form">{% csrf_token %}
|
||||
<input type="submit" name="resume" class="btn btn-lg btn-success pull-right" value="{% trans "Resume" %}">
|
||||
<div class="clearfix"></div>
|
||||
</form>
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane tab-pane-bordered" id="powerforce">
|
||||
<p>{% trans "This action forcibly powers off the instance and may cause data corruption." %}</p>
|
||||
<form action="" method="post" role="form">{% csrf_token %}
|
||||
<input type="submit" name="powerforce" class="btn btn-lg btn-success pull-right" value="{% trans "Force Off" %}">
|
||||
<div class="clearfix"></div>
|
||||
</form>
|
||||
</div>
|
||||
{% else %}
|
||||
<div role="tabpanel" class="tab-pane tab-pane-bordered active" id="resume">
|
||||
<p>{% trans "Administrator blocked your instance." %}</p>
|
||||
<button class="btn btn-lg btn-success disabled pull-right">{% trans "Resume" %}</button>
|
||||
{% endif %}
|
||||
<div class="clearfix"></div>
|
||||
</form>
|
||||
</div>
|
||||
<form action="" method="post" role="form">{% csrf_token %}
|
||||
<button class="btn btn-lg btn-success disabled pull-right">{% trans "Resume" %}</button>
|
||||
<div class="clearfix"></div>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endifequal %}
|
||||
{% ifequal status 5 %}
|
||||
<div role="tabpanel" class="tab-pane tab-pane-bordered active" id="boot">
|
||||
|
|
Loading…
Reference in a new issue