mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-24 15:15:22 +00:00
re organize instance overview. add snapshot indicator if there is... add bottom bar for navigation.
This commit is contained in:
parent
0c8a0523a8
commit
70032fc2e1
1 changed files with 74 additions and 50 deletions
|
@ -4,61 +4,85 @@
|
||||||
{% block title %}{% trans "Instance" %} - {{ vname }}{% endblock %}
|
{% block title %}{% trans "Instance" %} - {{ vname }}{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% include 'pleasewaitdialog.html' %}
|
{% include 'pleasewaitdialog.html' %}
|
||||||
|
<nav class="navbar navbar-default navba navbar-fixed-bottom">
|
||||||
|
<div class="container">
|
||||||
|
<div class="navbar-header">
|
||||||
|
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar_bottom" aria-expanded="false" aria-controls="navbar">
|
||||||
|
<span class="sr-only">{% trans 'Toggle navigation' %}</span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
</button>
|
||||||
|
<a class="navbar-brand" href="#">{% trans 'HOST' %}</a>
|
||||||
|
</div>
|
||||||
|
<div id="navbar_bottom" class="navbar-collapse collapse">
|
||||||
|
<ul class="nav navbar-nav">
|
||||||
|
<li>
|
||||||
|
<a class="navbar-link" href="{% url 'overview' compute.id %}">
|
||||||
|
<i class="fa fa-dashboard"></i>
|
||||||
|
{{ compute.name }} {% if compute.name != compute.hostname %} - {{ compute.hostname }}{% endif %}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="{% url 'instances' compute.id %}"><i class="fa fa-server"></i> {% trans "Instances" %}</a>
|
||||||
|
</li>
|
||||||
|
<li class="active">
|
||||||
|
<a href="{% url 'instance' compute.id vname %}"><i class="fa fa-hdd-o"></i> {{ vname }}</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
<!-- Page Heading -->
|
<!-- Page Heading -->
|
||||||
<div class="row">
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<h3>
|
<h3>{{ vname }}{% if title %} ({{ title }}){% endif %}</h3>
|
||||||
{{ vname }}{% if title %} ({{ title }}){% endif %}
|
|
||||||
</h3>
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
{% if status == 5 %}
|
||||||
{% if status == 5 %}
|
<span class="label label-danger">{% trans "Off" %}</span>
|
||||||
<span class="label label-danger">{% trans "Off" %}</span>
|
{% endif %}
|
||||||
{% endif %}
|
{% if status == 1 %}
|
||||||
{% if status == 1 %}
|
<span class="label label-success">{% trans "Active" %}</span>
|
||||||
<span class="label label-success">{% trans "Active" %}</span>
|
{% endif %}
|
||||||
{% endif %}
|
{% if status == 3 %}
|
||||||
{% if status == 3 %}
|
<span class="label label-warning">{% trans "Suspend" %}</span>
|
||||||
<span class="label label-warning">{% trans "Suspend" %}</span>
|
{% endif %}
|
||||||
{% endif %}
|
|
|
||||||
|
|
<i {%if guest_agent == True %}
|
||||||
{% if cur_vcpu %}
|
{% if guest_agent_ready == True %}
|
||||||
{{ cur_vcpu }} {% trans "Vcpu" %}
|
class="fa fa-plug text-success"
|
||||||
{% else %}
|
title="Guest Agent Enabled & Connected"
|
||||||
{{ vcpu }} {% trans "Vcpu" %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
|
||||||
{{ cur_memory }} {% trans "MB" %} {% trans "Ram" %}
|
|
||||||
|
|
|
||||||
{% for disk in disks %}
|
|
||||||
{{ disk.size|filesizeformat }} {% trans "Disk" %} |
|
|
||||||
{% endfor %}
|
|
||||||
{% for net in networks %}
|
|
||||||
{% for ipv4 in net.ipv4|default:"-" %}
|
|
||||||
{{ ipv4 }} |
|
|
||||||
{% endfor %}
|
|
||||||
{% endfor %}
|
|
||||||
<button
|
|
||||||
{% if guest_agent == True %}
|
|
||||||
{% if guest_agent_ready == True %}
|
|
||||||
class="btn btn-xs btn-success"
|
|
||||||
title="Guest Agent Enabled & Connected"
|
|
||||||
{% else %}
|
|
||||||
class="btn btn-xs btn-default"
|
|
||||||
title="Guest Agent Enabled but not Connected"
|
|
||||||
{% endif %}
|
|
||||||
{% else %}
|
{% else %}
|
||||||
class="btn btn-xs btn-danger"
|
class="fa fa-plug text-warning"
|
||||||
title="Guest Agent Not Enabled & Not Connected"
|
title="Guest Agent Enabled but not Connected"
|
||||||
{% endif %} disabled>
|
{% endif %}
|
||||||
<span class="glyphicon glyphicon-flash"></span>
|
{% else %}
|
||||||
</button>
|
class="fa fa-plug text-danger"
|
||||||
|
|
title="Guest Agent Not Enabled & Not Connected"
|
||||||
<a href="{% url 'instance' compute.id vname %}" type="button" class="btn btn-xs btn-default"><span class="glyphicon glyphicon-refresh"></span></a>
|
{% endif %}>
|
||||||
<em>on</em>
|
</i>
|
||||||
<a href="{% url 'overview' compute.id %}"><span class="label label-primary">{{ compute.name }}{% if compute.name != compute.hostname %} - {{ compute.hostname }}{% endif %} </span></a>
|
|
|
||||||
</div>
|
{% if snapshots %}
|
||||||
|
<i class="fa fa-camera text-primary" title="There are {{ snapshots|length }} snapshot(s)"></i> |
|
||||||
|
{% endif %}
|
||||||
|
{% if cur_vcpu %}
|
||||||
|
{{ cur_vcpu }} {% trans "Vcpu" %}
|
||||||
|
{% else %}
|
||||||
|
{{ vcpu }} {% trans "Vcpu" %}
|
||||||
|
{% endif %}
|
||||||
|
|
|
||||||
|
{{ cur_memory }} {% trans "MB" %} {% trans "Ram" %}
|
||||||
|
|
|
||||||
|
{% for disk in disks %}
|
||||||
|
{{ disk.size|filesizeformat }} {% trans "Disk" %} |
|
||||||
|
{% endfor %}
|
||||||
|
{% for net in networks %}
|
||||||
|
{% for ipv4 in net.ipv4 %}
|
||||||
|
{{ ipv4 }} |
|
||||||
|
{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
|
<a href="{% url 'instance' compute.id vname %}" title="{% trans 'refresh instance info' %}"><span class="fa fa-refresh"></span></a>
|
||||||
</div>
|
</div>
|
||||||
{% if user_quota_msg %}
|
{% if user_quota_msg %}
|
||||||
<span class="label label-warning">{{ user_quota_msg|capfirst }} {% trans "quota reached" %}.</span>
|
<span class="label label-warning">{{ user_quota_msg|capfirst }} {% trans "quota reached" %}.</span>
|
||||||
|
|
Loading…
Reference in a new issue