1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-10-31 19:44:16 +00:00

logger updates (#31)

* Log for failed login attempts

* Logger configuration for logging to file

* interface fixes

* login log fix, added logged in too

* bootstrap icons setup

* font-awesome icons replaced with bootstrap icons

* replaced i-tags with django_bootstrap_icons

* removed icons library from project

* bug fix

---------

Co-authored-by: catborise <catborise@gmail.com>
This commit is contained in:
Emre Serdengeçti 2023-08-09 09:20:18 +03:00 committed by GitHub
parent 07d7a6d752
commit 1cbdf76df6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
59 changed files with 344 additions and 291 deletions

View file

@ -1,7 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %} {% load i18n %}
{% load icons %} {% load bootstrap_icons %}
{% load qr_code %} {% load qr_code %}
{% block title %}{% trans "User Profile" %} - {{ user }}{% endblock %} {% block title %}{% trans "User Profile" %} - {{ user }}{% endblock %}
@ -10,14 +10,14 @@
{% block page_heading_extra %} {% block page_heading_extra %}
{% if otp_enabled %} {% if otp_enabled %}
<a href="{% url 'accounts:admin_email_otp' user.id %}" class="btn btn-secondary" title="{% trans "Email OTP QR code" %}"> <a href="{% url 'accounts:admin_email_otp' user.id %}" class="btn btn-secondary" title="{% trans "Email OTP QR code" %}">
{% icon 'qrcode' %} {% bs_icon 'qr-code' %}
</a> </a>
{% endif %} {% endif %}
<a href="{% url 'admin:user_update' user.id %}?next={% url 'accounts:account' user.id %}" class="btn btn-primary" title="{% trans "Edit user" %}"> <a href="{% url 'admin:user_update' user.id %}?next={% url 'accounts:account' user.id %}" class="btn btn-primary" title="{% trans "Edit user" %}">
{% icon 'pencil' %} {% bs_icon 'pencil' %}
</a> </a>
<a href="{% url 'accounts:user_instance_create' user.id %}" class="btn btn-success" title="{% trans "Create user instance" %}"> <a href="{% url 'accounts:user_instance_create' user.id %}" class="btn btn-success" title="{% trans "Create user instance" %}">
{% icon 'plus' %} {% bs_icon 'plus' %}
</a> </a>
{% endblock page_heading_extra %} {% endblock page_heading_extra %}
@ -58,12 +58,12 @@
<td>{{ inst.is_delete }}</td> <td>{{ inst.is_delete }}</td>
<td style="width:5px;"> <td style="width:5px;">
<a href="{% url 'accounts:user_instance_update' inst.id %}" class="btn btn-sm btn-secondary" title="{% trans "edit" %}"> <a href="{% url 'accounts:user_instance_update' inst.id %}" class="btn btn-sm btn-secondary" title="{% trans "edit" %}">
{% icon 'pencil' %} {% bs_icon 'pencil' %}
</a> </a>
</td> </td>
<td style="width:5px;"> <td style="width:5px;">
<a class="btn btn-sm btn-secondary" href="{% url 'accounts:user_instance_delete' inst.id %}" title="{% trans "Delete" %}"> <a class="btn btn-sm btn-secondary" href="{% url 'accounts:user_instance_delete' inst.id %}" title="{% trans "Delete" %}">
{% icon 'trash' %} {% bs_icon 'trash' %}
</a> </a>
</td> </td>
</tr> </tr>

View file

@ -2,7 +2,7 @@
{% load django_bootstrap5 %} {% load django_bootstrap5 %}
{% load i18n %} {% load i18n %}
{% load icons %} {% load bootstrap_icons %}
{% block title %}{%trans "Change Password" %}{% endblock title %} {% block title %}{%trans "Change Password" %}{% endblock title %}
@ -21,10 +21,10 @@
</div> </div>
<div class="card-footer"> <div class="card-footer">
<div class="float-end"> <div class="float-end">
<a class="btn btn-primary" href="javascript:history.back()">{% icon 'times' %} <a class="btn btn-primary" href="javascript:history.back()">{% bs_icon 'x' %}
{% trans "Cancel" %}</a> {% trans "Cancel" %}</a>
<button type="submit" form="password-change" class="btn btn-success"> <button type="submit" form="password-change" class="btn btn-success">
{% icon 'check' %} {% trans "Change" %} {% bs_icon 'check2' %} {% trans "Change" %}
</button> </button>
</div> </div>
</div> </div>

View file

@ -1,6 +1,6 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load django_bootstrap5 %} {% load django_bootstrap5 %}
{% load icons %} {% load bootstrap_icons %}
{% load i18n %} {% load i18n %}
{% block title %}{{ title }}{% endblock %} {% block title %}{{ title }}{% endblock %}
@ -22,9 +22,9 @@
</div> </div>
<div class="card-footer"> <div class="card-footer">
<div class="mb-0 float-end"> <div class="mb-0 float-end">
<a class="btn btn-primary" href="javascript:history.back()">{% icon 'arrow-left' %} {% trans "Cancel" %}</a> <a class="btn btn-primary" href="javascript:history.back()">{% bs_icon 'arrow-left' %} {% trans "Cancel" %}</a>
<button type="submit" form="create-update" class="btn btn-success"> <button type="submit" form="create-update" class="btn btn-success">
{% icon 'envelope-o' %} {% trans "Send" %} {% bs_icon 'envelope-open' %} {% trans "Send" %}
</button> </button>
</div> </div>
</div> </div>

View file

@ -1,7 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %} {% load i18n %}
{% load django_bootstrap5 %} {% load django_bootstrap5 %}
{% load icons %} {% load bootstrap_icons %}
{% load tags_fingerprint %} {% load tags_fingerprint %}
{% block title %}{% trans "Profile" %}: {{ request.user.first_name }} {{ request.user.last_name}}{% endblock %} {% block title %}{% trans "Profile" %}: {{ request.user.first_name }} {{ request.user.last_name}}{% endblock %}
@ -30,12 +30,12 @@
{% bootstrap_form profile_form layout='horizontal' %} {% bootstrap_form profile_form layout='horizontal' %}
{% if perms.accounts.change_password %} {% if perms.accounts.change_password %}
<a href="{% url 'accounts:change_password' %}" class="btn btn-primary"> <a href="{% url 'accounts:change_password' %}" class="btn btn-primary">
{% icon 'lock' %} {% trans "Change Password" %} {% bs_icon 'lock' %} {% trans "Change Password" %}
</a> </a>
{% endif %} {% endif %}
<div class="mb-0 float-end"> <div class="mb-0 float-end">
<button type="submit" class="btn btn-primary"> <button type="submit" class="btn btn-primary">
{% icon 'pencil' %} {% trans "Update" %} {% bs_icon 'pencil' %} {% trans "Update" %}
</button> </button>
</div> </div>
</form> </form>
@ -53,7 +53,7 @@
<td>{{ key.keyname }} ({% ssh_to_fingerprint key.keypublic %})</td> <td>{{ key.keyname }} ({% ssh_to_fingerprint key.keypublic %})</td>
<td> <td>
<a href="{% url 'accounts:ssh_key_delete' key.id %}" title="{% trans "Delete" %}" class="btn btn-sm btn-secondary"> <a href="{% url 'accounts:ssh_key_delete' key.id %}" title="{% trans "Delete" %}" class="btn btn-sm btn-secondary">
{% icon 'trash' %} {% bs_icon 'trash' %}
</a> </a>
</td> </td>
</tr> </tr>
@ -73,7 +73,7 @@
{% bootstrap_form ssh_key_form layout='horizontal' %} {% bootstrap_form ssh_key_form layout='horizontal' %}
<div class="mb-0 float-end"> <div class="mb-0 float-end">
<button type="submit" class="btn btn-primary"> <button type="submit" class="btn btn-primary">
{% icon 'plus' %} {% trans "Add" %} {% bs_icon 'plus' %} {% trans "Add" %}
</button> </button>
</div> </div>
</form> </form>

View file

@ -4,6 +4,7 @@ from django.urls import path
from django_otp.forms import OTPAuthenticationForm from django_otp.forms import OTPAuthenticationForm
from . import views from . import views
from .views import CustomLoginView
app_name = "accounts" app_name = "accounts"
@ -50,5 +51,5 @@ if settings.OTP_ENABLED:
] ]
else: else:
urlpatterns += ( urlpatterns += (
path("login/", LoginView.as_view(template_name="login.html"), name="login"), path("login/", CustomLoginView.as_view(template_name="login.html"), name="login"),
) )

View file

@ -1,11 +1,12 @@
from admin.decorators import superuser_only from admin.decorators import superuser_only
from django.conf import settings from django.conf import settings
from django.contrib import messages from django.contrib import messages
from django.contrib.auth import get_user_model, update_session_auth_hash from django.contrib.auth import get_user_model, update_session_auth_hash, login as auth_login
from django.contrib.auth.decorators import permission_required from django.contrib.auth.decorators import permission_required
from django.contrib.auth.forms import PasswordChangeForm from django.contrib.auth.forms import PasswordChangeForm
from django.shortcuts import get_object_or_404, redirect, render from django.shortcuts import get_object_or_404, redirect, render
from django.urls import reverse from django.urls import reverse
from django.http import HttpResponseRedirect
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from instances.models import Instance from instances.models import Instance
@ -14,7 +15,20 @@ from accounts.models import *
from . import forms from . import forms
from .utils import get_user_totp_device, send_email_with_otp from .utils import get_user_totp_device, send_email_with_otp
from django.contrib.auth.views import LoginView
from logs.views import addlogmsg
class CustomLoginView(LoginView):
def form_valid(self, form):
username = form.cleaned_data['username']
addlogmsg(username, "-", "-", "Logged In")
auth_login(self.request, form.get_user())
return HttpResponseRedirect(self.get_success_url())
def form_invalid(self, form):
username = form.cleaned_data['username']
addlogmsg(username, "-", "-", "Failed Login Attempt")
return self.render_to_response(self.get_context_data(form=form))
def profile(request): def profile(request):
publickeys = UserSSHKey.objects.filter(user_id=request.user.id) publickeys = UserSSHKey.objects.filter(user_id=request.user.id)

View file

@ -1,13 +1,13 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %} {% load i18n %}
{% load static %} {% load static %}
{% load icons %} {% load bootstrap_icons %}
{% block title %}{% trans "Users" %}{% endblock %} {% block title %}{% trans "Users" %}{% endblock %}
{% block content %} {% block content %}
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<a href="{% url 'admin:group_create' %}" class="btn btn-success btn-header float-end"> <a href="{% url 'admin:group_create' %}" class="btn btn-success btn-header float-end">
{% icon 'plus' %} {% bs_icon 'plus' %}
</a> </a>
{% include 'search_block.html' %} {% include 'search_block.html' %}
<h1 class="page-header">{% trans "Groups" %}</h1> <h1 class="page-header">{% trans "Groups" %}</h1>
@ -17,7 +17,7 @@
{% if not groups %} {% if not groups %}
<div class="col-lg-12"> <div class="col-lg-12">
<div class="alert alert-warning shadow-sm"> <div class="alert alert-warning shadow-sm">
{% icon 'exclamation-triangle '%} <strong>{% trans "Warning" %}:</strong> {% trans "You don't have any groups" %} {% bs_icon 'exclamation-triangle '%} <strong>{% trans "Warning" %}:</strong> {% trans "You don't have any groups" %}
</div> </div>
</div> </div>
{% else %} {% else %}
@ -38,10 +38,10 @@
<td> <td>
<div class="float-end btn-group"> <div class="float-end btn-group">
<a class="btn btn-primary" href="{% url 'admin:group_update' group.id %}" title="{%trans "Edit" %}"> <a class="btn btn-primary" href="{% url 'admin:group_update' group.id %}" title="{%trans "Edit" %}">
{% icon 'pencil' %} {% bs_icon 'pencil' %}
</a> </a>
<a class="btn btn-danger" href="{% url 'admin:group_delete' group.id %}" title="{%trans "Delete" %}"> <a class="btn btn-danger" href="{% url 'admin:group_delete' group.id %}" title="{%trans "Delete" %}">
{% icon 'times' %} {% bs_icon 'x' %}
</a> </a>
</div> </div>
</td> </td>

View file

@ -1,6 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %} {% load i18n %}
{% load django_bootstrap5 %} {% load django_bootstrap5 %}
{% load bootstrap_icons %}
{% block title %}{% trans "Logs" %}{% endblock %} {% block title %}{% trans "Logs" %}{% endblock %}
@ -18,7 +19,7 @@
{% if not logs %} {% if not logs %}
<div class="col-lg-12"> <div class="col-lg-12">
<div class="alert alert-warning shadow-sm"> <div class="alert alert-warning shadow-sm">
<i class="fa fa-exclamation-triangle"></i> <strong>{% trans "Warning" %}:</strong> {% trans "You don't have any Logs" %} {% bs_icon 'exclamation-triangle'%} <strong>{% trans "Warning" %}:</strong> {% trans "You don't have any Logs" %}
</div> </div>
</div> </div>
{% else %} {% else %}

View file

@ -1,6 +1,6 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load django_bootstrap5 %} {% load django_bootstrap5 %}
{% load icons %} {% load bootstrap_icons %}
{% load i18n %} {% load i18n %}
{% block title %}{{ title }}{% endblock %} {% block title %}{{ title }}{% endblock %}
@ -16,9 +16,9 @@
{% bootstrap_form attributes_form layout='horizontal' %} {% bootstrap_form attributes_form layout='horizontal' %}
</form> </form>
<div class="float-end"> <div class="float-end">
<a class="btn btn-primary" href="javascript:history.back()">{% icon 'times' %} {% trans "Cancel" %}</a> <a class="btn btn-primary" href="javascript:history.back()">{% bs_icon 'x' %} {% trans "Cancel" %}</a>
<button type="submit" form="create-update" class="btn btn-success"> <button type="submit" form="create-update" class="btn btn-success">
{% icon 'check' %} {% trans "Save" %} {% bs_icon 'check2' %} {% trans "Save" %}
</button> </button>
</div> </div>
</div> </div>

View file

@ -2,7 +2,7 @@
{% load i18n %} {% load i18n %}
{% load static %} {% load static %}
{% load common_tags %} {% load common_tags %}
{% load icons %} {% load bootstrap_icons %}
{% block title %}{{ title }}{% endblock %} {% block title %}{{ title }}{% endblock %}
@ -10,7 +10,7 @@
{% block page_heading_extra %} {% block page_heading_extra %}
<a href="{% url 'admin:user_create' %}" class="btn btn-success btn-header float-end"> <a href="{% url 'admin:user_create' %}" class="btn btn-success btn-header float-end">
{% icon 'plus' %} {% bs_icon 'plus' %}
</a> </a>
{% include 'search_block.html' %} {% include 'search_block.html' %}
{% endblock page_heading_extra %} {% endblock page_heading_extra %}
@ -20,7 +20,7 @@
{% if not users %} {% if not users %}
<div class="col-lg-12"> <div class="col-lg-12">
<div class="alert alert-warning shadow-sm"> <div class="alert alert-warning shadow-sm">
{% icon 'exclamation-triangle '%} <strong>{% trans "Warning" %}:</strong> {% trans "You don't have any user" %} {% bs_icon 'exclamation-triangle '%} <strong>{% trans "Warning" %}:</strong> {% trans "You don't have any user" %}
</div> </div>
</div> </div>
{% else %} {% else %}
@ -50,19 +50,19 @@
{% trans "Blocked" %} {% trans "Blocked" %}
{% endif %} {% endif %}
</td> </td>
<td>{% if user.is_staff %}{% icon 'check' %}{% endif %}</td> <td>{% if user.is_staff %}{% bs_icon 'check' %}{% endif %}</td>
<td>{% if user.is_superuser %}{% icon 'check' %}</span>{% endif %}</td> <td>{% if user.is_superuser %}{% bs_icon 'check' %}</span>{% endif %}</td>
<td>{% if can_clone %}{% icon 'check' %}{% endif %}</td> <td>{% if can_clone %}{% bs_icon 'check' %}{% endif %}</td>
<td> <td>
<div class="float-end btn-group"> <div class="float-end btn-group">
<a class="btn btn-success" title="{%trans "View Profile" %}" href="{% url 'accounts:account' user.id %}">{% icon 'eye' %}</a> <a class="btn btn-success" title="{%trans "View Profile" %}" href="{% url 'accounts:account' user.id %}">{% bs_icon 'eye' %}</a>
<a class="btn btn-primary" title="{%trans "Edit" %}" href="{% url 'admin:user_update' user.id %}">{% icon 'pencil' %}</a> <a class="btn btn-primary" title="{%trans "Edit" %}" href="{% url 'admin:user_update' user.id %}">{% bs_icon 'pencil' %}</a>
{% if user.is_active %} {% if user.is_active %}
<a class="btn btn-warning" title="{%trans "Block" %}" href="{% url 'admin:user_block' user.id %}">{% icon 'stop' %}</a> <a class="btn btn-warning" title="{%trans "Block" %}" href="{% url 'admin:user_block' user.id %}">{% bs_icon 'stop' %}</a>
{% else %} {% else %}
<a class="btn btn-success" title="{%trans "Unblock" %}" href="{% url 'admin:user_unblock' user.id %}">{% icon 'play' %}</a> <a class="btn btn-success" title="{%trans "Unblock" %}" href="{% url 'admin:user_unblock' user.id %}">{% bs_icon 'play' %}</a>
{% endif %} {% endif %}
<a class="btn btn-danger" title="{%trans "Delete" %}" href="{% url 'admin:user_delete' user.id %}">{% icon 'times' %}</a> <a class="btn btn-danger" title="{%trans "Delete" %}" href="{% url 'admin:user_delete' user.id %}">{% bs_icon 'x' %}</a>
</div> </div>
</td> </td>
</tr> </tr>

View file

@ -1,6 +1,6 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load django_bootstrap5 %} {% load django_bootstrap5 %}
{% load icons %} {% load bootstrap_icons %}
{% load i18n %} {% load i18n %}
{% block title %}{% trans "Add Compute" %}{% endblock %} {% block title %}{% trans "Add Compute" %}{% endblock %}
@ -18,9 +18,9 @@
{% bootstrap_form form layout='horizontal' %} {% bootstrap_form form layout='horizontal' %}
</form> </form>
<div class="float-end"> <div class="float-end">
<a class="btn btn-primary" href="javascript:history.back()">{% icon 'times' %} {% trans "Cancel" %}</a> <a class="btn btn-primary" href="javascript:history.back()">{% bs_icon 'x' %} {% trans "Cancel" %}</a>
<button type="submit" form="create-update" class="btn btn-success"> <button type="submit" form="create-update" class="btn btn-success">
{% icon 'check' %} {% trans "Save" %} {% bs_icon 'check' %} {% trans "Save" %}
</button> </button>
</div> </div>
</div> </div>

View file

@ -1,7 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %} {% load i18n %}
{% load static %} {% load static %}
{% load icons %} {% load bootstrap_icons %}
{% block title %}{% trans "Instances" %} - {{ compute.name }}{% endblock %} {% block title %}{% trans "Instances" %} - {{ compute.name }}{% endblock %}
{% block style %} {% block style %}
<link rel="stylesheet" href="{% static "css/sortable-theme-bootstrap.css" %}" /> <link rel="stylesheet" href="{% static "css/sortable-theme-bootstrap.css" %}" />
@ -11,7 +11,7 @@
{% block page_heading_extra %} {% block page_heading_extra %}
<a href="{% url 'instances:create_instance_select_type' compute.id %}" <a href="{% url 'instances:create_instance_select_type' compute.id %}"
class="btn btn-success btn-header float-end"> class="btn btn-success btn-header float-end">
{% icon 'plus' %} {% bs_icon 'plus' %}
</a> </a>
{% if instances %} {% if instances %}
{% include 'search_block.html' %} {% include 'search_block.html' %}
@ -24,25 +24,25 @@
<nav aria-label="breadcrumb"> <nav aria-label="breadcrumb">
<ol class="breadcrumb shadow-sm"> <ol class="breadcrumb shadow-sm">
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'overview' compute.id %}">{% icon 'dashboard' %} {% trans "Overview" %}</a> <a href="{% url 'overview' compute.id %}">{% bs_icon 'laptop' %} {% trans "Overview" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<span class="fw-bold">{% icon 'server' %} {% trans "Instances" %}</span> <span class="fw-bold">{% bs_icon 'server' %} {% trans "Instances" %}</span>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'storages' compute.id %}">{% icon 'hdd-o' %} {% trans "Storages" %}</a> <a href="{% url 'storages' compute.id %}">{% bs_icon 'device-hdd' %} {% trans "Storages" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'networks' compute.id %}">{% icon 'sitemap' %} {% trans "Networks" %}</a> <a href="{% url 'networks' compute.id %}">{% bs_icon 'hdd-network' %} {% trans "Networks" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'interfaces' compute.id %}">{% icon 'wifi' %} {% trans "Interfaces" %}</a> <a href="{% url 'interfaces' compute.id %}">{% bs_icon 'wifi' %} {% trans "Interfaces" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'nwfilters' compute.id %}">{% icon 'filter' %} {% trans "NWFilters" %}</a> <a href="{% url 'nwfilters' compute.id %}">{% bs_icon 'filter' %} {% trans "NWFilters" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'virtsecrets' compute.id %}">{% icon 'key' %} {% trans "Secrets" %}</a> <a href="{% url 'virtsecrets' compute.id %}">{% bs_icon 'key' %} {% trans "Secrets" %}</a>
</li> </li>
</ol> </ol>
</nav> </nav>
@ -52,7 +52,7 @@
<div class="col-lg-12"> <div class="col-lg-12">
{% if not instances %} {% if not instances %}
<div class="alert alert-warning shadow-sm fade show"> <div class="alert alert-warning shadow-sm fade show">
{% icon 'exclamation-triangle' %} <strong>{% trans "Warning" %}:</strong> {% bs_icon 'exclamation-triangle' %} <strong>{% trans "Warning" %}:</strong>
{% trans "Hypervisor doesn't have any Instances" %} {% trans "Hypervisor doesn't have any Instances" %}
</div> </div>
</div> </div>

View file

@ -2,7 +2,7 @@
{% load i18n %} {% load i18n %}
{% load static %} {% load static %}
{% load common_tags %} {% load common_tags %}
{% load icons %} {% load bootstrap_icons %}
{% block title %}{% trans "Computes" %}{% endblock %} {% block title %}{% trans "Computes" %}{% endblock %}
{% block content %} {% block content %}
<div class="row"> <div class="row">
@ -16,7 +16,7 @@
{% if not computes %} {% if not computes %}
<div class="col-lg-12"> <div class="col-lg-12">
<div class="alert alert-warning shadow-sm"> <div class="alert alert-warning shadow-sm">
{% icon 'exclamation-triangle '%} <strong>{% trans "Warning" %}:</strong> {% trans "You don't have any computes" %} {% bs_icon 'exclamation-triangle '%} <strong>{% trans "Warning" %}:</strong> {% trans "You don't have any computes" %}
</div> </div>
</div> </div>
{% else %} {% else %}
@ -45,12 +45,12 @@
<td class="col-sm-2"> <td class="col-sm-2">
<div class="float-end btn-group"> <div class="float-end btn-group">
{% if compute.status is True %} {% if compute.status is True %}
<a class="btn btn-success" title="{%trans "Overview" %}" href="{% url 'overview' compute.id %}">{% icon 'eye' %}</a> <a class="btn btn-success" title="{%trans "Overview" %}" href="{% url 'overview' compute.id %}">{% bs_icon 'eye' %}</a>
{% else %} {% else %}
<a class="btn btn-light" title="{%trans "Overview" %}">{% icon 'eye' %}</a> <a class="btn btn-light" title="{%trans "Overview" %}">{% bs_icon 'eye' %}</a>
{% endif %} {% endif %}
<a class="btn btn-primary" title="{%trans "Edit" %}" href="{% url 'compute_update' compute.id %}">{% icon 'pencil' %}</a> <a class="btn btn-primary" title="{%trans "Edit" %}" href="{% url 'compute_update' compute.id %}">{% bs_icon 'pencil' %}</a>
<a class="btn btn-danger" title="{%trans "Delete" %}" href="{% url 'compute_delete' compute.id %}">{% icon 'times' %}</a> <a class="btn btn-danger" title="{%trans "Delete" %}" href="{% url 'compute_delete' compute.id %}">{% bs_icon 'x' %}</a>
</div> </div>
</td> </td>
</tr> </tr>

View file

@ -1,10 +1,11 @@
{% load i18n %} {% load i18n %}
{% load django_bootstrap5 %} {% load django_bootstrap5 %}
{% load icons %} {% load bootstrap_icons %}
<div class="btn-group float-end mt-1" role="group" aria-label="Add host button group"> <div class="btn-group float-end mt-1" role="group" aria-label="Add host button group">
<a href="{% url 'add_tcp_host' %}" class="btn btn-success">{% trans "TCP" %}</a> <a href="{% url 'add_tcp_host' %}" class="btn btn-success">{% trans "TCP" %}</a>
<a href="{% url 'add_ssh_host' %}" class="btn btn-success">{% trans "SSH" %}</a> <a href="{% url 'add_ssh_host' %}" class="btn btn-success">{% trans "SSH" %}</a>
<a href="{% url 'add_tls_host' %}" class="btn btn-success">{% trans "TLS" %}</a> <a href="{% url 'add_tls_host' %}" class="btn btn-success">{% trans "TLS" %}</a>
<a href="{% url 'add_socket_host' %}" class="btn btn-success">{% trans "Local" %}</a> <a href="{% url 'add_socket_host' %}" class="btn btn-success">{% trans "Local" %}</a>
<a href="#" class="btn btn-success disabled" title="{% trans "Add new host" %}">{% icon "plus" %}</a> <a href="#" class="btn btn-success disabled" title="{% trans "Add new host" %}">{% bs_icon "plus" %}</a>
</div> </div>

View file

@ -1,7 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %} {% load i18n %}
{% load static %} {% load static %}
{% load icons %} {% load bootstrap_icons %}
{% block title %}{% trans "Overview" %} - {{ compute.name }}{% endblock %} {% block title %}{% trans "Overview" %} - {{ compute.name }}{% endblock %}
@ -12,25 +12,25 @@
<nav aria-label="breadcrumb"> <nav aria-label="breadcrumb">
<ol class="breadcrumb shadow-sm"> <ol class="breadcrumb shadow-sm">
<li class="breadcrumb-item" aria-current="page"> <li class="breadcrumb-item" aria-current="page">
<span class="fw-bold">{% icon 'dashboard' %} {% trans "Overview" %}</span> <span class="fw-bold">{% bs_icon 'laptop' %} {% trans "Overview" %}</span>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'instances' compute.id %}">{% icon 'server' %} {% trans "Instances" %}</a> <a href="{% url 'instances' compute.id %}">{% bs_icon 'server' %} {% trans "Instances" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'storages' compute.id %}">{% icon 'hdd-o' %} {% trans "Storages" %}</a> <a href="{% url 'storages' compute.id %}">{% bs_icon 'device-hdd' %} {% trans "Storages" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'networks' compute.id %}">{% icon 'sitemap' %} {% trans "Networks" %}</a> <a href="{% url 'networks' compute.id %}">{% bs_icon 'hdd-network' %} {% trans "Networks" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'interfaces' compute.id %}">{% icon 'wifi' %} {% trans "Interfaces" %}</a> <a href="{% url 'interfaces' compute.id %}">{% bs_icon 'wifi' %} {% trans "Interfaces" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'nwfilters' compute.id %}">{% icon 'filter' %} {% trans "NWFilters" %}</a> <a href="{% url 'nwfilters' compute.id %}">{% bs_icon 'filter' %} {% trans "NWFilters" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'virtsecrets' compute.id %}">{% icon 'key' %} {% trans "Secrets" %}</a> <a href="{% url 'virtsecrets' compute.id %}">{% bs_icon 'key' %} {% trans "Secrets" %}</a>
</li> </li>
</ol> </ol>
</nav> </nav>
@ -96,7 +96,7 @@
<div class="my-3 card border-success"> <div class="my-3 card border-success">
<div class="card-body"> <div class="card-body">
<h5 class="card-title"> <h5 class="card-title">
<i class="fa fa-long-arrow-right"></i> {% bs_icon 'arrow-right' %}
{% trans "CPU Utilization" %} {% trans "CPU Utilization" %}
</h5> </h5>
<canvas id="cpuChart" width="735" height="160"></canvas> <canvas id="cpuChart" width="735" height="160"></canvas>
@ -106,7 +106,7 @@
<div class="my-3 card border-primary"> <div class="my-3 card border-primary">
<div class="card-body"> <div class="card-body">
<h5 class="card-title "> <h5 class="card-title ">
<i class="fa fa-long-arrow-right"></i> {% trans "RAM Utilization" %} {% bs_icon 'arrow-right'%} {% trans "RAM Utilization" %}
</h5> </h5>
<canvas id="memChart" width="735" height="160"></canvas> <canvas id="memChart" width="735" height="160"></canvas>
</div> </div>

View file

@ -1,8 +1,8 @@
Django==3.2.20 Django==3.2.20
django_bootstrap5==23.3 django_bootstrap5==23.3
django-bootstrap-icons==0.8.3
django-login-required-middleware==0.9.0 django-login-required-middleware==0.9.0
django-otp==1.2.2 django-otp==1.2.2
django-icons==23.3
django-qr-code==3.1.1 django-qr-code==3.1.1
gunicorn==20.1.0 gunicorn==20.1.0
libsass==0.22.0 libsass==0.22.0

View file

@ -1,7 +1,8 @@
{% load i18n %} {% load i18n %}
{% load bootstrap_icons %}
{% if request.user.is_superuser %} {% if request.user.is_superuser %}
<button type="button" class="btn btn-success float-end" data-bs-toggle="modal" data-bs-target="#addInstanceNetwork"> <button type="button" class="btn btn-success float-end" data-bs-toggle="modal" data-bs-target="#addInstanceNetwork">
<span class="fa fa-plus" aria-hidden="true"></span> <span aria-hidden="true">{% bs_icon 'plus'%} </span>
</button> </button>
<!-- Modal pool --> <!-- Modal pool -->

View file

@ -1,7 +1,8 @@
{% load i18n %} {% load i18n %}
{% load bootstrap_icons %}
{% if request.user.is_superuser %} {% if request.user.is_superuser %}
<a href="#addInstanceOwner" type="button" class="btn btn-success float-end" data-bs-toggle="modal"> <a href="#addInstanceOwner" type="button" class="btn btn-success float-end" data-bs-toggle="modal">
<span class="fa fa-plus" aria-hidden="true"></span> <span aria-hidden="true">{% bs_icon 'plus'%} </span>
</a> </a>
<!-- Modal pool --> <!-- Modal pool -->

View file

@ -1,7 +1,8 @@
{% load i18n %} {% load i18n %}
{% load bootstrap_icons %}
{% if request.user.is_superuser %} {% if request.user.is_superuser %}
<a href="#addvol" type="button" class="btn btn-success float-end" data-bs-toggle="modal" title="{% trans "Add Volume" %}"> <a href="#addvol" type="button" class="btn btn-success float-end" data-bs-toggle="modal" title="{% trans "Add Volume" %}">
<span class="fa fa-plus" aria-hidden="true"></span> <span aria-hidden="true">{% bs_icon 'plus'%} </span>
</a> </a>
<!-- Modal pool --> <!-- Modal pool -->

View file

@ -1,6 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %} {% load i18n %}
{% load icons %}
{% load static %} {% load static %}
{% block title %}{% trans "Instances" %}{% endblock %} {% block title %}{% trans "Instances" %}{% endblock %}
{% block style %} {% block style %}

View file

@ -1,5 +1,5 @@
{% load i18n %} {% load i18n %}
{% load icons %} {% load bootstrap_icons %}
<table class="table table-hover sortable-theme-bootstrap" data-sortable> <table class="table table-hover sortable-theme-bootstrap" data-sortable>
<thead> <thead>
<tr> <tr>
@ -20,7 +20,7 @@
{% if compute.status is True and compute.instance_set.count > 0 %} {% if compute.status is True and compute.instance_set.count > 0 %}
<tr class="table-secondary fw-bold border-bottom border-dark"> <tr class="table-secondary fw-bold border-bottom border-dark">
<td> <td>
<span id="collapse_host_instances_{{ compute.id }}" class="fa fa-chevron-up" onclick="hide_host_instances('{{ compute.id }}');"></span> <span id="collapse_host_instances_{{ compute.id }}" onclick="hide_host_instances('{{ compute.id }}');">{% bs_icon 'chevron-up'%} </span>
</td> </td>
<td> <td>
<a class="link-dark" href="{% url 'overview' compute.id %}">{{ compute.name }}</a> <a class="link-dark" href="{% url 'overview' compute.id %}">{{ compute.name }}</a>

View file

@ -1,4 +1,5 @@
{% load i18n %} {% load i18n %}
{% load bootstrap_icons %}
<nav class="navbar navbar-expand-sm fixed-bottom navbar-light bg-light" aria-label="Instance bottom navbar"> <nav class="navbar navbar-expand-sm fixed-bottom navbar-light bg-light" aria-label="Instance bottom navbar">
<div class="container"> <div class="container">
<a class="navbar-brand" href="#">{% trans 'HOST' %}</a> <a class="navbar-brand" href="#">{% trans 'HOST' %}</a>
@ -9,15 +10,15 @@
<ul class="navbar-nav"> <ul class="navbar-nav">
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="{% url 'overview' compute.id %}"> <a class="nav-link" href="{% url 'overview' compute.id %}">
<i class="fa fa-server"></i> {% bs_icon 'server'%}
{{ compute.name }} {% if compute.name != compute.hostname %} - {{ compute.hostname }}{% endif %} {{ compute.name }} {% if compute.name != compute.hostname %} - {{ compute.hostname }}{% endif %}
</a> </a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="{% url 'instances' compute.id %}"><i class="fa fa-desktop"></i> {% trans "Instances" %}</a> <a class="nav-link" href="{% url 'instances' compute.id %}">{% bs_icon 'laptop'%} {% trans "Instances" %}</a>
</li> </li>
<li class="nav-item active"> <li class="nav-item active">
<a class="nav-link" href="{% url 'instances:instance' instance.id %}"><i class="fa fa-hdd-o"></i> {{ instance.name }}</a> <a class="nav-link" href="{% url 'instances:instance' instance.id %}">{% bs_icon 'device-hdd'%} {{ instance.name }}</a>
</li> </li>
</ul> </ul>
</div> </div>

View file

@ -1,8 +1,9 @@
{% load i18n %} {% load i18n %}
{% load django_bootstrap5 %} {% load django_bootstrap5 %}
{% load bootstrap_icons %}
{% if request.user.is_superuser %} {% if request.user.is_superuser %}
<button href="#addFlavor" type="button" class="btn btn-success btn-header float-end" data-bs-toggle="modal"> <button href="#addFlavor" type="button" class="btn btn-success btn-header float-end" data-bs-toggle="modal">
<span class="fa fa-plus" aria-hidden="true"></span> <span aria-hidden="true">{% bs_icon 'plus'%} </span>
</button> </button>
<!-- Modal Flavor --> <!-- Modal Flavor -->

View file

@ -1,6 +1,7 @@
{% load i18n %} {% load i18n %}
{% load bootstrap_icons %}
<a href="#AddInstance" type="button" class="btn btn-success btn-header float-end" data-bs-toggle="modal"> <a href="#AddInstance" type="button" class="btn btn-success btn-header float-end" data-bs-toggle="modal">
<span class="fa fa-plus" aria-hidden="true"></span> <span aria-hidden="true">{% bs_icon 'plus'%} </span>
</a> </a>
<!-- Modal pool --> <!-- Modal pool -->
@ -28,7 +29,7 @@
<tbody> <tbody>
{% for compute in computes %} {% for compute in computes %}
{% if compute.status is True %} {% if compute.status is True %}
<tr> <tr style="text-decoration: none">
<td>{{ compute.name }}</td> <td>{{ compute.name }}</td>
<td>{{ compute.cpu_count }}</td> <td>{{ compute.cpu_count }}</td>
<td> <td>

View file

@ -1,7 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %} {% load i18n %}
{% load static %} {% load static %}
{% load icons %} {% load bootstrap_icons %}
{% block title %}{% trans "Create new instance" %}{% endblock %} {% block title %}{% trans "Create new instance" %}{% endblock %}
{% block style %} {% block style %}
@ -37,7 +37,7 @@
<ul class="nav nav-tabs" role="tablist" aria-label="Instance create method"> <ul class="nav nav-tabs" role="tablist" aria-label="Instance create method">
<li class="nav-item" role="presentation"> <li class="nav-item" role="presentation">
<button class="nav-link float-end" data-bs-toggle="tab" data-bs-target="#" type="button" role="tab" aria-controls="go_compute" onclick="goto_compute()"> <button class="nav-link float-end" data-bs-toggle="tab" data-bs-target="#" type="button" role="tab" aria-controls="go_compute" onclick="goto_compute()">
<span class="fa fa-arrow-left"></span> <span>{% bs_icon 'arrow-left'%} </span>
</button> </button>
</li> </li>
<li class="nav-item" role="presentation"> <li class="nav-item" role="presentation">
@ -64,7 +64,7 @@
{% if not flavors %} {% if not flavors %}
<div class="col-lg-12"> <div class="col-lg-12">
<div class="alert alert-warning shadow-sm"> <div class="alert alert-warning shadow-sm">
<i class="fa fa-exclamation-triangle"></i> <strong>{% trans "Warning" %}:</strong> {% trans "Hypervisor doesn't have any Flavors" %} {% bs_icon 'exclamation-triangle'%} <strong>{% trans "Warning" %}:</strong> {% trans "Hypervisor doesn't have any Flavors" %}
</div> </div>
</div> </div>
{% else %} {% else %}
@ -173,7 +173,7 @@
<label class="col-sm-4 col-form-label">{% trans "Advanced" %}</label> <label class="col-sm-4 col-form-label">{% trans "Advanced" %}</label>
<div class="d-grid col-sm-7"> <div class="d-grid col-sm-7">
<button class="btn btn-outline-light" type="button" data-bs-toggle="collapse" data-bs-target="#flav-add-collapse" aria-expanded="false" aria-controls="flav-add-collapse"> <button class="btn btn-outline-light" type="button" data-bs-toggle="collapse" data-bs-target="#flav-add-collapse" aria-expanded="false" aria-controls="flav-add-collapse">
<span class="fa fa-caret-down"></span> <span>{% bs_icon 'caret-down'%} </span>
</button> </button>
</div> </div>
</div> </div>
@ -303,14 +303,14 @@
</div> </div>
</div> </div>
<a data-bs-toggle="modal" href="#addVMflavor{{ forloop.counter }}" class="btn btn-sm btn-secondary"> <a data-bs-toggle="modal" href="#addVMflavor{{ forloop.counter }}" class="btn btn-sm btn-secondary">
<span class="fa fa-plus"></span> <span >{% bs_icon 'plus'%} </span>
</a> </a>
</td> </td>
<td style="width:5px;"> <td style="width:5px;">
<form action="{% url 'instances:flavor_delete' flavor.id %}" method="post" role="form" aria-label="Delete flavor form"> <form action="{% url 'instances:flavor_delete' flavor.id %}" method="post" role="form" aria-label="Delete flavor form">
{% csrf_token %} {% csrf_token %}
<button type="submit" class="btn btn-sm btn-secondary" name="delete_flavor" onclick="return confirm('{% trans "Are you sure?" %}')"> <button type="submit" class="btn btn-sm btn-secondary" name="delete_flavor" onclick="return confirm('{% trans "Are you sure?" %}')">
{% icon 'trash' %} {% bs_icon 'trash' %}
</button> </button>
</form> </form>
</td> </td>
@ -428,7 +428,7 @@
<label class="col-sm-3 col-form-label">{% trans "Advanced" %}</label> <label class="col-sm-3 col-form-label">{% trans "Advanced" %}</label>
<div class="d-grid col-sm-7"> <div class="d-grid col-sm-7">
<button class="btn btn-outline-light" type="button" data-bs-toggle="collapse" data-bs-target="#custadvcollapse" aria-expanded="false" aria-controls="custadvcollapse"> <button class="btn btn-outline-light" type="button" data-bs-toggle="collapse" data-bs-target="#custadvcollapse" aria-expanded="false" aria-controls="custadvcollapse">
<span class="fa fa-caret-down"></span> <span>{% bs_icon 'caret-down'%} </span>
</button> </button>
</div> </div>
</div> </div>
@ -670,7 +670,7 @@
<label class="col-sm-3 col-form-label">{% trans "Advanced" %}</label> <label class="col-sm-3 col-form-label">{% trans "Advanced" %}</label>
<div class="d-grid col-sm-7"> <div class="d-grid col-sm-7">
<button class="btn btn-outline-light" type="button" data-bs-toggle="collapse" data-bs-target="#tempAdvCollapse" aria-expanded="false" aria-controls="tempAdvCollapse"> <button class="btn btn-outline-light" type="button" data-bs-toggle="collapse" data-bs-target="#tempAdvCollapse" aria-expanded="false" aria-controls="tempAdvCollapse">
<span class="fa fa-caret-down"></span> <span>{% bs_icon 'caret-down'%} </span>
</button> </button>
</div> </div>
</div> </div>
@ -865,7 +865,7 @@
'{% endfor %}' + '{% endfor %}' +
'</select>' + '</select>' +
' -> ' + value + ' ' + ' -> ' + value + ' ' +
'<a class="btn-link float-end" onclick="javascript:$(\'#image-control\').multiselect(\'deselect\', \'' + value + '\', true)"><i class="fa fa-remove"></i></a></li>'; '<a class="btn-link float-end" onclick="javascript:$(\'#image-control\').multiselect(\'deselect\', \'' + value + '\', true)">{% bs_icon 'trash'%} </a></li>';
selected_list_html += li; selected_list_html += li;
counter++; counter++;
}); });
@ -899,7 +899,7 @@
let li = '<li><input type="text" class="input-xs" name="mac'+ net_counter +'" maxlength="17" required pattern="[a-zA-Z0-9:]+" onchange="populate_mac(' + net_counter +')">' + let li = '<li><input type="text" class="input-xs" name="mac'+ net_counter +'" maxlength="17" required pattern="[a-zA-Z0-9:]+" onchange="populate_mac(' + net_counter +')">' +
' eth' + net_counter + ' eth' + net_counter +
' -> ' + value + ' ' + ' -> ' + value + ' ' +
'<a class="btn-link float-end" onclick="$(\'#network-control\').multiselect(\'deselect\', \'' + value + '\', true)"><i class="fa fa-remove"></i></a></li>'; '<a class="btn-link float-end" onclick="$(\'#network-control\').multiselect(\'deselect\', \'' + value + '\', true)">{% bs_icon 'trash'%} </a></li>';
random_mac(net_counter); random_mac(net_counter);
selected_list_html += li; selected_list_html += li;
net_counter++; net_counter++;

View file

@ -1,6 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load static %} {% load static %}
{% load i18n %} {% load i18n %}
{% load bootstrap_icons %}
{% block title %}{% trans "Instance" %} - {{ instance.name }}{% endblock %} {% block title %}{% trans "Instance" %} - {{ instance.name }}{% endblock %}
@ -33,10 +34,10 @@
{% else %} {% else %}
class="badge bg-danger" class="badge bg-danger"
title="{% trans "Guest Agent Not Enabled & Not Connected" %}" title="{% trans "Guest Agent Not Enabled & Not Connected" %}"
{% endif %}><i class="fa fa-plug"></i></span> {% endif %}>{% bs_icon 'plug' %} </span>
| |
{% if instance.snapshots %} {% if instance.snapshots %}
<i class="fa fa-camera link-primary" title="There are {{ instance.snapshots|length }} snapshot(s)"></i> {% bs_icon 'camera'%} <i title="There are {{ instance.snapshots|length }} snapshot(s)"></i>
| |
{% endif %} {% endif %}
{% if instance.cur_vcpu %} {% if instance.cur_vcpu %}
@ -57,11 +58,11 @@
{% endfor %} {% endfor %}
{% if instance.guest_agent_ready %} {% if instance.guest_agent_ready %}
<a class="link-secondary" title="{% trans 'Show Instance OS details' %}" onclick="get_osinfo();"> <a class="link-secondary" title="{% trans 'Show Instance OS details' %}" onclick="get_osinfo();">
<span class="fa fa-info-circle"></span> <span>{% bs_icon 'info-circle'%} </span>
</a> </a>
{% endif %} {% endif %}
<a class="link-secondary" href="{% url 'instances:instance' instance.id %}" title="{% trans 'Refresh instance info' %}"> <a class="link-secondary" href="{% url 'instances:instance' instance.id %}" title="{% trans 'Refresh instance info' %}">
<span class="fa fa-refresh"></span> <span>{% bs_icon 'repeat'%} </span>
</a> </a>
</div> </div>
{% if user_quota_msg %} {% if user_quota_msg %}
@ -77,45 +78,45 @@
<ul class="nav nav-pills nav-fill" id="navbtn" role="tablist" aria-label="Instance actions"> <ul class="nav nav-pills nav-fill" id="navbtn" role="tablist" aria-label="Instance actions">
<li class="nav-item" role="presentation"> <li class="nav-item" role="presentation">
<button class="nav-link action-button active" id="power-tab" aria-controls="power" data-bs-toggle="pill" data-bs-target="#power" type="button" role="tab" aria-selected="true"> <button class="nav-link action-button active" id="power-tab" aria-controls="power" data-bs-toggle="pill" data-bs-target="#power" type="button" role="tab" aria-selected="true">
<span id="action-block" class="fa fa-power-off fa-2x" aria-hidden="true"></span> <span id="action-block" aria-hidden="true">{% bs_icon 'power' size='2em'%} </span>
{% trans "Power" %} {% trans "Power" %}
</button> </button>
</li> </li>
<li class="nav-item" role="presentation"> <li class="nav-item" role="presentation">
<button class="nav-link action-button" id="access-tab" aria-controls="access" data-bs-toggle="pill" data-bs-target="#access" type="button" role="tab" aria-selected="false"> <button class="nav-link action-button" id="access-tab" aria-controls="access" data-bs-toggle="pill" data-bs-target="#access" type="button" role="tab" aria-selected="false">
<span id="action-block" class="fa fa-lock" aria-hidden="true"></span> <span id="action-block" aria-hidden="true">{% bs_icon 'lock' size='2em'%} </span>
{% trans "Access" %} {% trans "Access" %}
</button> </button>
</li> </li>
<li class="nav-item" role="presentation"> <li class="nav-item" role="presentation">
<button class="nav-link action-button" id="resize-tab" aria-controls="resize" data-bs-toggle="pill" data-bs-target="#resize" type="button" role="tab" aria-selected="false"> <button class="nav-link action-button" id="resize-tab" aria-controls="resize" data-bs-toggle="pill" data-bs-target="#resize" type="button" role="tab" aria-selected="false">
<span id="action-block" class="fa fa-expand" aria-hidden="true"></span> <span id="action-block" aria-hidden="true">{% bs_icon 'arrows-angle-expand' size='2em'%} </span>
{% trans "Resize" %} {% trans "Resize" %}
</button> </button>
</li> </li>
{% if allow_admin_or_not_template and 'instances.snapshot_instances' in perms %} {% if allow_admin_or_not_template and 'instances.snapshot_instances' in perms %}
<li class="nav-item" role="presentation"> <li class="nav-item" role="presentation">
<button class="nav-link action-button" id="snapshots-tab" aria-controls="snapshots" data-bs-toggle="pill" data-bs-target="#snapshots" type="button" role="tab" aria-selected="false"> <button class="nav-link action-button" id="snapshots-tab" aria-controls="snapshots" data-bs-toggle="pill" data-bs-target="#snapshots" type="button" role="tab" aria-selected="false">
<span id="action-block" class="fa fa-camera" aria-hidden="true"></span> <span id="action-block" aria-hidden="true">{% bs_icon 'camera' size='2em'%} </span>
{% trans "Snapshot" %} {% trans "Snapshot" %}
</button> </button>
</li> </li>
{% endif %} {% endif %}
<li class="nav-item" role="presentation"> <li class="nav-item" role="presentation">
<button class="nav-link action-button" id="settings-tab" aria-controls="settings" data-bs-toggle="pill" data-bs-target="#settings" type="button" role="tab" aria-selected="false"> <button class="nav-link action-button" id="settings-tab" aria-controls="settings" data-bs-toggle="pill" data-bs-target="#settings" type="button" role="tab" aria-selected="false">
<span id="action-block" class="fa fa-cog" aria-hidden="true"></span> <span id="action-block" aria-hidden="true">{% bs_icon 'gear-wide-connected' size='2em'%} </span>
{% trans "Settings" %} {% trans "Settings" %}
</button> </button>
</li> </li>
<li class="nav-item" role="presentation"> <li class="nav-item" role="presentation">
<button class="nav-link action-button" id="graphics-tab" aria-controls="graphics" data-bs-toggle="pill" data-bs-target="#graphics" type="button" role="tab" aria-selected="false"> <button class="nav-link action-button" id="graphics-tab" aria-controls="graphics" data-bs-toggle="pill" data-bs-target="#graphics" type="button" role="tab" aria-selected="false">
<span id="action-block" class="fa fa-bar-chart" aria-hidden="true"></span> <span id="action-block" aria-hidden="true">{% bs_icon 'bar-chart-line' size='2em'%} </span>
{% trans "Stats" %} {% trans "Stats" %}
</button> </button>
</li> </li>
<li class="nav-item" role="presentation"> <li class="nav-item" role="presentation">
<button class="nav-link action-button" id="undefine-tab" aria-controls="undefine" data-bs-toggle="pill" data-bs-target="#undefine" type="button" role="tab" aria-selected="false"> <button class="nav-link action-button" id="undefine-tab" aria-controls="undefine" data-bs-toggle="pill" data-bs-target="#undefine" type="button" role="tab" aria-selected="false">
<span id="action-block" class="fa fa-trash" aria-hidden="true"></span> <span id="action-block" aria-hidden="true">{% bs_icon 'trash' size='2em'%} </span>
{% trans "Destroy" %} {% trans "Destroy" %}
</button> </button>
</li> </li>

View file

@ -1,45 +1,45 @@
{% load i18n %} {% load i18n %}
{% load icons %} {% load bootstrap_icons %}
<form action="" method="post" role="form" aria-label="Shortcut instance action form">{% csrf_token %} <form action="" method="post" role="form" aria-label="Shortcut instance action form">{% csrf_token %}
{% if instance.proxy.instance.info.0 == 5 %} {% if instance.proxy.instance.info.0 == 5 %}
{% if instance.is_template %} {% if instance.is_template %}
<a href="{% url 'instances:instance' instance.id %}#clone" class="btn btn-sm btn-secondary" title="{% trans "Clone" %}"> <a href="{% url 'instances:instance' instance.id %}#clone" class="btn btn-sm btn-secondary" title="{% trans "Clone" %}">
{% icon 'clone' %} {% bs_icon 'clone' %}
</a> </a>
{% else %} {% else %}
<a class="btn btn-sm btn-secondary" href="{% url 'instances:poweron' instance.id %}" onclick="showPleaseWaitDialog()" title="{% trans "Power On" %}"> <a class="btn btn-sm btn-secondary" href="{% url 'instances:poweron' instance.id %}" onclick="showPleaseWaitDialog()" title="{% trans "Power On" %}">
{% icon 'play' %} {% bs_icon 'play' %}
</a> </a>
{% endif %} {% endif %}
<a class="btn btn-sm btn-secondary disabled" title="{% trans "Suspend" %}">{% icon 'pause' %}</a> <a class="btn btn-sm btn-secondary disabled" title="{% trans "Suspend" %}">{% bs_icon 'pause' %}</a>
<a class="btn btn-sm btn-secondary disabled" title="{% trans "Power Off" %}">{% icon 'power-off' %}</a> <a class="btn btn-sm btn-secondary disabled" title="{% trans "Power Off" %}">{% bs_icon 'power' %}</a>
<a class="btn btn-sm btn-secondary disabled" title="{% trans "Power Cycle" %}">{% icon 'refresh' %}</a> <a class="btn btn-sm btn-secondary disabled" title="{% trans "Power Cycle" %}">{% bs_icon 'repeat' %}</a>
<button class="btn btn-sm btn-secondary disabled" title="{% trans "VNC Console" %}" disabled> <button class="btn btn-sm btn-secondary disabled" title="{% trans "VNC Console" %}" disabled>
<span class="fa fa-eye"></span> <span>{% bs_icon 'eye' %}</span>
</button> </button>
{% endif %} {% endif %}
{% if instance.proxy.instance.info.0 == 3 %} {% if instance.proxy.instance.info.0 == 3 %}
<a class="btn btn-sm btn-secondary" href="{% url 'instances:resume' instance.id %}" title="{% trans "Resume" %}"> <a class="btn btn-sm btn-secondary" href="{% url 'instances:resume' instance.id %}" title="{% trans "Resume" %}">
{% icon 'play' %} {% bs_icon 'play' %}
</a> </a>
<a class="btn btn-sm btn-secondary disabled" title="{% trans "Suspend" %}">{% icon 'pause' %}</a> <a class="btn btn-sm btn-secondary disabled" title="{% trans "Suspend" %}">{% bs_icon 'pause' %}</a>
<a class="btn btn-sm btn-secondary" href="{% url 'instances:force_off' instance.id %}" title="{% trans "Force Off" %}"> <a class="btn btn-sm btn-secondary" href="{% url 'instances:force_off' instance.id %}" title="{% trans "Force Off" %}">
{% icon 'power-off' %} {% bs_icon 'power' %}
</a> </a>
<a class="btn btn-sm btn-secondary disabled" title="{% trans "Power Cycle" %}">{% icon 'refresh' %}</a> <a class="btn btn-sm btn-secondary disabled" title="{% trans "Power Cycle" %}">{% bs_icon 'repeat' %}</a>
<button class="btn btn-sm btn-secondary disabled" title="{% trans "VNC Console" %}" disabled> <button class="btn btn-sm btn-secondary disabled" title="{% trans "VNC Console" %}" disabled>
<span class="fa fa-eye"></span> <span>{% bs_icon 'eye'%} </span>
</button> </button>
{% endif %} {% endif %}
{% if instance.proxy.instance.info.0 == 1 %} {% if instance.proxy.instance.info.0 == 1 %}
<a class="btn btn-sm btn-secondary disabled" onclick="showPleaseWaitDialog()" title="{% trans "Power On" %}">{% icon 'play' %}</a> <a class="btn btn-sm btn-secondary disabled" onclick="showPleaseWaitDialog()" title="{% trans "Power On" %}">{% bs_icon 'play' %}</a>
<a class="btn btn-sm btn-secondary" href="{% url 'instances:suspend' instance.id %}" <a class="btn btn-sm btn-secondary" href="{% url 'instances:suspend' instance.id %}"
title="{% trans "Suspend" %}">{% icon 'pause' %}</a> title="{% trans "Suspend" %}">{% bs_icon 'pause' %}</a>
<a class="btn btn-sm btn-secondary" href="{% url 'instances:poweroff' instance.id %}">{% icon 'power-off' %}</a> <a class="btn btn-sm btn-secondary" href="{% url 'instances:poweroff' instance.id %}">{% bs_icon 'power' %}</a>
<a class="btn btn-sm btn-secondary" href="{% url 'instances:powercycle' instance.id %}">{% icon 'refresh' %}</a> <a class="btn btn-sm btn-secondary" href="{% url 'instances:powercycle' instance.id %}">{% bs_icon 'repeat' %}</a>
<button class="btn btn-sm btn-secondary" type="button" onclick='open_console("{{ instance.compute.id }}-{{ instance.get_uuid }}")' <button class="btn btn-sm btn-secondary" type="button" onclick='open_console("{{ instance.compute.id }}-{{ instance.get_uuid }}")'
title="{% trans "Console" %}"> title="{% trans "Console" %}">
<span class="fa fa-eye"></span> <span>{% bs_icon 'eye'%} </span>
</button> </button>
{% endif %} {% endif %}
</form> </form>

View file

@ -1,7 +1,8 @@
{% load i18n %} {% load i18n %}
{% load bootstrap_icons %}
{% if request.user.is_superuser %} {% if request.user.is_superuser %}
<button href="#editvol{{ id }}" type="button" class="btn btn-sm btn-secondary" data-bs-toggle="modal" title="{% trans "Edit Volume" %}"> <button href="#editvol{{ id }}" type="button" class="btn btn-sm btn-secondary" data-bs-toggle="modal" title="{% trans "Edit Volume" %}">
<i class="fa fa-edit" aria-hidden="true"></i> {% bs_icon 'pencil-square' %}
</button> </button>
<!-- Modal pool --> <!-- Modal pool -->

View file

@ -1,6 +1,6 @@
{% load i18n %} {% load i18n %}
{% load django_bootstrap5 %} {% load django_bootstrap5 %}
{% load icons %} {% load bootstrap_icons %}
<div class="tab-pane" id="settings" role="tabpanel"> <div class="tab-pane" id="settings" role="tabpanel">
<!-- Nav tabs --> <!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist" aria-label="Instance settings"> <ul class="nav nav-tabs" role="tablist" aria-label="Instance settings">
@ -8,7 +8,7 @@
{% if instance.guest_agent_ready %} {% if instance.guest_agent_ready %}
<li class="nav-item" role="presentation"> <li class="nav-item" role="presentation">
<button class="px-1 nav-link" data-bs-toggle="tab" id="osinfo-tab" data-bs-target="#osinfo" type="button" role="tab" aria-controls="osinfo" aria-selected="false" onclick="get_osinfo();"> <button class="px-1 nav-link" data-bs-toggle="tab" id="osinfo-tab" data-bs-target="#osinfo" type="button" role="tab" aria-controls="osinfo" aria-selected="false" onclick="get_osinfo();">
<span class="fa fa-info-circle"></span> <span>{% bs_icon 'info-circle' %} </span>
</button> </button>
</li> </li>
{% endif %} {% endif %}
@ -134,10 +134,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="{% trans 'up: move selected devices' %}"></span></a> <a href="#" id="boot_order_up" class="btn btn-light shadow-sm"><span title="{% trans 'up: move selected devices' %}">{% bs_icon 'arrow-up' %} </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="{% trans 'down: move selected devices' %}"></span></a> <a href="#" id="boot_order_down" class="btn btn-light shadow-sm"><span title="{% trans 'down: move selected devices' %}">{% bs_icon 'arrow-down' %} </span></a>
</div> </div>
</div> </div>
</div> </div>
@ -158,7 +158,7 @@
type="submit" type="button" type="submit" type="button"
title="{% trans 'Add CD-ROM' %}" title="{% trans 'Add CD-ROM' %}"
{% if instance.status != 5 %} disabled {% endif %}> {% if instance.status != 5 %} disabled {% endif %}>
<span class="fa fa-plus"></span> <span>{% bs_icon 'plus' %} </span>
</button> </button>
</p> </p>
</form> </form>
@ -199,7 +199,7 @@
{% endif %} {% endif %}
{% if instance.status == 5 and allow_admin_or_not_template %} {% if instance.status == 5 and allow_admin_or_not_template %}
<a href="{% url 'instances:detach_cdrom' instance.id cd.dev %}" class="btn btn-sm btn-danger float-end" title="{% trans "Detach CD-ROM (remove device)" %}"> <a href="{% url 'instances:detach_cdrom' instance.id cd.dev %}" class="btn btn-sm btn-danger float-end" title="{% trans "Detach CD-ROM (remove device)" %}">
{% icon 'remove' %} {% bs_icon 'dash-circle' %}
</a> </a>
{% endif %} {% endif %}
@ -274,7 +274,7 @@
<strong>IO Mode:</strong> {{ disk.io }} <br/> <strong>IO Mode:</strong> {{ disk.io }} <br/>
<strong>Discard:</strong> {{ disk.discard }} <br/> <strong>Discard:</strong> {{ disk.discard }} <br/>
<strong>Detect Zeroes:</strong> {{ disk.detect_zeroes }}"> <strong>Detect Zeroes:</strong> {{ disk.detect_zeroes }}">
<span class="fa fa-info"></span> <span>{% bs_icon 'info' %} </span>
</button> </button>
{{ disk.dev }} {{ disk.dev }}
</td> </td>
@ -307,11 +307,11 @@
<input type="hidden" name="name" value="{{ disk.image }}"> <input type="hidden" name="name" value="{{ disk.image }}">
{% if instance.status == 5 %} {% if instance.status == 5 %}
<button type="submit" class="btn btn-sm btn-secondary" value="{{ disk.dev }}" title="{% trans "Detach" %}" onclick="return confirm('{% trans "Are you sure to detach volume?" %}')"> <button type="submit" class="btn btn-sm btn-secondary" value="{{ disk.dev }}" title="{% trans "Detach" %}" onclick="return confirm('{% trans "Are you sure to detach volume?" %}')">
{% icon 'eject' %} {% bs_icon 'eject' %}
</button> </button>
{% else %} {% else %}
<button class="btn btn-sm btn-secondary disabled" value="{{ disk.dev }}" title="{% trans "Detach" %}" onclick="return confirm('{% trans "Are you sure? This may lead data corruption!" %}')"> <button class="btn btn-sm btn-secondary disabled" value="{{ disk.dev }}" title="{% trans "Detach" %}" onclick="return confirm('{% trans "Are you sure? This may lead data corruption!" %}')">
{% icon 'eject' %} {% bs_icon 'eject' %}
</button> </button>
{% endif %} {% endif %}
</form> </form>
@ -323,11 +323,11 @@
<input type="hidden" name="name" value="{{ disk.image }}"> <input type="hidden" name="name" value="{{ disk.image }}">
{% if instance.status == 5 %} {% if instance.status == 5 %}
<button type="submit" class="btn btn-sm btn-secondary" title="{% trans "Delete" %}" onclick="return confirm('{% trans "Are you sure to delete volume?" %}')"> <button type="submit" class="btn btn-sm btn-secondary" title="{% trans "Delete" %}" onclick="return confirm('{% trans "Are you sure to delete volume?" %}')">
<i class="fa fa-trash"></i> {% bs_icon 'trash' %}
</button> </button>
{% else %} {% else %}
<button class="btn btn-sm btn-secondary disabled" title="{% trans "Delete" %}" onclick="return confirm('{% trans "Are you sure? This may lead data corruption!" %}')"> <button class="btn btn-sm btn-secondary disabled" title="{% trans "Delete" %}" onclick="return confirm('{% trans "Are you sure? This may lead data corruption!" %}')">
<i class="fa fa-trash"></i> {% bs_icon 'trash' %}
</button> </button>
{% endif %} {% endif %}
</form> </form>
@ -393,7 +393,7 @@
title="{% trans "Edit NIC" %}" title="{% trans "Edit NIC" %}"
data-bs-target="#editInstanceNetwork{{ forloop.counter0 }}" data-bs-target="#editInstanceNetwork{{ forloop.counter0 }}"
data-bs-toggle="modal"> data-bs-toggle="modal">
<span class="fa fa-edit" aria-hidden="true"></span> <span aria-hidden="true">{% bs_icon 'pencil-square' %} </span>
</button> </button>
<div class="modal fade" id="editInstanceNetwork{{ forloop.counter0 }}" role="dialog" aria-labelledby="editInstanceNetworkLabel" aria-hidden="true"> <div class="modal fade" id="editInstanceNetwork{{ forloop.counter0 }}" role="dialog" aria-labelledby="editInstanceNetworkLabel" aria-hidden="true">
@ -471,7 +471,7 @@
<form action="{% url 'instances:delete_network' instance.id %}" method="post" name="delete_network" role="form">{% csrf_token %} <form action="{% url 'instances:delete_network' instance.id %}" method="post" name="delete_network" role="form">{% csrf_token %}
<button class="btn btn-sm btn-danger" value="{{ network.mac }}" name="delete_network" title="{% trans "Delete Device" %}" <button class="btn btn-sm btn-danger" value="{{ network.mac }}" name="delete_network" title="{% trans "Delete Device" %}"
onclick="return confirm('{% trans "Are you sure?" %}')"> onclick="return confirm('{% trans "Are you sure?" %}')">
<i class="fa fa-trash"></i> {% bs_icon 'trash' %}
</button> </button>
</form> </form>
</td> </td>
@ -547,7 +547,7 @@
<button type="submit" class="btn btn-sm btn-primary" <button type="submit" class="btn btn-sm btn-primary"
name="set_qos" data-bs-toggle="modal" name="set_qos" data-bs-toggle="modal"
title="{% trans "Edit QoS" %}" onclick="return confirm('{% trans "Are you sure?" %}')"> title="{% trans "Edit QoS" %}" onclick="return confirm('{% trans "Are you sure?" %}')">
<span class="fa fa-save"></span> <span>{% bs_icon 'save' %} </span>
</button> </button>
</form> </form>
<form action="{% url 'instances:unset_qos' instance.id %}" method="post" role="form" aria-label="Instance QoS configuration form"> <form action="{% url 'instances:unset_qos' instance.id %}" method="post" role="form" aria-label="Instance QoS configuration form">
@ -557,7 +557,7 @@
<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="{% trans "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> {% bs_icon 'trash' %}
</button> </button>
</form> </form>
</td> </td>
@ -694,7 +694,7 @@
<td><a href="{% url 'accounts:account' userinstance.user.id %}">{{ userinstance.user }}</a></td> <td><a href="{% url 'accounts:account' userinstance.user.id %}">{{ userinstance.user }}</a></td>
<td style="width:30px;"> <td style="width:30px;">
<a href="{% url 'accounts:user_instance_delete' userinstance.id %}?next={% url 'instances:instance' instance.id %}#users"> <a href="{% url 'accounts:user_instance_delete' userinstance.id %}?next={% url 'instances:instance' instance.id %}#users">
{% icon 'trash' %} {% bs_icon 'trash' %}
</a> </a>
</td> </td>
</tr> </tr>

View file

@ -1,5 +1,5 @@
{% load i18n %} {% load i18n %}
{% load icons %} {% load bootstrap_icons %}
<div class="tab-pane" id="snapshots" role="tabpanel"> <div class="tab-pane" id="snapshots" role="tabpanel">
<!-- Nav tabs --> <!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist" aria-label="Instance snapshot menu"> <ul class="nav nav-tabs" role="tablist" aria-label="Instance snapshot menu">
@ -90,12 +90,12 @@
<input type="hidden" name="name" value="{{ snap.name }}"> <input type="hidden" name="name" value="{{ snap.name }}">
{% if instance.status == 5 %} {% if instance.status == 5 %}
<button type="submit" class="btn btn-sm btn-primary" name="revert_snapshot" title="{% trans 'Revert to this Snapshot' %}" onclick="return confirm('Are you sure?')"> <button type="submit" class="btn btn-sm btn-primary" name="revert_snapshot" title="{% trans 'Revert to this Snapshot' %}" onclick="return confirm('Are you sure?')">
<span class="fa fa-download"></span> <span>{% bs_icon 'download' %} </span>
</button> </button>
{% else %} {% else %}
<button type="button" class="btn btn-sm btn-primary disabled" <button type="button" class="btn btn-sm btn-primary disabled"
title="{% trans "To restore snapshots you need Power Off the instance." %}"> title="{% trans "To restore snapshots you need Power Off the instance." %}">
<span class="fa fa-download"></span> <span>{% bs_icon 'download' %} </span>
</button> </button>
{% endif %} {% endif %}
</form> </form>
@ -104,7 +104,7 @@
<form action="{% url 'instances:delete_snapshot' instance.id %}" method="post" role="form" aria-label="Delete snapshot form">{% csrf_token %} <form action="{% url 'instances:delete_snapshot' instance.id %}" method="post" role="form" aria-label="Delete snapshot 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-danger" title="{% trans 'Delete Snapshot' %}" onclick="return confirm('{% trans "Are you sure?" %}')"> <button type="submit" class="btn btn-sm btn-danger" title="{% trans 'Delete Snapshot' %}" onclick="return confirm('{% trans "Are you sure?" %}')">
{% icon 'trash' %} {% bs_icon 'trash' %}
</button> </button>
</form> </form>
</td> </td>
@ -123,7 +123,7 @@
<input type="hidden" name="date" value="{{ ext_snap.date }}"> <input type="hidden" name="date" value="{{ ext_snap.date }}">
<input type="hidden" name="desc" value="{{ ext_snap.description }}"> <input type="hidden" name="desc" value="{{ ext_snap.description }}">
<button type="submit" class="btn btn-sm btn-primary" name="revert_external_snapshot" title="{% trans 'Revert to this Snapshot' %}" onclick="return confirm('You are going to lose your unsaved work by reverting to this snapshot state. Are you sure?')"> <button type="submit" class="btn btn-sm btn-primary" name="revert_external_snapshot" title="{% trans 'Revert to this Snapshot' %}" onclick="return confirm('You are going to lose your unsaved work by reverting to this snapshot state. Are you sure?')">
<span class="fa fa-download"></span> <span>{% bs_icon 'download' %} </span>
</button> </button>
</form> </form>
</td> </td>
@ -131,7 +131,7 @@
<form action="{% url 'instances:delete_external_snapshot' instance.id %}" method="post" role="form" aria-label="Delete external snapshot form">{% csrf_token %} <form action="{% url 'instances:delete_external_snapshot' instance.id %}" method="post" role="form" aria-label="Delete external snapshot form">{% csrf_token %}
<input type="hidden" name="name" value="{{ ext_snap.name }}"> <input type="hidden" name="name" value="{{ ext_snap.name }}">
<button type="submit" class="btn btn-sm btn-danger" name="delete_external_snapshot" title="{% trans 'Delete Snapshot' %}" onclick="return confirm('You are about to delete this snapshot and merge it with base image. Are you sure?')"> <button type="submit" class="btn btn-sm btn-danger" name="delete_external_snapshot" title="{% trans 'Delete Snapshot' %}" onclick="return confirm('You are about to delete this snapshot and merge it with base image. Are you sure?')">
{% icon 'trash' %} {% bs_icon 'trash' %}
</button> </button>
</form> </form>
</td> </td>

View file

@ -1,4 +1,5 @@
{% load i18n %} {% load i18n %}
{% load bootstrap_icons %}
<div class="tab-pane" id="graphics" role="tabpanel" > <div class="tab-pane" id="graphics" role="tabpanel" >
<!-- Nav tabs --> <!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist" aria-label="Instance graphs and logs menu"> <ul class="nav nav-tabs" role="tablist" aria-label="Instance graphs and logs menu">
@ -18,7 +19,7 @@
<div role="tabpanel" class="tab-pane tab-pane-bordered active" id="graphs"> <div role="tabpanel" class="tab-pane tab-pane-bordered active" id="graphs">
<div class="mb-1 card border-success"> <div class="mb-1 card border-success">
<div class="card-header"> <div class="card-header">
<h5 class="card-title"><i class="fa fa-long-arrow-right"></i> <h5 class="card-title">{% bs_icon 'arrow-right' %}
{% trans "CPU Usage" %} {% trans "CPU Usage" %}
</h5> </h5>
</div> </div>
@ -32,7 +33,7 @@
</div> </div>
<div class="mb-1 card border-danger"> <div class="mb-1 card border-danger">
<div class="card-header"> <div class="card-header">
<h5 class="card-title"><i class="fa fa-long-arrow-right"></i> <h5 class="card-title">{% bs_icon 'arrow-right' %}
{% trans "Memory Usage" %} {% trans "Memory Usage" %}
</h5> </h5>
</div> </div>
@ -47,7 +48,7 @@
{% for net in instance.networks %} {% for net in instance.networks %}
<div class="mb-1 card border-info"> <div class="mb-1 card border-info">
<div class="card-header"> <div class="card-header">
<h5 class="card-title"><i class="fa fa-long-arrow-right"></i> <h5 class="card-title">{% bs_icon 'arrow-right' %}
{% trans "Bandwidth Device" %}: eth{{ forloop.counter0 }} {% trans "Bandwidth Device" %}: eth{{ forloop.counter0 }}
</h5> </h5>
</div> </div>
@ -63,7 +64,7 @@
{% for disk in instance.disks %} {% for disk in instance.disks %}
<div class="mb-1 card border-warning"> <div class="mb-1 card border-warning">
<div class="card-header"> <div class="card-header">
<h5 class="card-title"><i class="fa fa-long-arrow-right"></i> <h5 class="card-title">{% bs_icon 'arrow-right' %}
{% trans "Disk I/O device" %}: {{ disk.dev }} {% trans "Disk I/O device" %}: {{ disk.dev }}
</h5> </h5>
</div> </div>

View file

@ -1,7 +1,8 @@
{% load i18n %} {% load i18n %}
{% load bootstrap_icons %}
{% if request.user.is_superuser %} {% if request.user.is_superuser %}
<a href="#AddInterface" type="button" class="btn btn-success float-end" data-bs-toggle="modal"> <a href="#AddInterface" type="button" class="btn btn-success float-end" data-bs-toggle="modal">
<span class="fa fa-plus" aria-hidden="true"></span> <span aria-hidden="true">{% bs_icon 'plus' %} </span>
</a> </a>
<!-- Modal Secret --> <!-- Modal Secret -->

View file

@ -1,5 +1,6 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %} {% load i18n %}
{% load bootstrap_icons %}
{% block title %}{% trans "Interface" %} - {{ iface }}{% endblock %} {% block title %}{% trans "Interface" %} - {{ iface }}{% endblock %}
@ -10,25 +11,25 @@
<div class="col-lg-12"> <div class="col-lg-12">
<ol class="breadcrumb shadow-sm"> <ol class="breadcrumb shadow-sm">
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'overview' compute.id %}"><i class="fa fa-dashboard"></i> {% trans "Overview" %}</a> <a href="{% url 'overview' compute.id %}">{% bs_icon 'laptop' %} {% trans "Overview" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'instances' compute.id %}"><i class="fa fa-server"></i> {% trans "Instances" %}</a> <a href="{% url 'instances' compute.id %}">{% bs_icon 'server' %} {% trans "Instances" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'storages' compute.id %}"> <i class="fa fa-hdd-o"></i> {% trans "Storages" %}</a> <a href="{% url 'storages' compute.id %}">{% bs_icon 'device-hdd' %} {% trans "Storages" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'networks' compute.id %}"><i class="fa fa-sitemap"></i> {% trans "Networks" %}</a> <a href="{% url 'networks' compute.id %}">{% bs_icon 'hdd-network' %} {% trans "Networks" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'interfaces' compute.id %}"><i class="fa fa-wifi"></i> {% trans "Interfaces" %}</a> <a href="{% url 'interfaces' compute.id %}">{% bs_icon 'wifi' %} {% trans "Interfaces" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'nwfilters' compute.id %}"> <i class="fa fa-filter"></i> {% trans "NWFilters" %}</a> <a href="{% url 'nwfilters' compute.id %}">{% bs_icon 'filter' %} {% trans "NWFilters" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'virtsecrets' compute.id %}"><i class="fa fa-key"></i> {% trans "Secrets" %}</a> <a href="{% url 'virtsecrets' compute.id %}">{% bs_icon 'key' %} {% trans "Secrets" %}</a>
</li> </li>
</ol> </ol>
</div> </div>

View file

@ -1,6 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %} {% load i18n %}
{% load static %} {% load static %}
{% load bootstrap_icons %}
{% block title %}{% trans "Interfaces" %} - {{ compute.name }}{% endblock %} {% block title %}{% trans "Interfaces" %} - {{ compute.name }}{% endblock %}
@ -16,25 +17,25 @@
<nav aria-label="breadcrumb"> <nav aria-label="breadcrumb">
<ol class="breadcrumb shadow-sm"> <ol class="breadcrumb shadow-sm">
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'overview' compute.id %}"><i class="fa fa-dashboard"></i> {% trans "Overview" %}</a> <a href="{% url 'overview' compute.id %}">{% bs_icon 'laptop' %} {% trans "Overview" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'instances' compute.id %}"><i class="fa fa-server"></i> {% trans "Instances" %}</a> <a href="{% url 'instances' compute.id %}">{% bs_icon 'server' %} {% trans "Instances" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'storages' compute.id %}"><i class="fa fa-hdd-o"></i> {% trans "Storages" %}</a> <a href="{% url 'storages' compute.id %}">{% bs_icon 'device-hdd' %} {% trans "Storages" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'networks' compute.id %}"><i class="fa fa-sitemap"></i> {% trans "Networks" %}</a> <a href="{% url 'networks' compute.id %}">{% bs_icon 'hdd-network' %} {% trans "Networks" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<span class="fw-bold"><i class="fa fa-wifi"></i> {% trans "Interfaces" %}</span> <span class="fw-bold">{% bs_icon 'wifi' %} {% trans "Interfaces" %}</span>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'nwfilters' compute.id %}"><i class="fa fa-filter"></i> {% trans "NWFilters" %}</a> <a href="{% url 'nwfilters' compute.id %}">{% bs_icon 'filter' %} {% trans "NWFilters" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'virtsecrets' compute.id %}"><i class="fa fa-key"></i> {% trans "Secrets" %}</a> <a href="{% url 'virtsecrets' compute.id %}">{% bs_icon 'key' %} {% trans "Secrets" %}</a>
</li> </li>
</ol> </ol>
</nav> </nav>
@ -45,7 +46,7 @@
{% if not ifaces_all %} {% if not ifaces_all %}
<div class="col-lg-12"> <div class="col-lg-12">
<div class="alert alert-warning shadow-sm"> <div class="alert alert-warning shadow-sm">
<i class="fa fa-exclamation-triangle"></i> <strong>{% trans "Warning" %}:</strong> {% trans "Hypervisor doesn't have any Interfaces" %} {% bs_icon 'exclamation-triangle' %} <strong>{% trans "Warning" %}:</strong> {% trans "Hypervisor doesn't have any Interfaces" %}
</div> </div>
</div> </div>
{% else %} {% else %}

View file

@ -1,4 +1,5 @@
import json import json
import logging
from django.http import HttpResponse from django.http import HttpResponse
@ -17,6 +18,8 @@ def addlogmsg(user, host, instance, message):
""" """
add_log_msg = Logs(user=user, host=host, instance=instance, message=message) add_log_msg = Logs(user=user, host=host, instance=instance, message=message)
add_log_msg.save() add_log_msg.save()
logger = logging.getLogger("")
logger.info(user + " " + host+ " " + instance+ " " + message)
@superuser_only @superuser_only

View file

@ -1,7 +1,8 @@
{% load i18n %} {% load i18n %}
{% load bootstrap_icons %}
{% if request.user.is_superuser %} {% if request.user.is_superuser %}
<a href="#AddQos{{ id }}" type="button" class="btn btn-sm btn-success float-end" data-bs-toggle="modal" title="add qos"> <a href="#AddQos{{ id }}" type="button" class="btn btn-sm btn-success float-end" data-bs-toggle="modal" title="add qos">
<span class="fa fa-barcode" aria-hidden="true"></span> <span aria-hidden="true">{% bs_icon 'qr-code' %} </span>
</a> </a>
<!-- Modal pool --> <!-- Modal pool -->

View file

@ -1,7 +1,8 @@
{% load i18n %} {% load i18n %}
{% load bootstrap_icons %}
{% if request.user.is_superuser %} {% if request.user.is_superuser %}
<a href="#AddNetPool" type="button" class="btn btn-success float-end" data-bs-toggle="modal"> <a href="#AddNetPool" type="button" class="btn btn-success float-end" data-bs-toggle="modal">
<span class="fa fa-plus" aria-hidden="true"></span> <span aria-hidden="true">{% bs_icon 'plus' %} </span>
</a> </a>
<!-- Modal pool --> <!-- Modal pool -->

View file

@ -1,7 +1,8 @@
{% load i18n %} {% load i18n %}
{% load bootstrap_icons %}
{% if request.user.is_superuser %} {% if request.user.is_superuser %}
<a href="#AddFixedNet4" type="button" class="btn btn-success float-end" data-bs-toggle="modal"> <a href="#AddFixedNet4" type="button" class="btn btn-success float-end" data-bs-toggle="modal">
<span class="fa fa-plus" aria-hidden="true"></span> <span aria-hidden="true">{% bs_icon 'plus' %} </span>
</a> </a>
<!-- Modal pool --> <!-- Modal pool -->

View file

@ -1,7 +1,8 @@
{% load i18n %} {% load i18n %}
{% load bootstrap_icons %}
{% if request.user.is_superuser %} {% if request.user.is_superuser %}
<a href="#AddFixedNet6" type="button" class="btn btn-success float-end" data-bs-toggle="modal"> <a href="#AddFixedNet6" type="button" class="btn btn-success float-end" data-bs-toggle="modal">
<span class="fa fa-plus" aria-hidden="true"></span> <span aria-hidden="true">{% bs_icon 'plus' %} </span>
</a> </a>
<!-- Modal pool --> <!-- Modal pool -->

View file

@ -1,6 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %} {% load i18n %}
{% load static %} {% load static %}
{% load bootstrap_icons %}
{% block title %}{% trans "Network" %} - {{ pool }}{% endblock %} {% block title %}{% trans "Network" %} - {{ pool }}{% endblock %}
@ -11,25 +12,25 @@
<div class="col-lg-12"> <div class="col-lg-12">
<ol class="breadcrumb shadow-sm"> <ol class="breadcrumb shadow-sm">
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'overview' compute.id %}"><i class="fa fa-dashboard"></i> {% trans "Overview" %}</a> <a href="{% url 'overview' compute.id %}">{% bs_icon 'laptop' %} {% trans "Overview" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'instances' compute.id %}"><i class="fa fa-server"></i> {% trans "Instances" %}</a> <a href="{% url 'instances' compute.id %}">{% bs_icon 'server' %} {% trans "Instances" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'storages' compute.id %}"><i class="fa fa-hdd-o"></i> {% trans "Storages" %}</a> <a href="{% url 'storages' compute.id %}">{% bs_icon 'device-hdd' %} {% trans "Storages" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'networks' compute.id %}"><i class="fa fa-sitemap"></i> {% trans "Networks" %}</a> <a href="{% url 'networks' compute.id %}">{% bs_icon 'hdd-network' %} {% trans "Networks" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'interfaces' compute.id %}"><i class="fa fa-wifi"></i> {% trans "Interfaces" %}</a> <a href="{% url 'interfaces' compute.id %}">{% bs_icon 'wifi' %} {% trans "Interfaces" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'nwfilters' compute.id %}"><i class="fa fa-filter"></i> {% trans "NWFilters" %}</a> <a href="{% url 'nwfilters' compute.id %}">{% bs_icon 'filter' %} {% trans "NWFilters" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'virtsecrets' compute.id %}"><i class="fa fa-key"></i> {% trans "Secrets" %}</a> <a href="{% url 'virtsecrets' compute.id %}">{% bs_icon 'key' %} {% trans "Secrets" %}</a>
</li> </li>
</ol> </ol>
@ -68,7 +69,7 @@
<div class="d-grid col-lg-12"> <div class="d-grid col-lg-12">
<button class="btn btn-light" role="button" data-bs-toggle="collapse" data-bs-target="#collapseXML" aria-expanded="true" aria-controls="collapseXML"> <button class="btn btn-light" role="button" data-bs-toggle="collapse" data-bs-target="#collapseXML" aria-expanded="true" aria-controls="collapseXML">
<span class="fa fa-chevron-down"></span> <span>{% bs_icon 'chevron-down' %} </span>
{% trans 'XML' %} {% trans 'XML' %}
</button> </button>
<div class="collapse" id="collapseXML"> <div class="collapse" id="collapseXML">
@ -154,7 +155,7 @@
<div class="d-grid col-12"> <div class="d-grid col-12">
<button class="btn btn-light" role="button" data-bs-toggle="collapse" data-bs-target="#collapseipv4fix" aria-expanded="true" aria-controls="collapseXML"> <button class="btn btn-light" role="button" data-bs-toggle="collapse" data-bs-target="#collapseipv4fix" aria-expanded="true" aria-controls="collapseXML">
<span class="fa fa-chevron-down"></span> <span>{% bs_icon 'chevron-down' %} </span>
{% trans 'Show' %} {% trans 'Show' %}
</button> </button>
<div id="collapseipv4fix" class="collapse"> <div id="collapseipv4fix" class="collapse">
@ -187,12 +188,12 @@
<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="{% trans "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> {% bs_icon 'save' %}
</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="{% trans "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> {% bs_icon 'trash' %}
</button> </button>
</td> </td>
</form> </form>
@ -264,7 +265,7 @@
{% if ipv6_fixed_address %} {% if ipv6_fixed_address %}
<div class="d-grid col-12"> <div class="d-grid col-12">
<button class="btn btn-light" role="button" data-bs-toggle="collapse" data-bs-target="#collapseipv6fix" aria-expanded="true" aria-controls="collapseipv6fix"> <button class="btn btn-light" role="button" data-bs-toggle="collapse" data-bs-target="#collapseipv6fix" aria-expanded="true" aria-controls="collapseipv6fix">
<span class="fa fa-chevron-down"></span> <span>{% bs_icon 'chevron-down' %} </span>
{% trans 'Show' %} {% trans 'Show' %}
</button> </button>
<div id="collapseipv6fix" class="collapse"> <div id="collapseipv6fix" class="collapse">
@ -296,12 +297,12 @@
<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="{% trans "Edit entry" %}" onclick="return confirm('{% trans "Are you sure?" %}')"> title="{% trans "Edit entry" %}" onclick="return confirm('{% trans "Are you sure?" %}')">
<span class="fa fa-save"></span> <span>{% bs_icon 'save' %} </span>
</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="{% trans "Delete entry" %}" onclick="return confirm('{% trans "Are you sure?" %}')"> title="{% trans "Delete entry" %}" onclick="return confirm('{% trans "Are you sure?" %}')">
<span class="fa fa-trash"></span> <span>{% bs_icon 'trash' %} </span>
</button> </button>
</td> </td>
</form> </form>
@ -351,12 +352,12 @@
<button type="submit" class="btn btn-sm btn-primary" <button type="submit" class="btn btn-sm btn-primary"
name="set_qos" data-bs-toggle="modal" name="set_qos" data-bs-toggle="modal"
title="{% trans "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> {% bs_icon 'save' %}
</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="{% trans "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> {% bs_icon 'trash' %}
</button> </button>
</td> </td>
</tr> </tr>

View file

@ -1,5 +1,6 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %} {% load i18n %}
{% load bootstrap_icons %}
{% block title %}{% trans "Networks" %} - {{ compute.name }}{% endblock %} {% block title %}{% trans "Networks" %} - {{ compute.name }}{% endblock %}
@ -13,25 +14,25 @@
<nav aria-label="breadcrumb"> <nav aria-label="breadcrumb">
<ol class="breadcrumb shadow-sm"> <ol class="breadcrumb shadow-sm">
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'overview' compute.id %}"><i class="fa fa-dashboard"></i> {% trans "Overview" %}</a> <a href="{% url 'overview' compute.id %}">{% bs_icon 'laptop' %} {% trans "Overview" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'instances' compute.id %}"><i class="fa fa-server"></i> {% trans "Instances" %}</a> <a href="{% url 'instances' compute.id %}">{% bs_icon 'server' %} {% trans "Instances" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'storages' compute.id %}"><i class="fa fa-hdd-o"></i> {% trans "Storages" %}</a> <a href="{% url 'storages' compute.id %}">{% bs_icon 'device-hdd' %} {% trans "Storages" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<span class="fw-bold"><i class="fa fa-sitemap"></i> {% trans "Networks" %}</span> <span class="fw-bold">{% bs_icon 'hdd-network' %} {% trans "Networks" %}</span>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'interfaces' compute.id %}"><i class="fa fa-wifi"></i> {% trans "Interfaces" %}</a> <a href="{% url 'interfaces' compute.id %}">{% bs_icon 'wifi' %} {% trans "Interfaces" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'nwfilters' compute.id %}"><i class="fa fa-filter"></i> {% trans "NWFilters" %}</a> <a href="{% url 'nwfilters' compute.id %}">{% bs_icon 'filter' %} {% trans "NWFilters" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'virtsecrets' compute.id %}"><i class="fa fa-key"></i> {% trans "Secrets" %}</a> <a href="{% url 'virtsecrets' compute.id %}">{% bs_icon 'key' %} {% trans "Secrets" %}</a>
</li> </li>
</ol> </ol>
</nav> </nav>
@ -42,7 +43,7 @@
{% if not networks %} {% if not networks %}
<div class="col-lg-12"> <div class="col-lg-12">
<div class="alert alert-warning shadow-sm"> <div class="alert alert-warning shadow-sm">
<i class="fa fa-exclamation-triangle"></i> <strong>{% trans "Warning" %} :</strong> {% trans "Hypervisor doesn't have any Network" %} {% bs_icon 'exclamation-triangle' %} <strong>{% trans "Warning" %} :</strong> {% trans "Hypervisor doesn't have any Network" %}
</div> </div>
</div> </div>
{% else %} {% else %}

View file

@ -1,7 +1,8 @@
{% load i18n %} {% load i18n %}
{% load bootstrap_icons %}
{% if request.user.is_superuser %} {% if request.user.is_superuser %}
<button class="btn btn-success float-end" type="button" data-bs-toggle="modal" data-bs-target="#AddNWFilterRule"> <button class="btn btn-success float-end" type="button" data-bs-toggle="modal" data-bs-target="#AddNWFilterRule">
<span class="fa fa-plus" aria-hidden="true"></span> <span aria-hidden="true">{% bs_icon 'plus' %} </span>
</button> </button>
<!-- Modal Secret --> <!-- Modal Secret -->

View file

@ -1,7 +1,8 @@
{% load i18n %} {% load i18n %}
{% load bootstrap_icons %}
{% if request.user.is_superuser %} {% if request.user.is_superuser %}
<button type="button" class="btn btn-success btn-header float-end" data-bs-toggle="modal" data-bs-target="#AddNWFilter"> <button type="button" class="btn btn-success btn-header float-end" data-bs-toggle="modal" data-bs-target="#AddNWFilter">
<span class="fa fa-plus" aria-hidden="true"></span> <span aria-hidden="true">{% bs_icon 'plus' %} </span>
</button> </button>
<!-- Modal Secret --> <!-- Modal Secret -->

View file

@ -1,6 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %} {% load i18n %}
{% load static %} {% load static %}
{% load bootstrap_icons %}
{% block title %}{% trans "NWFilter" %}: {{ name }}{% endblock %} {% block title %}{% trans "NWFilter" %}: {{ name }}{% endblock %}
@ -11,25 +12,25 @@
<div class="col-lg-12"> <div class="col-lg-12">
<ol class="breadcrumb shadow-sm"> <ol class="breadcrumb shadow-sm">
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'overview' compute.id %}"><i class="fa fa-dashboard"></i> {% trans "Overview" %}</a> <a href="{% url 'overview' compute.id %}">{% bs_icon 'laptop' %} {% trans "Overview" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'instances' compute.id %}"><i class="fa fa-server"></i> {% trans "Instances" %}</a> <a href="{% url 'instances' compute.id %}">{% bs_icon 'server' %} {% trans "Instances" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'storages' compute.id %}"><i class="fa fa-hdd-o"></i> {% trans "Storages" %}</a> <a href="{% url 'storages' compute.id %}">{% bs_icon 'device-hdd' %} {% trans "Storages" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'networks' compute.id %}"><i class="fa fa-sitemap"></i> {% trans "Networks" %}</a> <a href="{% url 'networks' compute.id %}">{% bs_icon 'hdd-network' %} {% trans "Networks" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'interfaces' compute.id %}"><i class="fa fa-wifi"></i> {% trans "Interfaces" %}</a> <a href="{% url 'interfaces' compute.id %}">{% bs_icon 'wifi' %} {% trans "Interfaces" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'nwfilters' compute.id %}"><i class="fa fa-filter"></i> {% trans "NWFilters" %}</a> <a href="{% url 'nwfilters' compute.id %}">{% bs_icon 'filter' %} {% trans "NWFilters" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'virtsecrets' compute.id %}"><i class="fa fa-key"></i> {% trans "Secrets" %}</a> <a href="{% url 'virtsecrets' compute.id %}">{% bs_icon 'key' %} {% trans "Secrets" %}</a>
</li> </li>
</ol> </ol>
</div> </div>
@ -45,7 +46,7 @@
<div class="row"> <div class="row">
<div class="d-grid col-lg-12"> <div class="d-grid col-lg-12">
<button class="btn btn-light mb-3" role="button" data-bs-toggle="collapse" data-bs-target="#collapseXML" aria-expanded="true" aria-controls="collapseXML"> <button class="btn btn-light mb-3" role="button" data-bs-toggle="collapse" data-bs-target="#collapseXML" aria-expanded="true" aria-controls="collapseXML">
<span class="fa fa-chevron-down"></span> <span>{% bs_icon 'chevron-down' %} </span>
{% trans 'XML' %} {% trans 'XML' %}
</button> </button>
<div class="collapse" id="collapseXML"> <div class="collapse" id="collapseXML">
@ -76,7 +77,7 @@
{% endfor %} {% endfor %}
</select> </select>
<button type="submit" class="btn btn-success float-end" name="add_nwfilter_ref"> <button type="submit" class="btn btn-success float-end" name="add_nwfilter_ref">
<span class="fa fa-plus" aria-hidden="true"></span> <span aria-hidden="true">{% bs_icon 'plus' %} </span>
</button> </button>
</div> </div>
</form> </form>
@ -101,7 +102,7 @@
<form action="" method="post" role="form" aria-label="Delete NWFilter form">{% csrf_token %} <form action="" method="post" role="form" aria-label="Delete NWFilter form">{% csrf_token %}
<input type="hidden" name="ref" value="{{ ref }}"> <input type="hidden" name="ref" value="{{ ref }}">
<button type="submit" class="btn btn-sm btn-danger" name="del_nwfilter_ref" title="{% trans "Delete" %}" onclick="return confirm('{% trans "Are you sure?" %}');"> <button type="submit" class="btn btn-sm btn-danger" name="del_nwfilter_ref" title="{% trans "Delete" %}" onclick="return confirm('{% trans "Are you sure?" %}');">
<i class="fa fa-trash"></i> {% bs_icon 'trash' %}
</button> </button>
</form> </form>
</td> </td>
@ -141,7 +142,7 @@
<input type="hidden" name="direction" value="{{ rule.direction }}"> <input type="hidden" name="direction" value="{{ rule.direction }}">
<input type="hidden" name="priority" value="{{ rule.priority }}"> <input type="hidden" name="priority" value="{{ rule.priority }}">
<button type="submit" class="btn btn-sm btn-danger" name="del_nwfilter_rule" title="{% trans 'Delete' %}" onclick="return confirm('{% trans "Are you sure?" %}');"> <button type="submit" class="btn btn-sm btn-danger" name="del_nwfilter_rule" title="{% trans 'Delete' %}" onclick="return confirm('{% trans "Are you sure?" %}');">
<i class="fa fa-trash"></i> {% bs_icon 'trash' %}
</button> </button>
</form> </form>
</td> </td>

View file

@ -1,6 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %} {% load i18n %}
{% load static %} {% load static %}
{% load bootstrap_icons %}
{% block title %}{% trans "NWFilters" %} - {{ compute.name }}{% endblock %} {% block title %}{% trans "NWFilters" %} - {{ compute.name }}{% endblock %}
@ -17,25 +18,25 @@
<nav aria-label="breadcrumb"> <nav aria-label="breadcrumb">
<ol class="breadcrumb shadow-sm"> <ol class="breadcrumb shadow-sm">
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'overview' compute.id %}"><i class="fa fa-dashboard"></i> {% trans "Overview" %}</a> <a href="{% url 'overview' compute.id %}">{% bs_icon 'laptop' %} {% trans "Overview" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'instances' compute.id %}"><i class="fa fa-server"></i> {% trans "Instances" %}</a> <a href="{% url 'instances' compute.id %}">{% bs_icon 'server' %} {% trans "Instances" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'storages' compute.id %}"><i class="fa fa-hdd-o"></i> {% trans "Storages" %}</a> <a href="{% url 'storages' compute.id %}">{% bs_icon 'device-hdd' %} {% trans "Storages" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'networks' compute.id %}"><i class="fa fa-sitemap"></i> {% trans "Networks" %}</a> <a href="{% url 'networks' compute.id %}">{% bs_icon 'hdd-network' %} {% trans "Networks" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'interfaces' compute.id %}"><i class="fa fa-wifi"></i> {% trans "Interfaces" %}</a> <a href="{% url 'interfaces' compute.id %}">{% bs_icon 'wifi' %} {% trans "Interfaces" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<span class="fw-bold"><i class="fa fa-filter"></i> {% trans "NWFilters" %}</span> <span class="fw-bold">{% bs_icon 'filter' %} {% trans "NWFilters" %}</span>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'virtsecrets' compute.id %}"><i class="fa fa-key"></i> {% trans "Secrets" %}</a> <a href="{% url 'virtsecrets' compute.id %}">{% bs_icon 'key' %} {% trans "Secrets" %}</a>
</li> </li>
</ol> </ol>
</nav> </nav>
@ -81,7 +82,7 @@
</div> <!-- /.modal-dialog --> </div> <!-- /.modal-dialog -->
</div> <!-- /.modal --> </div> <!-- /.modal -->
<button class="btn btn-sm btn-secondary" data-bs-toggle="modal" data-bs-target="#Show{{ forloop.counter }}" title="{% trans "Show" %}"> <button class="btn btn-sm btn-secondary" data-bs-toggle="modal" data-bs-target="#Show{{ forloop.counter }}" title="{% trans "Show" %}">
<i class="fa fa-eye"></i> {% bs_icon 'eye' %}
</button> </button>
</td> </td>
<td> <td>
@ -110,13 +111,13 @@
</div> <!-- /.modal-content --> </div> <!-- /.modal-content -->
</div> <!-- /.modal-dialog --> </div> <!-- /.modal-dialog -->
</div> <!-- /.modal --> </div> <!-- /.modal -->
<button class="btn btn-sm btn-secondary" data-bs-toggle="modal" data-bs-target="#Clone{{ forloop.counter }}" title="{% trans "Clone" %}"><i class="fa fa-files-o"></i></button> <button class="btn btn-sm btn-secondary" data-bs-toggle="modal" data-bs-target="#Clone{{ forloop.counter }}" title="{% trans "Clone" %}">{% bs_icon 'files' %} </button>
</td> </td>
<td> <td>
<form action="" method="post" role="form" aria-label="Delete NWFilter form">{% csrf_token %} <form action="" method="post" role="form" aria-label="Delete NWFilter form">{% csrf_token %}
<input type="hidden" name="nwfiltername" value="{{ nwfilter.name }}"> <input type="hidden" name="nwfiltername" value="{{ nwfilter.name }}">
<button type="submit" class="btn btn-sm btn-secondary" name="del_nwfilter" title="{% trans "Delete" %}" onclick="return confirm('{% trans "Are you sure?" %}')"> <button type="submit" class="btn btn-sm btn-secondary" name="del_nwfilter" title="{% trans "Delete" %}" onclick="return confirm('{% trans "Are you sure?" %}')">
<i class="fa fa-trash"></i> {% bs_icon 'trash' %}
</button> </button>
</form> </form>
</td> </td>
@ -129,7 +130,7 @@
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<div class="alert alert-warning shadow-sm"> <div class="alert alert-warning shadow-sm">
<i class="fa fa-exclamation-triangle"></i> <strong>{% trans "Warning" %}:</strong> {% trans "Hypervisor doesn't have any NWFilters" %} {% bs_icon 'exclamation-triangle' %} <strong>{% trans "Warning" %}:</strong> {% trans "Hypervisor doesn't have any NWFilters" %}
</div> </div>
</div> </div>
</div> </div>

5
static/css/bootstrap-icons.min.css vendored Executable file

File diff suppressed because one or more lines are too long

BIN
static/fonts/bootstrap-icons.woff Executable file

Binary file not shown.

Binary file not shown.

View file

@ -1,7 +1,8 @@
{% load i18n %} {% load i18n %}
{% load bootstrap_icons %}
{% if request.user.is_superuser %} {% if request.user.is_superuser %}
<a href="#AddStgPool" type="button" class="btn btn-success float-end" data-bs-toggle="modal"> <a href="#AddStgPool" type="button" class="btn btn-success float-end" data-bs-toggle="modal">
<span class="fa fa-plus" aria-hidden="true"></span> <span aria-hidden="true">{% bs_icon 'plus' %} </span>
</a> </a>
<!-- Modal Storage pool --> <!-- Modal Storage pool -->

View file

@ -1,10 +1,11 @@
{% load i18n %} {% load i18n %}
{% load django_bootstrap5 %} {% load django_bootstrap5 %}
{% load bootstrap_icons %}
{% if request.user.is_superuser %} {% if request.user.is_superuser %}
{% if state != 0 %} {% if state != 0 %}
{% if pool == "iso" %} {% if pool == "iso" %}
<a href="#IsoUpload" class="btn btn-success float-end" data-bs-toggle="modal"> <a href="#IsoUpload" class="btn btn-success float-end" data-bs-toggle="modal">
<span class="fa fa-plus" aria-hidden="true"></span> <span aria-hidden="true">{% bs_icon 'plus' %} </span>
</a> </a>
<!-- Modal Upload --> <!-- Modal Upload -->
@ -35,7 +36,7 @@
</div> <!-- /.modal --> </div> <!-- /.modal -->
{% else %} {% else %}
<a href="#AddImage" class="btn btn-success float-end" data-bs-toggle="modal"> <a href="#AddImage" class="btn btn-success float-end" data-bs-toggle="modal">
<span class="fa fa-plus" aria-hidden="true"></span> <span aria-hidden="true">{% bs_icon 'plus' %} </span>
</a> </a>
<!-- Modal Image --> <!-- Modal Image -->

View file

@ -1,6 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %} {% load i18n %}
{% load static %} {% load static %}
{% load bootstrap_icons %}
{% block title %}{{ compute }} - {% trans "Storage" %}: {{ pool }}{% endblock %} {% block title %}{{ compute }} - {% trans "Storage" %}: {{ pool }}{% endblock %}
{% block style %} {% block style %}
<link rel="stylesheet" href="{% static "css/sortable-theme-bootstrap.css" %}"/> <link rel="stylesheet" href="{% static "css/sortable-theme-bootstrap.css" %}"/>
@ -17,25 +18,25 @@
<ol class="breadcrumb shadow-sm"> <ol class="breadcrumb shadow-sm">
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'overview' compute.id %}"><i class="fa fa-dashboard"></i> {% trans "Overview" %}</a> <a href="{% url 'overview' compute.id %}">{% bs_icon 'laptop' %} {% trans "Overview" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'instances' compute.id %}"><i class="fa fa-server"></i> {% trans "Instances" %}</a> <a href="{% url 'instances' compute.id %}">{% bs_icon 'server' %} {% trans "Instances" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'storages' compute.id %}"><i class="fa fa-hdd-o"></i> {% trans "Storages" %}</a> <a href="{% url 'storages' compute.id %}">{% bs_icon 'device-hdd' %} {% trans "Storages" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'networks' compute.id %}"><i class="fa fa-sitemap"></i> {% trans "Networks" %}</a> <a href="{% url 'networks' compute.id %}">{% bs_icon 'hdd-network' %} {% trans "Networks" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'interfaces' compute.id %}"><i class="fa fa-wifi"></i> {% trans "Interfaces" %}</a> <a href="{% url 'interfaces' compute.id %}">{% bs_icon 'wifi' %} {% trans "Interfaces" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'nwfilters' compute.id %}"><i class="fa fa-filter"></i> {% trans "NWFilters" %}</a> <a href="{% url 'nwfilters' compute.id %}">{% bs_icon 'filter' %} {% trans "NWFilters" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'virtsecrets' compute.id %}"><i class="fa fa-key"></i> {% trans "Secrets" %}</a> <a href="{% url 'virtsecrets' compute.id %}">{% bs_icon 'key' %} {% trans "Secrets" %}</a>
</li> </li>
</ol> </ol>
</div> </div>
@ -161,11 +162,11 @@
</div> <!-- /.modal --> </div> <!-- /.modal -->
{% ifnotequal volume.type "iso" %} {% ifnotequal volume.type "iso" %}
<button class="btn btn-sm btn-secondary" data-bs-toggle="modal" data-bs-target="#Clone{{ forloop.counter }}" title="{% trans "Clone" %}"> <button class="btn btn-sm btn-secondary" data-bs-toggle="modal" data-bs-target="#Clone{{ forloop.counter }}" title="{% trans "Clone" %}">
<i class="fa fa-files-o"></i> {% bs_icon 'files' %}
</button> </button>
{% else %} {% else %}
<button class="btn btn-sm btn-secondary disabled"> <button class="btn btn-sm btn-secondary disabled">
<i class="fa fa-files-o"></i> {% bs_icon 'files' %}
</button> </button>
{% endifnotequal %} {% endifnotequal %}
</td> </td>
@ -173,7 +174,7 @@
<form action="" method="post" role="form" aria-label="Delete volume form">{% csrf_token %} <form action="" method="post" role="form" aria-label="Delete volume form">{% csrf_token %}
<input type="hidden" name="volname" value="{{ volume.name }}"> <input type="hidden" name="volname" value="{{ volume.name }}">
<button type="submit" class="btn btn-sm btn-secondary" name="del_volume" title="{% trans "Delete" %}" onclick="return confirm('{% trans "Are you sure?" %}')"> <button type="submit" class="btn btn-sm btn-secondary" name="del_volume" title="{% trans "Delete" %}" onclick="return confirm('{% trans "Are you sure?" %}')">
<i class="fa fa-trash"></i> {% bs_icon 'trash' %}
</button> </button>
</form> </form>
</td> </td>
@ -184,7 +185,7 @@
{% else %} {% else %}
<div class="col-lg-12"> <div class="col-lg-12">
<div class="alert alert-warning shadow-sm"> <div class="alert alert-warning shadow-sm">
<i class="fa fa-exclamation-triangle"></i> <strong>{% trans "Warning" %}:</strong> {% trans "Hypervisor doesn't have any Volumes" %} {% bs_icon 'exclamation-triangle' %} <strong>{% trans "Warning" %}:</strong> {% trans "Hypervisor doesn't have any Volumes" %}
</div> </div>
</div> </div>
{% endif %} {% endif %}

View file

@ -1,5 +1,6 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %} {% load i18n %}
{% load bootstrap_icons %}
{% block title %}{% trans "Storages" %} - {{ compute.name }}{% endblock %} {% block title %}{% trans "Storages" %} - {{ compute.name }}{% endblock %}
@ -13,25 +14,25 @@
<nav aria-label="breadcrumb"> <nav aria-label="breadcrumb">
<ol class="breadcrumb shadow-sm"> <ol class="breadcrumb shadow-sm">
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'overview' compute.id %}"><i class="fa fa-dashboard"></i> {% trans "Overview" %}</a> <a href="{% url 'overview' compute.id %}">{% bs_icon 'laptop' %} {% trans "Overview" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'instances' compute.id %}"><i class="fa fa-server"></i> {% trans "Instances" %}</a> <a href="{% url 'instances' compute.id %}">{% bs_icon 'server' %} {% trans "Instances" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<span class="fw-bold"><i class="fa fa-hdd-o"></i> {% trans "Storages" %}</span> <span class="fw-bold">{% bs_icon 'device-hdd' %} {% trans "Storages" %}</span>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'networks' compute.id %}"><i class="fa fa-sitemap"></i> {% trans "Networks" %}</a> <a href="{% url 'networks' compute.id %}">{% bs_icon 'hdd-network' %} {% trans "Networks" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'interfaces' compute.id %}"><i class="fa fa-wifi"></i> {% trans "Interfaces" %}</a> <a href="{% url 'interfaces' compute.id %}">{% bs_icon 'wifi' %} {% trans "Interfaces" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'nwfilters' compute.id %}"><i class="fa fa-filter"></i> {% trans "NWFilters" %}</a> <a href="{% url 'nwfilters' compute.id %}">{% bs_icon 'filter' %} {% trans "NWFilters" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'virtsecrets' compute.id %}"><i class="fa fa-key"></i> {% trans "Secrets" %}</a> <a href="{% url 'virtsecrets' compute.id %}">{% bs_icon 'key' %} {% trans "Secrets" %}</a>
</li> </li>
</ol> </ol>
</nav> </nav>
@ -42,7 +43,7 @@
{% if not storages %} {% if not storages %}
<div class="col-lg-12"> <div class="col-lg-12">
<div class="alert alert-warning shadow-sm"> <div class="alert alert-warning shadow-sm">
<i class="fa fa-exclamation-triangle"></i> <strong>{% trans "Warning" %}:</strong> {% trans "Hypervisor doesn't have any Storages" %} {% bs_icon 'exclamation-triangle' %} <strong>{% trans "Warning" %}:</strong> {% trans "Hypervisor doesn't have any Storages" %}
</div> </div>
</div> </div>
{% else %} {% else %}

View file

@ -22,6 +22,7 @@
<!-- Custom Fonts --> <!-- Custom Fonts -->
<link href="{% static "css/font-awesome.min.css" %}" rel="stylesheet" type="text/css"> <link href="{% static "css/font-awesome.min.css" %}" rel="stylesheet" type="text/css">
<link href="{% static "css/bootstrap-icons.min.css" %}" rel="stylesheet" type="text/css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->

View file

@ -1,6 +1,6 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load django_bootstrap5 %} {% load django_bootstrap5 %}
{% load icons %} {% load bootstrap_icons %}
{% load i18n %} {% load i18n %}
{% block title %}{{ title }}{% endblock %} {% block title %}{{ title }}{% endblock %}
@ -16,9 +16,9 @@
{%trans "Are you sure you want to delete" %} "{{ object }}"? {%trans "Are you sure you want to delete" %} "{{ object }}"?
</div> </div>
<div class="mb-0 float-end"> <div class="mb-0 float-end">
<a class="btn btn-primary" href="javascript:history.back()">{% icon 'times' %} {% trans "Cancel" %}</a> <a class="btn btn-primary" href="javascript:history.back()">{% bs_icon 'x' %} {% trans "Cancel" %}</a>
<button type="submit" class="btn btn-danger"> <button type="submit" class="btn btn-danger">
{% icon 'trash' %} {% trans "Delete" %} {% bs_icon 'trash' %} {% trans "Delete" %}
</button> </button>
</div> </div>
</form> </form>

View file

@ -1,6 +1,6 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load django_bootstrap5 %} {% load django_bootstrap5 %}
{% load icons %} {% load bootstrap_icons %}
{% load i18n %} {% load i18n %}
{% block title %}{{ title }}{% endblock %} {% block title %}{{ title }}{% endblock %}
@ -17,9 +17,9 @@
</div> </div>
<div class="card-footer"> <div class="card-footer">
<div class="mb-0 float-end"> <div class="mb-0 float-end">
<a class="btn btn-primary" href="javascript:history.back()">{% icon 'times' %} {% trans "Cancel" %}</a> <a class="btn btn-primary" href="javascript:history.back()">{% bs_icon 'x' %} {% trans "Cancel" %}</a>
<button type="submit" form="create-update" class="btn btn-success"> <button type="submit" form="create-update" class="btn btn-success">
{% icon 'check' %} {% trans "Save" %} {% bs_icon 'check2' %} {% trans "Save" %}
</button> </button>
</div> </div>
</div> </div>

View file

@ -1,5 +1,5 @@
{% load i18n %} {% load i18n %}
{% load icons %} {% load bootstrap_icons %}
{% load common_tags %} {% load common_tags %}
<!-- Fixed navbar --> <!-- Fixed navbar -->
<nav class="navbar sticky-top navbar-expand-md navbar-dark bg-primary mb-3" aria-label="Main top navbar"> <nav class="navbar sticky-top navbar-expand-md navbar-dark bg-primary mb-3" aria-label="Main top navbar">
@ -11,11 +11,11 @@
<div class="collapse navbar-collapse" id="navbar"> <div class="collapse navbar-collapse" id="navbar">
<ul class="navbar-nav"> <ul class="navbar-nav">
<li class="nav-item {% class_active request '^/instances' %}"> <li class="nav-item {% class_active request '^/instances' %}">
<a class="nav-link" href="{% url 'instances:index' %}"><i class="fa fa-fw fa-desktop"></i> {% trans "Instances" %}</a> <a class="nav-link" href="{% url 'instances:index' %}">{% bs_icon 'laptop' %} {% trans "Instances" %}</a>
</li> </li>
{% if request.user.is_superuser %} {% if request.user.is_superuser %}
<li class="nav-item {% class_active request '^/computes' %}"> <li class="nav-item {% class_active request '^/computes' %}">
<a class="nav-link" href="{% url 'computes' %}"><i class="fa fa-fw fa-server"></i> {% trans "Computes" %}</a> <a class="nav-link" href="{% url 'computes' %}">{% bs_icon 'server' %} {% trans "Computes" %}</a>
</li> </li>
{% endif %} {% endif %}
</ul> </ul>
@ -23,28 +23,28 @@
{% if request.user.is_superuser %} {% if request.user.is_superuser %}
<li class="nav-item dropdown {% app_active request 'admin' %}"> <li class="nav-item dropdown {% app_active request 'admin' %}">
<a class="nav-link" id="administration" href="#" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <a class="nav-link" id="administration" href="#" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{% icon 'wrench' %} {% bs_icon 'wrench' %}
</a> </a>
<div class="dropdown-menu" aria-labelledby="administration"> <div class="dropdown-menu" aria-labelledby="administration">
<a class="dropdown-item {% view_active request 'admin:user_list' %}" href="{% url 'admin:user_list' %}">{% icon 'user-plus' %} {% trans "Users" %}</a> <a class="dropdown-item {% view_active request 'admin:user_list' %}" href="{% url 'admin:user_list' %}">{% bs_icon 'person-plus' %} {% trans "Users" %}</a>
<a class="dropdown-item {% view_active request 'admin:group_list' %}" href="{% url 'admin:group_list' %}">{% icon 'users' %} {% trans "Groups" %}</a> <a class="dropdown-item {% view_active request 'admin:group_list' %}" href="{% url 'admin:group_list' %}">{% bs_icon 'people-fill' %} {% trans "Groups" %}</a>
<a class="dropdown-item {% view_active request 'admin:logs' %}" href="{% url 'admin:logs' %}">{% icon 'list-alt' %} {% trans "Logs" %}</a> <a class="dropdown-item {% view_active request 'admin:logs' %}" href="{% url 'admin:logs' %}">{% bs_icon 'card-list' %} {% trans "Logs" %}</a>
<a class="dropdown-item {% view_active request 'appsettings' %}" href="{% url 'appsettings' %}">{% icon 'cogs' %} {% trans "Settings" %}</i></a> <a class="dropdown-item {% view_active request 'appsettings' %}" href="{% url 'appsettings' %}">{% bs_icon 'gear-wide-connected' %} {% trans "Settings" %}</i></a>
</div> </div>
</li> </li>
{% endif %} {% endif %}
<li class="nav-item dropdown {% class_active request '^/accounts' %}"> <li class="nav-item dropdown {% class_active request '^/accounts' %}">
<a class="nav-link dropdown-toggle" href="#" id="navbarUserDropdown" data-bs-toggle="dropdown" role="button" aria-expanded="false"> <a class="nav-link dropdown-toggle" href="#" id="navbarUserDropdown" data-bs-toggle="dropdown" role="button" aria-expanded="false">
<i class="fa fa-fw fa-user"></i> {{ request.user.username }} {% bs_icon 'person' %} {{ request.user.username }}
</a> </a>
<div class="dropdown-menu" aria-labelledby="navbarUserDropdown"> <div class="dropdown-menu" aria-labelledby="navbarUserDropdown">
{% get_current_language as LANGUAGE_CODE %} {% get_current_language as LANGUAGE_CODE %}
<a class="dropdown-item disabled" href="#"> <a class="dropdown-item disabled" href="#">
{% trans "Language" %}: <span class="badge bg-secondary">{{ LANGUAGE_CODE }}</span> {% trans "Language" %}: <span class="badge bg-secondary">{{ LANGUAGE_CODE }}</span>
</a> </a>
<a class="dropdown-item {% view_active request 'accounts:profile' %}" href="{% url 'accounts:profile' %}">{% icon 'vcard' %} {% trans "Profile" %}</a> <a class="dropdown-item {% view_active request 'accounts:profile' %}" href="{% url 'accounts:profile' %}">{% bs_icon 'person-vcard' %} {% trans "Profile" %}</a>
<div class="dropdown-divider"></div> <div class="dropdown-divider"></div>
<a class="dropdown-item" href="{% url 'accounts:logout' %}"><i class="fa fa-fw fa-power-off"></i> {% trans "Log Out" %}</a> <a class="dropdown-item" href="{% url 'accounts:logout' %}">{% bs_icon 'power' %} {% trans "Log Out" %}</a>
</div> </div>
</li> </li>
</ul> </ul>

View file

@ -1,7 +1,8 @@
{% load i18n %} {% load i18n %}
{% load bootstrap_icons %}
{% if request.user.is_superuser %} {% if request.user.is_superuser %}
<a href="#AddSecret" type="button" class="btn btn-success float-end" data-bs-toggle="modal"> <a href="#AddSecret" type="button" class="btn btn-success float-end" data-bs-toggle="modal">
<span class="fa fa-plus" aria-hidden="true"></span> <span aria-hidden="true">{% bs_icon 'plus' %} </span>
</a> </a>
<!-- Modal Secret --> <!-- Modal Secret -->

View file

@ -1,6 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %} {% load i18n %}
{% load static %} {% load static %}
{% load bootstrap_icons %}
{% block title %}{% trans "Secrets" %} - {{ compute.name }}{% endblock %} {% block title %}{% trans "Secrets" %} - {{ compute.name }}{% endblock %}
{% block style %} {% block style %}
@ -19,25 +20,25 @@
<nav aria-label="breadcrumb"> <nav aria-label="breadcrumb">
<ol class="breadcrumb shadow-sm"> <ol class="breadcrumb shadow-sm">
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'overview' compute.id %}"><i class="fa fa-dashboard"></i> {% trans "Overview" %}</a> <a href="{% url 'overview' compute.id %}">{% bs_icon 'laptop' %} {% trans "Overview" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'instances' compute.id %}"><i class="fa fa-server"></i> {% trans "Instances" %}</a> <a href="{% url 'instances' compute.id %}">{% bs_icon 'server' %} {% trans "Instances" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'storages' compute.id %}"><i class="fa fa-hdd-o"></i> {% trans "Storages" %}</a> <a href="{% url 'storages' compute.id %}">{% bs_icon 'device-hdd' %} {% trans "Storages" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'networks' compute.id %}"><i class="fa fa-sitemap"></i> {% trans "Networks" %}</a> <a href="{% url 'networks' compute.id %}">{% bs_icon 'hdd-network' %} {% trans "Networks" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'interfaces' compute.id %}"><i class="fa fa-wifi"></i> {% trans "Interfaces" %}</a> <a href="{% url 'interfaces' compute.id %}">{% bs_icon 'wifi' %} {% trans "Interfaces" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{% url 'nwfilters' compute.id %}"><i class="fa fa-filter"></i> {% trans "NWFilters" %}</a> <a href="{% url 'nwfilters' compute.id %}">{% bs_icon 'filter' %} {% trans "NWFilters" %}</a>
</li> </li>
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<span class="fw-bold"><i class="fa fa-key"></i> {% trans "Secrets" %}</span> <span class="fw-bold">{% bs_icon 'key' %} {% trans "Secrets" %}</span>
</li> </li>
</ol> </ol>
</nav> </nav>
@ -48,7 +49,7 @@
{% if not secrets_all %} {% if not secrets_all %}
<div class="col-lg-12"> <div class="col-lg-12">
<div class="alert alert-warning shadow-sm"> <div class="alert alert-warning shadow-sm">
<i class="fa fa-exclamation-triangle"></i> <strong>{% trans "Warning" %}:</strong> {% trans "Hypervisor doesn't have any Secrets" %} {% bs_icon 'exclamation-triangle' %} <strong>{% trans "Warning" %}:</strong> {% trans "Hypervisor doesn't have any Secrets" %}
</div> </div>
</div> </div>
{% else %} {% else %}
@ -73,10 +74,10 @@
<form action="" method="post" role="form" aria-label="Delete secret form">{% csrf_token %} <form action="" method="post" role="form" aria-label="Delete secret form">{% csrf_token %}
<input type="hidden" name="uuid" value="{{ secret.uuid }}"/> <input type="hidden" name="uuid" value="{{ secret.uuid }}"/>
<a data-bs-toggle="modal" href="#editSecret{{ secret.uuid }}" class="btn btn-sm btn-primary" title="{% trans "Edit" %}"> <a data-bs-toggle="modal" href="#editSecret{{ secret.uuid }}" class="btn btn-sm btn-primary" title="{% trans "Edit" %}">
<span class="fa fa-pencil"></span> <span>{% bs_icon 'pencil' %} </span>
</a> </a>
<button type="submit" class="btn btn-sm btn-danger" name="delete" title="{% trans "Delete" %}" onclick="return confirm('{% trans "Are you sure?" %}')"> <button type="submit" class="btn btn-sm btn-danger" name="delete" title="{% trans "Delete" %}" onclick="return confirm('{% trans "Are you sure?" %}')">
<span class="fa fa-trash"></span> <span>{% bs_icon 'trash' %} </span>
</button> </button>
</form> </form>

View file

@ -23,7 +23,6 @@ INSTALLED_APPS = [
"django.contrib.messages", "django.contrib.messages",
"django.contrib.staticfiles", "django.contrib.staticfiles",
"django_bootstrap5", "django_bootstrap5",
"django_icons",
"django_otp", "django_otp",
"django_otp.plugins.otp_totp", "django_otp.plugins.otp_totp",
"drf_yasg", "drf_yasg",
@ -42,6 +41,7 @@ INSTALLED_APPS = [
"logs", "logs",
"qr_code", "qr_code",
"rest_framework", "rest_framework",
"django_bootstrap_icons",
] ]
MIDDLEWARE = [ MIDDLEWARE = [
@ -87,20 +87,6 @@ TEMPLATES = [
WSGI_APPLICATION = "webvirtcloud.wsgi.application" WSGI_APPLICATION = "webvirtcloud.wsgi.application"
# Settings for django-icons
DJANGO_ICONS = {
'DEFAULTS': {
'renderer': 'fontawesome4',
},
'RENDERERS': {
'fontawesome4': 'FontAwesome4Renderer',
'bootstrap3': 'Bootstrap3Renderer',
},
}
# Database # Database
# https://docs.djangoproject.com/en/3.0/ref/settings/#databases # https://docs.djangoproject.com/en/3.0/ref/settings/#databases
@ -169,17 +155,31 @@ DJANGO_ICONS = {
LOGGING = { LOGGING = {
"version": 1, 'version': 1,
"disable_existing_loggers": False, 'disable_existing_loggers': False,
"handlers": { 'formatters': {
"mail_admins": {"level": "ERROR", "class": "django.utils.log.AdminEmailHandler"} 'standard': {
'format': '[%(asctime)s] %(levelname)s: %(message)s'
},
},
'handlers': {
'mail_admins': {
'level': 'ERROR',
'class': 'django.utils.log.AdminEmailHandler'
},
'default': {
'level':'INFO',
'class':'logging.handlers.RotatingFileHandler',
'filename': '/srv/webvirtcloud/webvirtcloud.log',
'formatter':'standard',
},
},
'loggers': {
'': {
'handlers': ['default'],
'level': 'INFO',
'propagate': True
}, },
"loggers": {
"django.request": {
"handlers": ["mail_admins"],
"level": "ERROR",
"propagate": True,
}
}, },
} }