mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-24 15:15:22 +00:00
add show/hide bottom bar option in instance details
This commit is contained in:
parent
f37d6601e1
commit
52c856c504
3 changed files with 37 additions and 30 deletions
|
@ -4,35 +4,37 @@
|
||||||
{% 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">
|
{% if bottom_bar %}
|
||||||
<div class="container">
|
<nav class="navbar navbar-default navbar navbar-fixed-bottom">
|
||||||
<div class="navbar-header">
|
<div class="container">
|
||||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar_bottom" aria-expanded="false" aria-controls="navbar">
|
<div class="navbar-header">
|
||||||
<span class="sr-only">{% trans 'Toggle navigation' %}</span>
|
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar_bottom" aria-expanded="false" aria-controls="navbar">
|
||||||
<span class="icon-bar"></span>
|
<span class="sr-only">{% trans 'Toggle navigation' %}</span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
</button>
|
<span class="icon-bar"></span>
|
||||||
<a class="navbar-brand" href="#">{% trans 'HOST' %}</a>
|
</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-server"></i>
|
||||||
|
{{ compute.name }} {% if compute.name != compute.hostname %} - {{ compute.hostname }}{% endif %}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="{% url 'instances' compute.id %}"><i class="fa fa-desktop"></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>
|
</div>
|
||||||
<div id="navbar_bottom" class="navbar-collapse collapse">
|
</nav>
|
||||||
<ul class="nav navbar-nav">
|
{% endif %}
|
||||||
<li>
|
|
||||||
<a class="navbar-link" href="{% url 'overview' compute.id %}">
|
|
||||||
<i class="fa fa-server"></i>
|
|
||||||
{{ compute.name }} {% if compute.name != compute.hostname %} - {{ compute.hostname }}{% endif %}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="{% url 'instances' compute.id %}"><i class="fa fa-desktop"></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>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
|
@ -1781,7 +1783,7 @@
|
||||||
image = new_vname + '-clone';
|
image = new_vname + '-clone';
|
||||||
}
|
}
|
||||||
$('#disk_name-{{ disk.dev }}').val(image);
|
$('#disk_name-{{ disk.dev }}').val(image);
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -117,6 +117,7 @@ def instance(request, compute_id, vname):
|
||||||
keymaps = settings.QEMU_KEYMAPS
|
keymaps = settings.QEMU_KEYMAPS
|
||||||
console_types = settings.QEMU_CONSOLE_TYPES
|
console_types = settings.QEMU_CONSOLE_TYPES
|
||||||
console_listen_addresses = settings.QEMU_CONSOLE_LISTEN_ADDRESSES
|
console_listen_addresses = settings.QEMU_CONSOLE_LISTEN_ADDRESSES
|
||||||
|
bottom_bar = settings.VIEW_INSTANCE_DETAIL_BOTTOM_BAR
|
||||||
try:
|
try:
|
||||||
userinstance = UserInstance.objects.get(instance__compute_id=compute_id,
|
userinstance = UserInstance.objects.get(instance__compute_id=compute_id,
|
||||||
instance__name=vname,
|
instance__name=vname,
|
||||||
|
|
|
@ -173,6 +173,9 @@ VIEW_ACCOUNTS_STYLE = 'grid'
|
||||||
# available list style: default (grouped), nongrouped
|
# available list style: default (grouped), nongrouped
|
||||||
VIEW_INSTANCES_LIST_STYLE = 'grouped'
|
VIEW_INSTANCES_LIST_STYLE = 'grouped'
|
||||||
|
|
||||||
|
# available options: True, False
|
||||||
|
VIEW_INSTANCE_DETAIL_BOTTOM_BAR = True
|
||||||
|
|
||||||
# available volume format: raw, qcow2, qcow
|
# available volume format: raw, qcow2, qcow
|
||||||
INSTANCE_VOLUME_DEFAULT_FORMAT = 'qcow2'
|
INSTANCE_VOLUME_DEFAULT_FORMAT = 'qcow2'
|
||||||
|
|
||||||
|
@ -207,4 +210,5 @@ INSTANCE_MACHINE_DEFAULT_TYPE = 'q35'
|
||||||
INSTANCE_FIRMWARE_DEFAULT_TYPE = 'BIOS'
|
INSTANCE_FIRMWARE_DEFAULT_TYPE = 'BIOS'
|
||||||
|
|
||||||
# Architecture: x86_64, i686, etc
|
# Architecture: x86_64, i686, etc
|
||||||
INSTANCE_ARCH_DEFAULT_TYPE = 'x86_64'
|
INSTANCE_ARCH_DEFAULT_TYPE = 'x86_64'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue