mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-24 23:25:24 +00:00
Hypervisor list rearrange view on Host overview, if it is more than 4
This commit is contained in:
parent
49e179590e
commit
3752ad5160
1 changed files with 16 additions and 17 deletions
|
@ -53,31 +53,30 @@
|
||||||
<div class="col-xs-8 col-sm-9">
|
<div class="col-xs-8 col-sm-9">
|
||||||
<p>{{ hostname }}</p>
|
<p>{{ hostname }}</p>
|
||||||
<p><div class="btn-group" style="margin-left: 8px">
|
<p><div class="btn-group" style="margin-left: 8px">
|
||||||
{% for arch, hpv in hypervisor.items %}
|
{% for arch, hpv in hypervisor.items|slice:":4" %}
|
||||||
{% if forloop.counter < 4 %}
|
<div class="btn-group" >
|
||||||
<div class="btn-group" >
|
<button class="btn btn-xs btn-default dropdown-toggle" type="button" id="dropdownMenuButton{{ forloop.counter0 }}" data-toggle="dropdown">
|
||||||
|
{{ arch }}
|
||||||
|
<span class="caret"></span>
|
||||||
|
</button>
|
||||||
|
<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton{{ forloop.counter0 }}" role="menu">
|
||||||
|
{% for h in hpv %}
|
||||||
|
<li><a href="#">{{ h }}</a></li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
{% if hypervisor.items|length > 4 %}
|
||||||
<button class="btn btn-xs btn-default dropdown-toggle" type="button" id="dropdownMenuButton{{ forloop.counter0 }}" data-toggle="dropdown">
|
<button class="btn btn-xs btn-default dropdown-toggle" type="button" id="dropdownMenuButton{{ forloop.counter0 }}" data-toggle="dropdown">
|
||||||
{{ arch }}
|
{{ hypervisor.items|slice:"4:"|length }} {% trans 'more' %}...
|
||||||
<span class="caret"></span>
|
<span class="caret"></span>
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton{{ forloop.counter0 }}" role="menu">
|
<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton{{ forloop.counter0 }}" role="menu">
|
||||||
{% for h in hpv %}
|
{% for arc in hypervisor.keys|slice:"4:" %}
|
||||||
<li><a href="#">{{ h }}</a></li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
{% else %}
|
|
||||||
<button class="btn btn-xs btn-default dropdown-toggle" type="button" id="dropdownMenuButton{{ forloop.counter0 }}" data-toggle="dropdown">
|
|
||||||
{{ hypervisor|length }} {% trans 'more' %}...
|
|
||||||
<span class="caret"></span>
|
|
||||||
</button>
|
|
||||||
<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton{{ forloop.counter0 }}" role="menu">
|
|
||||||
{% for arc in hypervisor.keys %}
|
|
||||||
<li><a href="#">{{ arc }}</a></li>
|
<li><a href="#">{{ arc }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
|
||||||
</div></p>
|
</div></p>
|
||||||
<p>{{ emulator }}</p>
|
<p>{{ emulator }}</p>
|
||||||
<p>
|
<p>
|
||||||
|
|
Loading…
Reference in a new issue