mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-24 15:15:22 +00:00
allinstances.html: fix identation. Remove redundant div blocks
This commit is contained in:
parent
57665c2ab9
commit
d95b5a4017
1 changed files with 111 additions and 115 deletions
|
@ -24,121 +24,117 @@
|
||||||
|
|
||||||
{% include 'errors_block.html' %}
|
{% include 'errors_block.html' %}
|
||||||
|
|
||||||
<div class="row">
|
<div class="col-lg-12">
|
||||||
<div class="col-lg-12">
|
{% if request.user.is_superuser %}
|
||||||
<div class="table-responsive">
|
{% if not all_host_vms %}
|
||||||
{% if request.user.is_superuser %}
|
<div class="col-lg-12">
|
||||||
{% if not all_host_vms %}
|
<div class="alert alert-warning alert-dismissable">
|
||||||
<div class="col-lg-12">
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
<div class="alert alert-warning alert-dismissable">
|
<i class="fa fa-exclamation-triangle"></i> <strong>{% trans "Warning" %}:</strong> {% trans "You don't have any Instance" %}
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
</div>
|
||||||
<i class="fa fa-exclamation-triangle"></i> <strong>{% trans "Warning:" %}</strong> {% trans "You don't have any Instance" %}
|
</div>
|
||||||
</div>
|
{% else %}
|
||||||
</div>
|
{% ifequal view_style "nongrouped" %}
|
||||||
{% else %}
|
{% include 'allinstances_index_nongrouped.html' %}
|
||||||
{% ifequal view_style "nongrouped" %}
|
{% endifequal %}
|
||||||
{% include 'allinstances_index_nongrouped.html' %}
|
{% ifequal view_style "grouped" %}
|
||||||
{% endifequal %}
|
{% include 'allinstances_index_grouped.html' %}
|
||||||
{% ifequal view_style "grouped" %}
|
{% endifequal %}
|
||||||
{% include 'allinstances_index_grouped.html' %}
|
{% endif %}
|
||||||
{% endifequal %}
|
{% else %}
|
||||||
{% endif %}
|
{% if not all_user_vms %}
|
||||||
{% else %}
|
<div class="col-lg-12">
|
||||||
{% if not all_user_vms %}
|
<div class="alert alert-warning alert-dismissable">
|
||||||
<div class="col-lg-12">
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
<div class="alert alert-warning alert-dismissable">
|
<i class="fa fa-exclamation-triangle"></i> <strong>{% trans "Warning" %}:</strong> {% trans "You don't have any Instance" %}
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
</div>
|
||||||
<i class="fa fa-exclamation-triangle"></i> <strong>{% trans "Warning" %}:</strong> {% trans "You don't have any Instance" %}
|
</div>
|
||||||
</div>
|
{% else %}
|
||||||
</div>
|
<table class="table table-hover table-striped sortable-theme-bootstrap" data-sortable>
|
||||||
{% else %}
|
<thead>
|
||||||
<table class="table table-hover table-striped sortable-theme-bootstrap" data-sortable>
|
<tr>
|
||||||
<thead>
|
<th>{% trans 'Name' %}</th>
|
||||||
<tr>
|
<th>{% trans 'Status' %}</th>
|
||||||
<th>{% trans 'Name' %}</th>
|
<th>{% trans 'VCPU' %}</th>
|
||||||
<th>{% trans 'Status' %}</th>
|
<th>{% trans 'Memory' %}</th>
|
||||||
<th>{% trans 'VCPU' %}</th>
|
<th data-sortable="false" style="width: 165px;">{% trans 'Actions' %}</th>
|
||||||
<th>{% trans 'Memory' %}</th>
|
</tr>
|
||||||
<th data-sortable="false" style="width: 165px;">{% trans 'Actions' %}</th>
|
</thead>
|
||||||
</tr>
|
<tbody class="searchable">
|
||||||
</thead>
|
{% for inst, vm in all_user_vms.items %}
|
||||||
<tbody class="searchable">
|
<tr>
|
||||||
{% for inst, vm in all_user_vms.items %}
|
<td><a href="{% url 'instance' vm.compute_id vm.name %}">{{ vm.name }}</a><br><small><em>{{ vm.title }}</em></small></td>
|
||||||
<tr>
|
<td>{% ifequal vm.status 1 %}
|
||||||
<td><a href="{% url 'instance' vm.compute_id vm.name %}">{{ vm.name }}</a><br><small><em>{{ vm.title }}</em></small></td>
|
<span class="text-success">{% trans "Active" %}</span>
|
||||||
<td>{% ifequal vm.status 1 %}
|
{% endifequal %}
|
||||||
<span class="text-success">{% trans "Active" %}</span>
|
{% ifequal vm.status 5 %}
|
||||||
{% endifequal %}
|
<span class="text-danger">{% trans "Off" %}</span>
|
||||||
{% ifequal vm.status 5 %}
|
{% endifequal %}
|
||||||
<span class="text-danger">{% trans "Off" %}</span>
|
{% ifequal vm.status 3 %}
|
||||||
{% endifequal %}
|
<span class="text-warning">{% trans "Suspend" %}</span>
|
||||||
{% ifequal vm.status 3 %}
|
{% endifequal %}
|
||||||
<span class="text-warning">{% trans "Suspend" %}</span>
|
</td>
|
||||||
{% endifequal %}
|
<td>{{ vm.vcpu }}</td>
|
||||||
</td>
|
<td>{{ vm.memory }} {% trans "MB" %}</td>
|
||||||
<td>{{ vm.vcpu }}</td>
|
<td><form action="" method="post" role="form">{% csrf_token %}
|
||||||
<td>{{ vm.memory }} {% trans "MB" %}</td>
|
<input type="hidden" name="name" value="{{ vm.name }}"/>
|
||||||
<td><form action="" method="post" role="form">{% csrf_token %}
|
<input type="hidden" name="compute_id" value="{{ vm.compute_id }}"/>
|
||||||
<input type="hidden" name="name" value="{{ vm.name }}"/>
|
{% ifequal vm.status 5 %}
|
||||||
<input type="hidden" name="compute_id" value="{{ vm.compute_id }}"/>
|
{% if inst.instance.is_template %}
|
||||||
{% ifequal vm.status 5 %}
|
<button class="btn btn-sm btn-default" type="button" name="clone" title="{% trans "Clone" %}" onclick="goto_instance_clone({{ vm.compute_id }}, '{{ vm.name }}');">
|
||||||
{% if inst.instance.is_template %}
|
<span class="glyphicon glyphicon-duplicate"></span>
|
||||||
<button class="btn btn-sm btn-default" type="button" name="clone" title="{% trans "Clone" %}" onclick="goto_instance_clone({{ vm.compute_id }}, '{{ vm.name }}');">
|
</button>
|
||||||
<span class="glyphicon glyphicon-duplicate"></span>
|
{% else %}
|
||||||
</button>
|
<button class="btn btn-sm btn-default" type="submit" name="poweron" title="{% trans "Power On" %}">
|
||||||
{% else %}
|
<span class="glyphicon glyphicon-play"></span>
|
||||||
<button class="btn btn-sm btn-default" type="submit" name="poweron" title="{% trans "Power On" %}">
|
</button>
|
||||||
<span class="glyphicon glyphicon-play"></span>
|
{% endif %}
|
||||||
</button>
|
<button class="btn btn-sm btn-default disabled" title="{% trans "Power Off" %}">
|
||||||
{% endif %}
|
<span class="glyphicon glyphicon-off"></span>
|
||||||
<button class="btn btn-sm btn-default disabled" title="{% trans "Power Off" %}">
|
</button>
|
||||||
<span class="glyphicon glyphicon-off"></span>
|
<button class="btn btn-sm btn-default disabled" title="{% trans "Power Cycle" %}">
|
||||||
</button>
|
<span class="glyphicon glyphicon-refresh"></span>
|
||||||
<button class="btn btn-sm btn-default disabled" title="{% trans "Power Cycle" %}">
|
</button>
|
||||||
<span class="glyphicon glyphicon-refresh"></span>
|
<button class="btn btn-sm btn-default disabled" title="{% trans "VNC Console" %}">
|
||||||
</button>
|
<span class="glyphicon glyphicon-eye-open"></span>
|
||||||
<button class="btn btn-sm btn-default disabled" title="{% trans "VNC Console" %}">
|
</button>
|
||||||
<span class="glyphicon glyphicon-eye-open"></span>
|
{% endifequal %}
|
||||||
</button>
|
{% ifequal vm.status 3 %}
|
||||||
{% endifequal %}
|
<button class="btn btn-sm btn-default disabled" title="{% trans "Power On" %}">
|
||||||
{% ifequal vm.status 3 %}
|
<span class="glyphicon glyphicon-play"></span>
|
||||||
<button class="btn btn-sm btn-default disabled" title="{% trans "Power On" %}">
|
</button>
|
||||||
<span class="glyphicon glyphicon-play"></span>
|
<button class="btn btn-sm btn-default disabled" title="{% trans "Power Off" %}">
|
||||||
</button>
|
<span class="glyphicon glyphicon-off"></span>
|
||||||
<button class="btn btn-sm btn-default disabled" title="{% trans "Power Off" %}">
|
</button>
|
||||||
<span class="glyphicon glyphicon-off"></span>
|
<button class="btn btn-sm btn-default disabled" title="{% trans "Power Cycle" %}">
|
||||||
</button>
|
<span class="glyphicon glyphicon-refresh"></span>
|
||||||
<button class="btn btn-sm btn-default disabled" title="{% trans "Power Cycle" %}">
|
</button>
|
||||||
<span class="glyphicon glyphicon-refresh"></span>
|
<button class="btn btn-sm btn-default disabled" title="{% trans "VNC/Spice Console" %}">
|
||||||
</button>
|
<span class="glyphicon glyphicon-eye-open"></span>
|
||||||
<button class="btn btn-sm btn-default disabled" title="{% trans "VNC/Spice Console" %}">
|
</button>
|
||||||
<span class="glyphicon glyphicon-eye-open"></span>
|
{% endifequal %}
|
||||||
</button>
|
{% ifequal vm.status 1 %}
|
||||||
{% endifequal %}
|
<button class="btn btn-sm btn-default disabled" title="{% trans "Power On" %}">
|
||||||
{% ifequal vm.status 1 %}
|
<span class="glyphicon glyphicon-play"></span>
|
||||||
<button class="btn btn-sm btn-default disabled" title="{% trans "Power On" %}">
|
</button>
|
||||||
<span class="glyphicon glyphicon-play"></span>
|
<button class="btn btn-sm btn-default" type="submit" name="poweroff" title="{% trans "Power Off" %}">
|
||||||
</button>
|
<span class="glyphicon glyphicon-off"></span>
|
||||||
<button class="btn btn-sm btn-default" type="submit" name="poweroff" title="{% trans "Power Off" %}">
|
</button>
|
||||||
<span class="glyphicon glyphicon-off"></span>
|
<button class="btn btn-sm btn-default" type="submit" name="powercycle" title="{% trans "Power Cycle" %}" onclick="return confirm('Are you sure?')">
|
||||||
</button>
|
<span class="glyphicon glyphicon-refresh"></span>
|
||||||
<button class="btn btn-sm btn-default" type="submit" name="powercycle" title="{% trans "Power Cycle" %}" onclick="return confirm('Are you sure?')">
|
</button>
|
||||||
<span class="glyphicon glyphicon-refresh"></span>
|
<a href="#" class="btn btn-sm btn-default" onclick='open_console("{{ vm.compute_id }}-{{ vm.uuid }}")' title="{% trans "Console" %}">
|
||||||
</button>
|
<span class="glyphicon glyphicon-eye-open"></span>
|
||||||
<a href="#" class="btn btn-sm btn-default" onclick='open_console("{{ vm.compute_id }}-{{ vm.uuid }}")' title="{% trans "Console" %}">
|
</a>
|
||||||
<span class="glyphicon glyphicon-eye-open"></span>
|
{% endifequal %}
|
||||||
</a>
|
</form>
|
||||||
{% endifequal %}
|
</td>
|
||||||
</form>
|
</tr>
|
||||||
</td>
|
{% endfor %}
|
||||||
</tr>
|
</tbody>
|
||||||
{% endfor %}
|
</table>
|
||||||
</tbody>
|
{% endif %}
|
||||||
</table>
|
{% endif %}
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block script %}
|
{% block script %}
|
||||||
|
|
Loading…
Reference in a new issue