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

bootstrap 4.5 fixations & fix various localizations

This commit is contained in:
catborise 2020-05-20 16:18:27 +03:00 committed by catborise
parent bc25e22ae4
commit 871083967f
13 changed files with 115 additions and 100 deletions

View file

@ -80,19 +80,19 @@
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label class="col-sm-4 col-form-label">{% trans "Is staff" %}</label> <label class="col-sm-4 col-form-label">{% trans "Is staff" %}</label>
<div class="form-check form-check-inline col-sm-2"> <div class="form-check form-check-inline col-sm-2 ml-3">
<input class="form-check-input position-static" type="checkbox" name="user_is_staff" {% if user.is_staff %}checked{% endif %}> <input class="form-check-input position-static" type="checkbox" name="user_is_staff" {% if user.is_staff %}checked{% endif %}>
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label class="col-sm-4 col-form-label">{% trans "Is superuser" %}</label> <label class="col-sm-4 col-form-label">{% trans "Is superuser" %}</label>
<div class="form-check form-check-inline col-sm-2"> <div class="form-check form-check-inline col-sm-2 ml-3">
<input class="form-check-input position-static" type="checkbox" name="user_is_superuser" {% if user.is_superuser %}checked{% endif %}> <input class="form-check-input position-static" type="checkbox" name="user_is_superuser" {% if user.is_superuser %}checked{% endif %}>
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label class="col-sm-4 col-form-label">{% trans "Can clone instances" %}</label> <label class="col-sm-4 col-form-label">{% trans "Can clone instances" %}</label>
<div class="form-check form-check-inline col-sm-2"> <div class="form-check form-check-inline col-sm-2 ml-3">
<input class="form-check-input position-static" type="checkbox" name="userattributes_can_clone_instances" {% if user.userattributes.can_clone_instances %}checked{% endif %}> <input class="form-check-input position-static" type="checkbox" name="userattributes_can_clone_instances" {% if user.userattributes.can_clone_instances %}checked{% endif %}>
</div> </div>
</div> </div>

View file

@ -71,7 +71,7 @@
<div class="dropdown-menu" aria-labelledby="dropdownMenuLink"> <div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
<a class="dropdown-item" id="ctrlaltdel" href='#'>Ctrl+Alt+Del</a> <a class="dropdown-item" id="ctrlaltdel" href='#'>Ctrl+Alt+Del</a>
<div class="dropdown-divider"></div> <div class="dropdown-divider"></div>
<a class="dropdown-item" id="ctrlaltf2" href='#'>Ctrl+Alt+F1</a> <a class="dropdown-item" id="ctrlaltf1" href='#'>Ctrl+Alt+F1</a>
<a class="dropdown-item" id="ctrlaltf2" href='#'>Ctrl+Alt+F2</a> <a class="dropdown-item" id="ctrlaltf2" href='#'>Ctrl+Alt+F2</a>
<a class="dropdown-item" id="ctrlaltf3" href='#'>Ctrl+Alt+F3</a> <a class="dropdown-item" id="ctrlaltf3" href='#'>Ctrl+Alt+F3</a>
<a class="dropdown-item" id="ctrlaltf4" href='#'>Ctrl+Alt+F4</a> <a class="dropdown-item" id="ctrlaltf4" href='#'>Ctrl+Alt+F4</a>

View file

@ -404,7 +404,7 @@
<div class="form-group row meta-prealloc"> <div class="form-group row meta-prealloc">
<label class="col-sm-3 col-form-label">{% trans "Disk Metadata" %}</label> <label class="col-sm-3 col-form-label">{% trans "Disk Metadata" %}</label>
<div class="col-sm-7"> <div class="col-sm-7">
<input type="checkbox" name="meta_prealloc" title="Metadata Preallocation" value="true"> <input type="checkbox" name="meta_prealloc" title="{% trans "Metadata Preallocation" %}" value="true">
</div> </div>
<label class="col-lg-1 col-form-label">{% trans "Image" %}</label> <label class="col-lg-1 col-form-label">{% trans "Image" %}</label>
</div> </div>
@ -617,7 +617,7 @@
<div class="form-group row meta-prealloc"> <div class="form-group row meta-prealloc">
<label class="col-sm-3 col-form-label">{% trans "Disk Metadata" %}</label> <label class="col-sm-3 col-form-label">{% trans "Disk Metadata" %}</label>
<div class="col-sm-7"> <div class="col-sm-7">
<input type="checkbox" name="meta_prealloc" title="Metadata preallocation" value="true"> <input type="checkbox" name="meta_prealloc" title="{% trans "Metadata preallocation" %}" value="true">
</div> </div>
<label class="col-lg-1 col-form-label">{% trans "Image" %}</label> <label class="col-lg-1 col-form-label">{% trans "Image" %}</label>
</div> </div>

View file

@ -1,6 +1,6 @@
{% load i18n %} {% load i18n %}
{% if request.user.is_superuser %} {% if request.user.is_superuser %}
<a href="#addvol" type="button" class="btn btn-success float-right" data-toggle="modal" title="Add Volume"> <a href="#addvol" type="button" class="btn btn-success float-right" data-toggle="modal" title="{% trans "Add Volume" %}">
<span class="fa fa-plus" aria-hidden="true"></span> <span class="fa fa-plus" aria-hidden="true"></span>
</a> </a>

View file

@ -1,6 +1,6 @@
{% load i18n %} {% load i18n %}
{% if request.user.is_superuser %} {% if request.user.is_superuser %}
<button href="#editvol{{ id }}" type="button" class="btn btn-sm btn-secondary" data-toggle="modal" title="Edit Volume"> <button href="#editvol{{ id }}" type="button" class="btn btn-sm btn-secondary" data-toggle="modal" title="{% trans "Edit Volume" %}">
<i class="fa fa-edit" aria-hidden="true"></i> <i class="fa fa-edit" aria-hidden="true"></i>
</button> </button>

View file

@ -23,14 +23,14 @@
<span {%if guest_agent == True %} <span {%if guest_agent == True %}
{% if guest_agent_ready == True %} {% if guest_agent_ready == True %}
class="badge badge-success" class="badge badge-success"
title="Guest Agent Enabled & Connected" title="{% trans "Guest Agent Enabled & Connected" %}"
{% else %} {% else %}
class="badge badge-warning" class="badge badge-warning"
title="Guest Agent Enabled but not Connected" title="{% trans "Guest Agent Enabled but not Connected" %}"
{% endif %} {% endif %}
{% else %} {% else %}
class="badge badge-danger" class="badge badge-danger"
title="Guest Agent Not Enabled & Not Connected" title="{% trans "Guest Agent Not Enabled & Not Connected" %}"
{% endif %}><i class="fa fa-plug"></i></span> {% endif %}><i class="fa fa-plug"></i></span>
| |
{% if snapshots %} {% if snapshots %}
@ -52,7 +52,7 @@
{{ ipv4 }} | {{ ipv4 }} |
{% endfor %} {% endfor %}
{% endfor %} {% endfor %}
<a class="text-secondary" href="{% url 'instance' compute.id vname %}" title="{% trans 'refresh instance info' %}"><span class="fa fa-refresh"></span></a> <a class="text-secondary" 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 %}
<div class="alert alert-warning fade show"> <div class="alert alert-warning fade show">
@ -287,8 +287,8 @@
<span class="sr-only">{% trans 'Toggle Dropdown' %}</span> <span class="sr-only">{% trans 'Toggle Dropdown' %}</span>
</button> </button>
<div class="dropdown-menu"> <div class="dropdown-menu">
<a class="dropdown-item" href="#" title="Console port: {{ console_port }}" onclick="open_console('lite')">{% trans "Console - Lite" %}</a> <a class="dropdown-item" href="#" title="{% trans "Console port" %}: {{ console_port }}" onclick="open_console('lite')">{% trans "Console - Lite" %}</a>
<a class="dropdown-item" href="#" title="Console port: {{ console_port }}" onclick="open_console('full')">{% trans "Console - Full" %}</a> <a class="dropdown-item" href="#" title="{% trans "Console port" %}: {{ console_port }}" onclick="open_console('full')">{% trans "Console - Full" %}</a>
</div> </div>
</div> </div>
{% else %} {% else %}
@ -424,11 +424,11 @@
<div class="col-sm-3"> <div class="col-sm-3">
<input name="id" value="{{ id }}" hidden/> <input name="id" value="{{ id }}" hidden/>
{% if vcpu.enabled == 'yes' and vcpu.hotpluggable == "yes" %} {% if vcpu.enabled == 'yes' and vcpu.hotpluggable == "yes" %}
<button type="submit" class="btn btn-block btn-success" value="False" name="set_vcpu" title="Disable">{{ id }}</button> <button type="submit" class="btn btn-block btn-success" value="False" name="set_vcpu" title="{% trans "Disable" %}">{{ id }}</button>
{% elif vcpu.enabled == 'yes' and vcpu.hotpluggable == "no" %} {% elif vcpu.enabled == 'yes' and vcpu.hotpluggable == "no" %}
<button type="button" class="btn btn btn-block btn-info" title="Constant">{{ id }}</button> <button type="button" class="btn btn btn-block btn-info" title="{% trans "Constant" %}">{{ id }}</button>
{% else %} {% else %}
<button type="submit" class="btn btn btn-block btn-secondary" value="True" name="set_vcpu" title="Enable">{{ id }}</button> <button type="submit" class="btn btn btn-block btn-secondary" value="True" name="set_vcpu" title="{% trans "Enable" %}">{{ id }}</button>
{% endif %} {% endif %}
</div> </div>
</form> </form>
@ -531,7 +531,7 @@
<form class="form-inline" method="post" role="form">{% csrf_token %} <form class="form-inline" method="post" role="form">{% csrf_token %}
<div class="form-group row"> <div class="form-group row">
<div class="col-sm-12"> <div class="col-sm-12">
<input type="text" class="form-control input-lg" name="name" placeholder="{% trans "Enter Snapshot Name" %}" maxlength="14"> <input type="text" class="form-control form-control-lg" name="name" placeholder="{% trans "Enter Snapshot Name" %}" maxlength="14">
</div> </div>
</div> </div>
{% ifequal status 5 %} {% ifequal status 5 %}
@ -561,10 +561,10 @@
<td><strong>{{ snap.name }}</strong></td> <td><strong>{{ snap.name }}</strong></td>
<td>{{ snap.date|date:"M d H:i:s" }}</td> <td>{{ snap.date|date:"M d H:i:s" }}</td>
<td style="width:30px;"> <td style="width:30px;">
<form action="" method="post" style="height:10px" role="form">{% csrf_token %} <form action="" method="post" role="form">{% csrf_token %}
<input type="hidden" name="name" value="{{ snap.name }}"> <input type="hidden" name="name" value="{{ snap.name }}">
{% ifequal status 5 %} {% ifequal status 5 %}
<button type="submit" class="btn btn-sm btn-secondary" name="revert_snapshot" title="Revert to this Snapshot" onclick="return confirm('Are you sure?')"> <button type="submit" class="btn btn-sm btn-secondary" name="revert_snapshot" title="{% trans 'Revert to this Snapshot' %}" onclick="return confirm('Are you sure?')">
<span class="fa fa-download"></span> <span class="fa fa-download"></span>
</button> </button>
{% else %} {% else %}
@ -578,7 +578,7 @@
<td style="width:30px;"> <td style="width:30px;">
<form action="" method="post" role="form">{% csrf_token %} <form action="" method="post" role="form">{% csrf_token %}
<input type="hidden" name="name" value="{{ snap.name }}"> <input type="hidden" name="name" value="{{ snap.name }}">
<button type="submit" class="btn btn-sm btn-secondary" name="delete_snapshot" title="Delete Snapshot" onclick="return confirm('{% trans "Are you sure?" %}')"> <button type="submit" class="btn btn-sm btn-danger" name="delete_snapshot" title="{% trans 'Delete Snapshot' %}" onclick="return confirm('{% trans "Are you sure?" %}')">
<span class="fa fa-trash"></span> <span class="fa fa-trash"></span>
</button> </button>
</form> </form>
@ -684,13 +684,13 @@
{% ifequal status 5 %} {% ifequal status 5 %}
<p>{% trans "Enable Boot Menu for your instance when it starts up " %} <p>{% trans "Enable Boot Menu for your instance when it starts up " %}
{% ifequal bootmenu 0 %} {% ifequal bootmenu 0 %}
<input type="submit" class="btn btn-success" name="set_bootmenu" title="Show boot menu" value="{% trans "Enable" %}"> <input type="submit" class="btn btn-success" name="set_bootmenu" title="{% trans 'Show boot menu' %}" value="{% trans "Enable" %}">
{% else %} {% else %}
<input type="submit" class="btn btn-danger" name="unset_bootmenu" title="Hide boot menu" value="{% trans "Disable" %}"> <input type="submit" class="btn btn-danger" name="unset_bootmenu" title="{% trans 'Hide boot menu' %}" value="{% trans "Disable" %}">
{% endifequal %} {% endifequal %}
{% else %} {% else %}
{% ifequal bootmenu 0 %} {% ifequal bootmenu 0 %}
<p>{% trans "**** Please shutdown instance to modify boot menu ****" %}</p> <p>**** {% trans "Please shutdown instance to modify boot menu" %} ****</p>
{% endifequal %} {% endifequal %}
{% endifequal %} {% endifequal %}
</div> </div>
@ -721,10 +721,10 @@
</div> </div>
<div> <div>
<div class="row mt-4"> <div class="row mt-4">
<a href="#" id="boot_order_up" class="btn btn-light shadow-sm"><span class="fa fa-arrow-up" title="up: move selected devices"></span></a> <a href="#" id="boot_order_up" class="btn btn-light shadow-sm"><span class="fa fa-arrow-up" title="{% trans 'up: move selected devices' %}"></span></a>
</div> </div>
<div class="row mt-2"> <div class="row mt-2">
<a href="#" id="boot_order_down" class="btn btn-light shadow-sm"><span class="fa fa-arrow-down" title="down: move selected devices"></span></a> <a href="#" id="boot_order_down" class="btn btn-light shadow-sm"><span class="fa fa-arrow-down" title="{% trans 'down: move selected devices' %}"></span></a>
</div> </div>
</div> </div>
</div> </div>
@ -741,8 +741,13 @@
<form action="" method="post" role="form">{% csrf_token %} <form action="" method="post" role="form">{% csrf_token %}
<p class="font-weight-bold"> <p class="font-weight-bold">
{% trans "Instance Media" %} {% trans "Instance Media" %}
{% if status == 5 and allow_admin_or_not_template %}
<button type="submit" class="btn btn-danger float-right" title="{% trans "Detach CD-ROM (remove device)" %}" name="detach_cdrom" value="{{ cd.dev }}">
<span class="fa fa-remove"></span>
</button>
{% endif %}
<button type="submit" name="add_cdrom" type="button" class="btn btn-success float-right" <button type="submit" name="add_cdrom" type="button" class="btn btn-success float-right"
title="Add CD-ROM" title="{% trans 'Add CD-ROM' %}"
{% if status != 5 %} disabled {% endif %} > {% if status != 5 %} disabled {% endif %} >
<span class="fa fa-plus" aria-hidden="true"></span> <span class="fa fa-plus" aria-hidden="true"></span>
</button> </button>
@ -781,24 +786,24 @@
{% else %} {% else %}
<button class="btn btn-sm btn-success float-left disabled">{% trans "Mount" %}</button> <button class="btn btn-sm btn-success float-left disabled">{% trans "Mount" %}</button>
{% endif %} {% endif %}
{% if status == 5 and allow_admin_or_not_template %}
<button type="submit" class="btn btn-sm btn-danger float-left" title="Detach CD-ROM (remove device)" name="detach_cdrom" value="{{ cd.dev }}" style="margin-top: 2px;"><i class="fa fa-fa-remove"></i></button>
{% endif %}
</div> </div>
</div> </div>
</div> </div>
{% else %} {% else %}
<div class="col-sm-6"> <div class="col-sm-6">
<div class="input-group">
<input class="form-control" value="{{ cd.image }}" disabled/> <input class="form-control" value="{{ cd.image }}" disabled/>
</div> <div class="input-group-append">
<div class="col-sm-2">
<input type="hidden" name="path" value="{{ cd.path }}"> <input type="hidden" name="path" value="{{ cd.path }}">
{% if allow_admin_or_not_template %} {% if allow_admin_or_not_template %}
<button type="submit" class="btn btn-sm btn-success float-left" value="{{ cd.dev }}" name="umount_iso">{% trans "Umount" %}</button> <button type="submit" class="btn btn-sm btn-success float-left" value="{{ cd.dev }}" name="umount_iso">{% trans "Unmount" %}</button>
{% else %} {% else %}
<button class="btn btn-sm btn-success float-left disabled" value="{{ cd.dev }}" name="umount_iso" style="margin-top: 2px;">{% trans "Umount" %}</button> <button class="btn btn-sm btn-success float-left disabled" value="{{ cd.dev }}" name="umount_iso">{% trans "Unmount" %}</button>
{% endif %} {% endif %}
</div> </div>
</div>
</div>
{% endif %} {% endif %}
</div> </div>
</form> </form>
@ -815,7 +820,7 @@
<div class="col-12 col-sm-12"> <div class="col-12 col-sm-12">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-hover"> <table class="table table-hover mt-3">
<thead> <thead>
<tr> <tr>
<th>{% trans "Device" %}</th> <th>{% trans "Device" %}</th>
@ -893,9 +898,10 @@
{% include 'add_instance_network_block.html' %} {% include 'add_instance_network_block.html' %}
</p> </p>
<div> <div class="row mt-3">
<p class="font-weight-bold">{% trans "Network Devices" %}</p> <div class="col-lg-12 mt-3">
<table class="table table-responsive"> <h5 class="font-weight-bold">{% trans "Network Devices" %}</h5>
<table class="table">
<thead> <thead>
<tr> <tr>
<th>{% trans 'Name' %}</th> <th>{% trans 'Name' %}</th>
@ -925,7 +931,7 @@
<td> <td>
<form method="post" name="edit_network{{ forloop.counter0 }}" role="form">{% csrf_token %} <form method="post" name="edit_network{{ forloop.counter0 }}" role="form">{% csrf_token %}
<button data-target="#editInstanceNetwork{{ forloop.counter0 }}" type="button" class="btn btn-sm btn-primary" <button data-target="#editInstanceNetwork{{ forloop.counter0 }}" type="button" class="btn btn-sm btn-primary"
title="Edit NIC" data-toggle="modal"> title="{% trans "Edit NIC" %}" data-toggle="modal">
<span class="fa fa-edit" aria-hidden="true"></span> <span class="fa fa-edit" aria-hidden="true"></span>
</button> </button>
@ -937,6 +943,7 @@
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="container">
<div class="form-group row"> <div class="form-group row">
<label class="col-form-label">{% trans "MAC" %}</label> <label class="col-form-label">{% trans "MAC" %}</label>
<div class="input-group"> <div class="input-group">
@ -982,6 +989,7 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="modal-footer"> <div class="modal-footer">
<button class="btn btn-secondary" data-dismiss="modal">{% trans 'Close' %}</button> <button class="btn btn-secondary" data-dismiss="modal">{% trans 'Close' %}</button>
<button class="btn btn-success" name="change_network" title="{% trans "Apply Network Changes" %}">{% trans "Apply" %}</button> <button class="btn btn-success" name="change_network" title="{% trans "Apply Network Changes" %}">{% trans "Apply" %}</button>
@ -1001,18 +1009,18 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<th class="d-none d-table-cell d-sm-table-cell">{% trans 'IPv4' %}</th> <th>{% trans 'IPv4' %}</th>
<td> <td>
{% for ipv4 in network.ipv4|default:"unknown" %}{{ ipv4 }}{% endfor %} {% for ipv4 in network.ipv4|default:"unknown" %}{{ ipv4 }}{% endfor %}
</td> </td>
<th class="d-none d-table-cell d-sm-table-cell">{% trans 'IPv6' %}</th> <th>{% trans 'IPv6' %}</th>
<td class="d-none d-table-cell"> <td>
{% for ipv6 in network.ipv6|default:"unknown" %}{{ ipv6 }}{% endfor %} {% for ipv6 in network.ipv6|default:"unknown" %}{{ ipv6 }}{% endfor %}
</td> </td>
<th class="d-none d-table-cell d-sm-table-cell">{% trans 'Model' %}</th> <th>{% trans 'Model' %}</th>
<td>{{ network.model }}</td> <td>{{ network.model }}</td>
<th>{% trans 'QoS' %}</th> <th>{% trans 'QoS' %}</th>
<td align="right"> <td class="d-flex justify-content-end">
<form method="post" name="add_qos{{ forloop.counter0 }}" role="form">{% csrf_token %} <form method="post" name="add_qos{{ forloop.counter0 }}" role="form">{% csrf_token %}
<input type="text" name="net-mac-{{ forloop.counter0 }}" value="{{ network.mac }}" hidden/> <input type="text" name="net-mac-{{ forloop.counter0 }}" value="{{ network.mac }}" hidden/>
{% include 'add_network_qos.html' with id=forloop.counter0 %} {% include 'add_network_qos.html' with id=forloop.counter0 %}
@ -1020,22 +1028,23 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="bg-primary d-none d-table-cell d-sm-table-cell" colspan="9"></td> <td class="bg-primary" colspan="9"></td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
</div> </div>
</div>
{% if qos %} {% if qos %}
<div class="col-10 col-sm-10"> <div class="col-10 col-sm-10">
<p><strong>{% trans "Qos Configuration" %}</strong></p> <p><strong>{% trans "QoS Configuration" %}</strong></p>
</div> </div>
<div class="col-12 col-sm-12"> <div class="col-12 col-sm-12">
<table class="table table-hover"> <table class="table table-hover">
<thead> <thead>
<tr> <tr>
<th>{% trans "MAC/Direction" %}</th> <th>{% trans "MAC" %}/{% trans "Direction" %}</th>
<th>{% trans "Average" %}</th> <th>{% trans "Average" %}</th>
<th>{% trans "Peak" %}</th> <th>{% trans "Peak" %}</th>
<th>{% trans "Burst" %}</th> <th>{% trans "Burst" %}</th>
@ -1062,12 +1071,12 @@
<input name="net-mac" value="{{ q }}" hidden/> <input name="net-mac" value="{{ q }}" hidden/>
<button type="submit" class="btn btn-sm btn-primary" <button type="submit" class="btn btn-sm btn-primary"
name="set_qos" data-toggle="modal" name="set_qos" data-toggle="modal"
title="Edit Qos" onclick="return confirm('{% trans "Are you sure?" %}')"> title="{% trans "Edit QoS" %}" onclick="return confirm('{% trans "Are you sure?" %}')">
<i class="fa fa-save"></i> <i class="fa fa-save"></i>
</button> </button>
<button type="submit" class="btn btn-sm btn-danger" <button type="submit" class="btn btn-sm btn-danger"
name="unset_qos" name="unset_qos"
title="Delete Qos" onclick="return confirm('{% trans "Are you sure?" %}')"> title="{% trans "Delete QoS" %}" onclick="return confirm('{% trans "Are you sure?" %}')">
<i class="fa fa-trash"></i> <i class="fa fa-trash"></i>
</button> </button>
</td> </td>
@ -1195,15 +1204,15 @@
</p> </p>
</div> </div>
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-striped sortable-theme-bootstrap" data-sortable> <table class="table table-striped sortable-theme-bootstrap mt-3" data-sortable>
<tbody class="searchable"> <tbody class="searchable">
{% for userinstance in userinstances %} {% for userinstance in userinstances %}
<tr> <tr>
<td><a href="{% url 'account' userinstance.user.id %}">{{ userinstance.user }}</a></td> <td><a href="{% url 'account' userinstance.user.id %}">{{ userinstance.user }}</a></td>
<td style="width:30px;"> <td style="width:30px;">
<form action="" method="post" style="height:10px" role="form">{% csrf_token %} <form action="" method="post" role="form">{% csrf_token %}
<input type="hidden" name="userinstance" value="{{ userinstance.pk }}"> <input type="hidden" name="userinstance" value="{{ userinstance.pk }}">
<button type="submit" class="btn btn-sm btn-secondary" name="del_owner" title="{% trans "Delete" %}"> <button type="submit" class="btn btn-sm btn-secondary" name="del_owner" title="{% trans "Delete Ownership" %}">
<i class="fa fa-trash"></i> <i class="fa fa-trash"></i>
</button> </button>
</form> </form>
@ -1928,8 +1937,8 @@
}); });
$('#boot_order_down').bind('click', function() { $('#boot_order_down').bind('click', function() {
var countOptions = $('#b_order label').size(); var countOptions = $('#b_order label').length;
var countSelected = $('#b_order label input:checked').size(); var countSelected = $('#b_order label input:checked').length;
$('#b_order label input:checked').each( function() { $('#b_order label input:checked').each( function() {
var label = $(this).parent(); var label = $(this).parent();
var newPos = label.index() + countSelected; var newPos = label.index() + countSelected;

View file

@ -917,10 +917,10 @@ def instance(request, compute_id, vname):
try: try:
conn.set_qos(mac, qos_dir, average, peak, burst) conn.set_qos(mac, qos_dir, average, peak, burst)
if conn.get_status() == 5: if conn.get_status() == 5:
messages.success(request, "{} Qos is set".format(qos_dir.capitalize())) messages.success(request, "{} QoS is set".format(qos_dir.capitalize()))
else: else:
messages.success(request, messages.success(request,
"{} Qos is set. Network XML is changed.".format(qos_dir.capitalize()) + "{} QoS is set. Network XML is changed.".format(qos_dir.capitalize()) +
"Stop and start network to activate new config") "Stop and start network to activate new config")
except libvirtError as le: except libvirtError as le:
@ -932,10 +932,10 @@ def instance(request, compute_id, vname):
conn.unset_qos(mac, qos_dir) conn.unset_qos(mac, qos_dir)
if conn.get_status() == 5: if conn.get_status() == 5:
messages.success(request, "{} Qos is deleted".format(qos_dir.capitalize())) messages.success(request, "{} QoS is deleted".format(qos_dir.capitalize()))
else: else:
messages.success(request, messages.success(request,
"{} Qos is deleted. Network XML is changed. ".format(qos_dir.capitalize()) + "{} QoS is deleted. Network XML is changed. ".format(qos_dir.capitalize()) +
"Stop and start network to activate new config.") "Stop and start network to activate new config.")
return HttpResponseRedirect(request.get_full_path() + '#network') return HttpResponseRedirect(request.get_full_path() + '#network')

View file

@ -10,7 +10,7 @@
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title">{% trans "Add Qos for Network" %}</h5> <h5 class="modal-title">{% trans "Add QoS for Network" %}</h5>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
</div> </div>
<div class="modal-body"> <div class="modal-body">

View file

@ -135,7 +135,7 @@
class="btn btn-primary" class="btn btn-primary"
value="Apply" value="Apply"
name="modify_dhcp_range" name="modify_dhcp_range"
title="Edit DHCP Range" title="{% trans "Edit DHCP Range" %}"
onclick="return confirm('{% trans "Are you sure?" %}')"/> onclick="return confirm('{% trans "Are you sure?" %}')"/>
</dd> </dd>
<input hidden name="family" value="ipv4"/> <input hidden name="family" value="ipv4"/>
@ -189,12 +189,12 @@
<input hidden name="family" value="ipv4"/> <input hidden name="family" value="ipv4"/>
<button type="submit" class="btn btn-sm btn-primary" <button type="submit" class="btn btn-sm btn-primary"
name="modify_fixed_address" name="modify_fixed_address"
title="Edit entry" onclick="return confirm('{% trans "Are you sure?" %}')"> title="{% trans "Edit entry" %}" onclick="return confirm('{% trans "Are you sure?" %}')">
<i class="fa fa-save"></i> <i class="fa fa-save"></i>
</button> </button>
<button type="submit" class="btn btn-sm btn-danger" <button type="submit" class="btn btn-sm btn-danger"
name="delete_fixed_address" name="delete_fixed_address"
title="Delete entry" onclick="return confirm('{% trans "Are you sure?" %}')"> title="{% trans "Delete entry" %}" onclick="return confirm('{% trans "Are you sure?" %}')">
<i class="fa fa-trash"></i> <i class="fa fa-trash"></i>
</button> </button>
</td> </td>
@ -248,7 +248,7 @@
class="btn btn-primary btn-block" class="btn btn-primary btn-block"
value="Apply" value="Apply"
name="modify_dhcp_range" name="modify_dhcp_range"
title="Edit DHCP Range" title="{% trans "Edit DHCP Range" %}"
onclick="return confirm('{% trans "Are you sure?" %}')"/> onclick="return confirm('{% trans "Are you sure?" %}')"/>
</dd> </dd>
<input hidden name="family" value="ipv6"/> <input hidden name="family" value="ipv6"/>
@ -298,12 +298,12 @@
<input hidden name="family" value="ipv6"/> <input hidden name="family" value="ipv6"/>
<button type="submit" class="btn btn-sm btn-primary" <button type="submit" class="btn btn-sm btn-primary"
name="modify_fixed_address" name="modify_fixed_address"
title="Edit entry" onclick="return confirm('{% trans "Are you sure?" %}')"> title="{% trans "Edit entry" %}" onclick="return confirm('{% trans "Are you sure?" %}')">
<i class="fa fa-save"></i> <i class="fa fa-save"></i>
</button> </button>
<button type="submit" class="btn btn-sm btn-danger" <button type="submit" class="btn btn-sm btn-danger"
name="delete_fixed_address" name="delete_fixed_address"
title="Delete entry" onclick="return confirm('{% trans "Are you sure?" %}')"> title="{% trans "Delete entry" %}" onclick="return confirm('{% trans "Are you sure?" %}')">
<i class="fa fa-trash"></i> <i class="fa fa-trash"></i>
</button> </button>
</td> </td>
@ -322,7 +322,7 @@
{% include 'add_network_qos.html' %} {% include 'add_network_qos.html' %}
</form> </form>
{% endif %} {% endif %}
<h5 class="page-header">{% trans "Qos Configuration" %}</h5> <h5 class="page-header">{% trans "QoS Configuration" %}</h5>
<div class="col-sm-12"> <div class="col-sm-12">
<table class="table table-hover"> <table class="table table-hover">
@ -353,12 +353,12 @@
<input name="qos_direction" value="{{ q }}" hidden/> <input name="qos_direction" value="{{ q }}" hidden/>
<button type="submit" class="btn btn-sm btn-primary" <button type="submit" class="btn btn-sm btn-primary"
name="set_qos" data-toggle="modal" name="set_qos" data-toggle="modal"
title="Edit Qos" onclick="return confirm('{% trans "Are you sure?" %}')"> title="{% trans "Edit QoS" %}" onclick="return confirm('{% trans "Are you sure?" %}')">
<i class="fa fa-save"></i> <i class="fa fa-save"></i>
</button> </button>
<button type="submit" class="btn btn-sm btn-danger" <button type="submit" class="btn btn-sm btn-danger"
name="unset_qos" name="unset_qos"
title="Delete Qos" onclick="return confirm('{% trans "Are you sure?" %}')"> title="{% trans "Delete QoS" %}" onclick="return confirm('{% trans "Are you sure?" %}')">
<i class="fa fa-trash"></i> <i class="fa fa-trash"></i>
</button> </button>
</td> </td>

View file

@ -216,7 +216,7 @@ def network(request, compute_id, pool):
_("{} Qos is set. Network XML is changed.").format(qos_dir.capitalize()) + _("{} Qos is set. Network XML is changed.").format(qos_dir.capitalize()) +
_("Stop and start network to activate new config")) _("Stop and start network to activate new config"))
else: else:
messages.success(request, _("{} Qos is set").format(qos_dir.capitalize())) messages.success(request, _("{} QoS is set").format(qos_dir.capitalize()))
except libvirtError as lib_err: except libvirtError as lib_err:
messages.error(request, lib_err) messages.error(request, lib_err)
return HttpResponseRedirect(request.get_full_path()) return HttpResponseRedirect(request.get_full_path())
@ -230,7 +230,7 @@ def network(request, compute_id, pool):
_("{} Qos is deleted. Network XML is changed. ").format(qos_dir.capitalize()) + _("{} Qos is deleted. Network XML is changed. ").format(qos_dir.capitalize()) +
_("Stop and start network to activate new config.")) _("Stop and start network to activate new config."))
else: else:
messages.success(request, _("{} Qos is deleted").format(qos_dir.capitalize())) messages.success(request, _("{} QoS is deleted").format(qos_dir.capitalize()))
return HttpResponseRedirect(request.get_full_path()) return HttpResponseRedirect(request.get_full_path())
conn.close() conn.close()

View file

@ -47,11 +47,10 @@
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<a class="btn btn-block btn-light stretched-link" data-toggle="collapse" href="#collapseXML"> <button class="btn btn-block btn-light mb-3" role="button" data-toggle="collapse" data-target="#collapseXML" aria-expanded="true" aria-controls="collapseXML">
<span class="fa fa-angle-down"/> <span class="fa fa-chevron-down"></span>
{% trans 'XML' %} {% trans 'XML' %}
</a> </button>
<div class="collapse" id="collapseXML"> <div class="collapse" id="collapseXML">
<div class="card card-body"> <div class="card card-body">
<form class="form" method="post" role="form">{% csrf_token %} <form class="form" method="post" role="form">{% csrf_token %}
@ -68,9 +67,12 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<h5 class="page-header mr-auto">{% trans "Filter References" %}</h5> <div class="col-lg-12">
<h5 class="page-header mr-auto">{% trans "Filter References" %}
<form class="form-inline float-right" method="post" role="form">{% csrf_token %} <form class="form-inline float-right" method="post" role="form">{% csrf_token %}
<div class="form-group row"> <div class="form-group">
<div class="input-group"> <div class="input-group">
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text">{% trans "Filter" %}</span> <span class="input-group-text">{% trans "Filter" %}</span>
@ -81,17 +83,21 @@
<option value="{{ nwf.name }}">{{ nwf.name }}</option> <option value="{{ nwf.name }}">{{ nwf.name }}</option>
{% endfor %} {% endfor %}
</select> </select>
</div> <div class="input-group-append">
<button type="submit" class="btn btn-success float-right" name="add_nwfilter_ref"> <button type="submit" class="btn btn-success float-right" name="add_nwfilter_ref">
<span class="fa fa-plus" aria-hidden="true"></span> <span class="fa fa-plus" aria-hidden="true"></span>
</button> </button>
</div> </div>
</div>
</div>
</form> </form>
</h5>
</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-12 col-sm-12"> <div class="col-12 col-sm-12">
<table class="table table-hover"> <table class="table table-hover mb-3">
<thead> <thead>
<th scope="col">#</th> <th scope="col">#</th>
<th>{% trans "Reference" %}</th> <th>{% trans "Reference" %}</th>

View file

@ -42,8 +42,8 @@
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h5 class="modal-title">{% trans "Add New Volume" %}</h5> <h5 class="modal-title">{% trans "Add New Volume" %}</h5>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<form method="post" role="form">{% csrf_token %} <form method="post" role="form">{% csrf_token %}

View file

@ -95,7 +95,7 @@
<table class="table table-striped sortable-theme-bootstrap" data-sortable> <table class="table table-striped sortable-theme-bootstrap" data-sortable>
<thead> <thead>
<tr> <tr>
<th style="width: 45px;">#</th> <th>#</th>
<th>{% trans "Name" %}</th> <th>{% trans "Name" %}</th>
<th>{% trans "Allocated" %}</th> <th>{% trans "Allocated" %}</th>
<th>{% trans "Size" %}</th> <th>{% trans "Size" %}</th>