1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-24 23:25:24 +00:00

minor corrections

This commit is contained in:
catborise 2018-07-18 15:46:11 +03:00
parent 19b3d867f3
commit 654dcddf03

View file

@ -6,8 +6,8 @@
<link rel="stylesheet" href="{% static "css/sortable-theme-bootstrap.css" %}"/> <link rel="stylesheet" href="{% static "css/sortable-theme-bootstrap.css" %}"/>
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<!-- Page Heading --> <!-- Page Heading -->
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
{% if request.user.is_superuser %} {% if request.user.is_superuser %}
{% include 'create_inst_block.html' %} {% include 'create_inst_block.html' %}
@ -19,12 +19,12 @@
{% endif %} {% endif %}
<h1 class="page-header">{% trans "Instances" %}</h1> <h1 class="page-header">{% trans "Instances" %}</h1>
</div> </div>
</div> </div>
<!-- /.row --> <!-- /.row -->
{% include 'errors_block.html' %} {% include 'errors_block.html' %}
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<div class="table-responsive"> <div class="table-responsive">
{% if request.user.is_superuser %} {% if request.user.is_superuser %}
@ -59,26 +59,33 @@
</span>{% endifequal %} </span>{% endifequal %}
{% ifequal host.2 2 %}<span class="label label-danger">{% trans "Not Active" %} {% ifequal host.2 2 %}<span class="label label-danger">{% trans "Not Active" %}
</span>{% endifequal %} </span>{% endifequal %}
{% ifequal host.2 3 %}<span class="label label-danger">{% trans "Connection Failed" %} {% ifequal host.2 3 %}
<span class="label label-danger">{% trans "Connection Failed" %}
</span>{% endifequal %} </span>{% endifequal %}
</td> </td>
<td style="text-align:center;">{{ host.3 }}</td> <td style="text-align:center;">{{ host.3 }}</td>
<td style="text-align:right;">{{ host.4|filesizeformat }}</td> <td style="text-align:right;">{{ host.4|filesizeformat }}</td>
<td style="text-align:left;"> <td style="text-align:left;">
<div class="progress-bar-success" role="progressbar" style="width: {{ host.5 }}%" <div class="progress-bar-success" role="progressbar"
aria-valuenow="{{ host.5 }}" aria-valuemin="0" aria-valuemax="100">{{ host.5 }}% style="width: {{ host.5 }}%" aria-valuenow="{{ host.5 }}" aria-valuemin="0"
aria-valuemax="100">{{ host.5 }}%
</div> </div>
</td> </td>
</tr> </tr>
{% for vm, info in inst.items %}
<tr>
<td></td> <td></td>
<td>{{ forloop.counter }} &emsp; <a href="{% url 'instance' host.0 vm %}">{{ vm }}</a><br> <td>{{ forloop.counter }} &emsp; <a
href="{% url 'instance' host.0 vm %}">{{ vm }}</a><br>
<small><em>{{ info.title }}</em></small> <small><em>{{ info.title }}</em></small>
</td> </td>
<td> <td>
<small><em> <small><em>{% if info.userinstances.count > 0 %}
{% if info.userinstances.count > 0 %}{{ info.userinstances.first_user.user.username }} {{ info.userinstances.first_user.user.username }}
{% if info.userinstances.count > 1 %} (+{{ info.userinstances.count|add:"-1" }}) {% if info.userinstances.count > 1 %} (+
{% endif %}{% endif %}</em></small> {{ info.userinstances.count|add:"-1" }}){% endif %}{% endif %}</em>
</small>
</td> </td>
<td>{% ifequal info.status 1 %} <td>{% ifequal info.status 1 %}
<span class="text-success">{% trans "Active" %}</span> <span class="text-success">{% trans "Active" %}</span>
@ -98,27 +105,31 @@
<input type="hidden" name="compute_id" value="{{ host.0 }}"/> <input type="hidden" name="compute_id" value="{{ host.0 }}"/>
{% ifequal info.status 5 %} {% ifequal info.status 5 %}
{% if info.is_template %} {% if info.is_template %}
<button class="btn btn-sm btn-default" type="button" name="clone" <button class="btn btn-sm btn-default" type="button"
title="{% trans "Clone" %}" name="clone" title="{% trans "Clone" %}"
onclick="goto_instance_clone({{ host.0 }}, '{{ vm }}');"> onclick="goto_instance_clone({{ host.0 }}, '{{ vm }}');">
<span class="glyphicon glyphicon-duplicate"></span> <span class="glyphicon glyphicon-duplicate"></span>
</button> </button>
{% else %} {% else %}
<button class="btn btn-sm btn-default" type="submit" name="poweron" <button class="btn btn-sm btn-default" type="submit"
title="{% trans "Power On" %}"> name="poweron" title="{% trans "Power On" %}">
<span class="glyphicon glyphicon-play"></span> <span class="glyphicon glyphicon-play"></span>
</button> </button>
{% endif %} {% endif %}
<button class="btn btn-sm btn-default disabled" title="{% trans "Suspend" %}"> <button class="btn btn-sm btn-default disabled"
title="{% trans "Suspend" %}">
<span class="glyphicon glyphicon-pause"></span> <span class="glyphicon glyphicon-pause"></span>
</button> </button>
<button class="btn btn-sm btn-default disabled" title="{% trans "Power Off" %}"> <button class="btn btn-sm btn-default disabled"
title="{% trans "Power Off" %}">
<span class="glyphicon glyphicon-off"></span> <span class="glyphicon glyphicon-off"></span>
</button> </button>
<button class="btn btn-sm btn-default disabled" title="{% trans "Power Cycle" %}"> <button class="btn btn-sm btn-default disabled"
title="{% trans "Power Cycle" %}">
<span class="glyphicon glyphicon-refresh"></span> <span class="glyphicon glyphicon-refresh"></span>
</button> </button>
<button class="btn btn-sm btn-default disabled" title="{% trans "VNC Console" %}"> <button class="btn btn-sm btn-default disabled"
title="{% trans "VNC Console" %}">
<span class="glyphicon glyphicon-eye-open"></span> <span class="glyphicon glyphicon-eye-open"></span>
</button> </button>
{% endifequal %} {% endifequal %}
@ -127,21 +138,26 @@
title="{% trans "Resume" %}"> title="{% trans "Resume" %}">
<span class="glyphicon glyphicon-play"></span> <span class="glyphicon glyphicon-play"></span>
</button> </button>
<button class="btn btn-sm btn-default disabled" title="{% trans "Suspend" %}"> <button class="btn btn-sm btn-default disabled"
title="{% trans "Suspend" %}">
<span class="glyphicon glyphicon-pause"></span> <span class="glyphicon glyphicon-pause"></span>
</button> </button>
<button class="btn btn-sm btn-default disabled" title="{% trans "Power Off" %}"> <button class="btn btn-sm btn-default disabled"
title="{% trans "Power Off" %}">
<span class="glyphicon glyphicon-off"></span> <span class="glyphicon glyphicon-off"></span>
</button> </button>
<button class="btn btn-sm btn-default disabled" title="{% trans "Power Cycle" %}"> <button class="btn btn-sm btn-default disabled"
title="{% trans "Power Cycle" %}">
<span class="glyphicon glyphicon-refresh"></span> <span class="glyphicon glyphicon-refresh"></span>
</button> </button>
<button class="btn btn-sm btn-default disabled" title="{% trans "VNC Console" %}"> <button class="btn btn-sm btn-default disabled"
title="{% trans "VNC Console" %}">
<span class="glyphicon glyphicon-eye-open"></span> <span class="glyphicon glyphicon-eye-open"></span>
</button> </button>
{% endifequal %} {% endifequal %}
{% ifequal info.status 1 %} {% ifequal info.status 1 %}
<button class="btn btn-sm btn-default disabled" title="{% trans "Power On" %}"> <button class="btn btn-sm btn-default disabled"
title="{% trans "Power On" %}">
<span class="glyphicon glyphicon-play"></span> <span class="glyphicon glyphicon-play"></span>
</button> </button>
<button class="btn btn-sm btn-default" type="submit" name="suspend" <button class="btn btn-sm btn-default" type="submit" name="suspend"
@ -149,15 +165,18 @@
<span class="glyphicon glyphicon-pause"></span> <span class="glyphicon glyphicon-pause"></span>
</button> </button>
<button class="btn btn-sm btn-default" type="submit" name="poweroff" <button class="btn btn-sm btn-default" type="submit" name="poweroff"
title="{% trans "Power Off" %}" onclick="return confirm('Are you sure?')"> title="{% trans "Power Off" %}"
onclick="return confirm('Are you sure?')">
<span class="glyphicon glyphicon-off"></span> <span class="glyphicon glyphicon-off"></span>
</button> </button>
<button class="btn btn-sm btn-default" type="submit" name="powercycle" <button class="btn btn-sm btn-default" type="submit"
title="{% trans "Power Cycle" %}" onclick="return confirm('Are you sure?')"> name="powercycle" title="{% trans "Power Cycle" %}"
onclick="return confirm('Are you sure?')">
<span class="glyphicon glyphicon-refresh"></span> <span class="glyphicon glyphicon-refresh"></span>
</button> </button>
<a href="#" class="btn btn-sm btn-default" <a href="#" class="btn btn-sm btn-default"
onclick='open_console("{{ host.0 }}-{{ info.uuid }}")' title="{% trans "Console" %}"> onclick='open_console("{{ host.0 }}-{{ info.uuid }}")'
title="{% trans "Console" %}">
<span class="glyphicon glyphicon-eye-open"></span> <span class="glyphicon glyphicon-eye-open"></span>
</a> </a>
{% endifequal %} {% endifequal %}
@ -165,6 +184,7 @@
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
{% endfor %}
</tbody> </tbody>
</table> </table>
{% endif %} {% endif %}
@ -223,7 +243,8 @@
<span class="glyphicon glyphicon-play"></span> <span class="glyphicon glyphicon-play"></span>
</button> </button>
{% endif %} {% endif %}
<button class="btn btn-sm btn-default disabled" title="{% trans "Power Off" %}"> <button class="btn btn-sm btn-default disabled"
title="{% trans "Power Off" %}">
<span class="glyphicon glyphicon-off"></span> <span class="glyphicon glyphicon-off"></span>
</button> </button>
<button class="btn btn-sm btn-default disabled" <button class="btn btn-sm btn-default disabled"
@ -236,10 +257,12 @@
</button> </button>
{% endifequal %} {% endifequal %}
{% ifequal vm.status 3 %} {% ifequal vm.status 3 %}
<button class="btn btn-sm btn-default disabled" title="{% trans "Power On" %}"> <button class="btn btn-sm btn-default disabled"
title="{% trans "Power On" %}">
<span class="glyphicon glyphicon-play"></span> <span class="glyphicon glyphicon-play"></span>
</button> </button>
<button class="btn btn-sm btn-default disabled" title="{% trans "Power Off" %}"> <button class="btn btn-sm btn-default disabled"
title="{% trans "Power Off" %}">
<span class="glyphicon glyphicon-off"></span> <span class="glyphicon glyphicon-off"></span>
</button> </button>
<button class="btn btn-sm btn-default disabled" <button class="btn btn-sm btn-default disabled"
@ -252,7 +275,8 @@
</button> </button>
{% endifequal %} {% endifequal %}
{% ifequal vm.status 1 %} {% ifequal vm.status 1 %}
<button class="btn btn-sm btn-default disabled" title="{% trans "Power On" %}"> <button class="btn btn-sm btn-default disabled"
title="{% trans "Power On" %}">
<span class="glyphicon glyphicon-play"></span> <span class="glyphicon glyphicon-play"></span>
</button> </button>
<button class="btn btn-sm btn-default" type="submit" name="poweroff" <button class="btn btn-sm btn-default" type="submit" name="poweroff"
@ -280,7 +304,7 @@
{% endif %} {% endif %}
</div> </div>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}
{% block script %} {% block script %}
<script src="{% static "js/sortable.min.js" %}"></script> <script src="{% static "js/sortable.min.js" %}"></script>