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:
parent
07d7a6d752
commit
1cbdf76df6
59 changed files with 344 additions and 291 deletions
|
@ -1,7 +1,7 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load icons %}
|
||||
{% load bootstrap_icons %}
|
||||
{% load qr_code %}
|
||||
|
||||
{% block title %}{% trans "User Profile" %} - {{ user }}{% endblock %}
|
||||
|
@ -10,14 +10,14 @@
|
|||
{% block page_heading_extra %}
|
||||
{% if otp_enabled %}
|
||||
<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>
|
||||
{% endif %}
|
||||
<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 href="{% url 'accounts:user_instance_create' user.id %}" class="btn btn-success" title="{% trans "Create user instance" %}">
|
||||
{% icon 'plus' %}
|
||||
{% bs_icon 'plus' %}
|
||||
</a>
|
||||
{% endblock page_heading_extra %}
|
||||
|
||||
|
@ -58,12 +58,12 @@
|
|||
<td>{{ inst.is_delete }}</td>
|
||||
<td style="width:5px;">
|
||||
<a href="{% url 'accounts:user_instance_update' inst.id %}" class="btn btn-sm btn-secondary" title="{% trans "edit" %}">
|
||||
{% icon 'pencil' %}
|
||||
{% bs_icon 'pencil' %}
|
||||
</a>
|
||||
</td>
|
||||
<td style="width:5px;">
|
||||
<a class="btn btn-sm btn-secondary" href="{% url 'accounts:user_instance_delete' inst.id %}" title="{% trans "Delete" %}">
|
||||
{% icon 'trash' %}
|
||||
{% bs_icon 'trash' %}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
{% load django_bootstrap5 %}
|
||||
{% load i18n %}
|
||||
{% load icons %}
|
||||
{% load bootstrap_icons %}
|
||||
|
||||
{% block title %}{%trans "Change Password" %}{% endblock title %}
|
||||
|
||||
|
@ -21,10 +21,10 @@
|
|||
</div>
|
||||
<div class="card-footer">
|
||||
<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>
|
||||
<button type="submit" form="password-change" class="btn btn-success">
|
||||
{% icon 'check' %} {% trans "Change" %}
|
||||
{% bs_icon 'check2' %} {% trans "Change" %}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% extends "base.html" %}
|
||||
{% load django_bootstrap5 %}
|
||||
{% load icons %}
|
||||
{% load bootstrap_icons %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{{ title }}{% endblock %}
|
||||
|
@ -22,9 +22,9 @@
|
|||
</div>
|
||||
<div class="card-footer">
|
||||
<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">
|
||||
{% icon 'envelope-o' %} {% trans "Send" %}
|
||||
{% bs_icon 'envelope-open' %} {% trans "Send" %}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% load django_bootstrap5 %}
|
||||
{% load icons %}
|
||||
{% load bootstrap_icons %}
|
||||
{% load tags_fingerprint %}
|
||||
|
||||
{% block title %}{% trans "Profile" %}: {{ request.user.first_name }} {{ request.user.last_name}}{% endblock %}
|
||||
|
@ -30,12 +30,12 @@
|
|||
{% bootstrap_form profile_form layout='horizontal' %}
|
||||
{% if perms.accounts.change_password %}
|
||||
<a href="{% url 'accounts:change_password' %}" class="btn btn-primary">
|
||||
{% icon 'lock' %} {% trans "Change Password" %}
|
||||
{% bs_icon 'lock' %} {% trans "Change Password" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
<div class="mb-0 float-end">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{% icon 'pencil' %} {% trans "Update" %}
|
||||
{% bs_icon 'pencil' %} {% trans "Update" %}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -53,7 +53,7 @@
|
|||
<td>{{ key.keyname }} ({% ssh_to_fingerprint key.keypublic %})</td>
|
||||
<td>
|
||||
<a href="{% url 'accounts:ssh_key_delete' key.id %}" title="{% trans "Delete" %}" class="btn btn-sm btn-secondary">
|
||||
{% icon 'trash' %}
|
||||
{% bs_icon 'trash' %}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -73,7 +73,7 @@
|
|||
{% bootstrap_form ssh_key_form layout='horizontal' %}
|
||||
<div class="mb-0 float-end">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{% icon 'plus' %} {% trans "Add" %}
|
||||
{% bs_icon 'plus' %} {% trans "Add" %}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
@ -4,6 +4,7 @@ from django.urls import path
|
|||
from django_otp.forms import OTPAuthenticationForm
|
||||
|
||||
from . import views
|
||||
from .views import CustomLoginView
|
||||
|
||||
app_name = "accounts"
|
||||
|
||||
|
@ -50,5 +51,5 @@ if settings.OTP_ENABLED:
|
|||
]
|
||||
else:
|
||||
urlpatterns += (
|
||||
path("login/", LoginView.as_view(template_name="login.html"), name="login"),
|
||||
path("login/", CustomLoginView.as_view(template_name="login.html"), name="login"),
|
||||
)
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
from admin.decorators import superuser_only
|
||||
from django.conf import settings
|
||||
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.forms import PasswordChangeForm
|
||||
from django.shortcuts import get_object_or_404, redirect, render
|
||||
from django.urls import reverse
|
||||
from django.http import HttpResponseRedirect
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from instances.models import Instance
|
||||
|
||||
|
@ -14,7 +15,20 @@ from accounts.models import *
|
|||
|
||||
from . import forms
|
||||
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):
|
||||
publickeys = UserSSHKey.objects.filter(user_id=request.user.id)
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
{% load icons %}
|
||||
{% load bootstrap_icons %}
|
||||
{% block title %}{% trans "Users" %}{% endblock %}
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<a href="{% url 'admin:group_create' %}" class="btn btn-success btn-header float-end">
|
||||
{% icon 'plus' %}
|
||||
{% bs_icon 'plus' %}
|
||||
</a>
|
||||
{% include 'search_block.html' %}
|
||||
<h1 class="page-header">{% trans "Groups" %}</h1>
|
||||
|
@ -17,7 +17,7 @@
|
|||
{% if not groups %}
|
||||
<div class="col-lg-12">
|
||||
<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>
|
||||
{% else %}
|
||||
|
@ -38,10 +38,10 @@
|
|||
<td>
|
||||
<div class="float-end btn-group">
|
||||
<a class="btn btn-primary" href="{% url 'admin:group_update' group.id %}" title="{%trans "Edit" %}">
|
||||
{% icon 'pencil' %}
|
||||
{% bs_icon 'pencil' %}
|
||||
</a>
|
||||
<a class="btn btn-danger" href="{% url 'admin:group_delete' group.id %}" title="{%trans "Delete" %}">
|
||||
{% icon 'times' %}
|
||||
{% bs_icon 'x' %}
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% load django_bootstrap5 %}
|
||||
{% load bootstrap_icons %}
|
||||
|
||||
{% block title %}{% trans "Logs" %}{% endblock %}
|
||||
|
||||
|
@ -18,7 +19,7 @@
|
|||
{% if not logs %}
|
||||
<div class="col-lg-12">
|
||||
<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>
|
||||
{% else %}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% extends "base.html" %}
|
||||
{% load django_bootstrap5 %}
|
||||
{% load icons %}
|
||||
{% load bootstrap_icons %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{{ title }}{% endblock %}
|
||||
|
@ -16,9 +16,9 @@
|
|||
{% bootstrap_form attributes_form layout='horizontal' %}
|
||||
</form>
|
||||
<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">
|
||||
{% icon 'check' %} {% trans "Save" %}
|
||||
{% bs_icon 'check2' %} {% trans "Save" %}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{% load i18n %}
|
||||
{% load static %}
|
||||
{% load common_tags %}
|
||||
{% load icons %}
|
||||
{% load bootstrap_icons %}
|
||||
|
||||
{% block title %}{{ title }}{% endblock %}
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
|||
|
||||
{% block page_heading_extra %}
|
||||
<a href="{% url 'admin:user_create' %}" class="btn btn-success btn-header float-end">
|
||||
{% icon 'plus' %}
|
||||
{% bs_icon 'plus' %}
|
||||
</a>
|
||||
{% include 'search_block.html' %}
|
||||
{% endblock page_heading_extra %}
|
||||
|
@ -20,7 +20,7 @@
|
|||
{% if not users %}
|
||||
<div class="col-lg-12">
|
||||
<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>
|
||||
{% else %}
|
||||
|
@ -50,19 +50,19 @@
|
|||
{% trans "Blocked" %}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{% if user.is_staff %}{% icon 'check' %}{% endif %}</td>
|
||||
<td>{% if user.is_superuser %}{% icon 'check' %}</span>{% endif %}</td>
|
||||
<td>{% if can_clone %}{% icon 'check' %}{% endif %}</td>
|
||||
<td>{% if user.is_staff %}{% bs_icon 'check' %}{% endif %}</td>
|
||||
<td>{% if user.is_superuser %}{% bs_icon 'check' %}</span>{% endif %}</td>
|
||||
<td>{% if can_clone %}{% bs_icon 'check' %}{% endif %}</td>
|
||||
<td>
|
||||
<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-primary" title="{%trans "Edit" %}" href="{% url 'admin:user_update' user.id %}">{% icon 'pencil' %}</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 %}">{% bs_icon 'pencil' %}</a>
|
||||
{% 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 %}
|
||||
<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 %}
|
||||
<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>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% extends "base.html" %}
|
||||
{% load django_bootstrap5 %}
|
||||
{% load icons %}
|
||||
{% load bootstrap_icons %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans "Add Compute" %}{% endblock %}
|
||||
|
@ -18,9 +18,9 @@
|
|||
{% bootstrap_form form layout='horizontal' %}
|
||||
</form>
|
||||
<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">
|
||||
{% icon 'check' %} {% trans "Save" %}
|
||||
{% bs_icon 'check' %} {% trans "Save" %}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
{% load icons %}
|
||||
{% load bootstrap_icons %}
|
||||
{% block title %}{% trans "Instances" %} - {{ compute.name }}{% endblock %}
|
||||
{% block style %}
|
||||
<link rel="stylesheet" href="{% static "css/sortable-theme-bootstrap.css" %}" />
|
||||
|
@ -11,7 +11,7 @@
|
|||
{% block page_heading_extra %}
|
||||
<a href="{% url 'instances:create_instance_select_type' compute.id %}"
|
||||
class="btn btn-success btn-header float-end">
|
||||
{% icon 'plus' %}
|
||||
{% bs_icon 'plus' %}
|
||||
</a>
|
||||
{% if instances %}
|
||||
{% include 'search_block.html' %}
|
||||
|
@ -24,25 +24,25 @@
|
|||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb shadow-sm">
|
||||
<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 class="breadcrumb-item">
|
||||
<span class="fw-bold">{% icon 'server' %} {% trans "Instances" %}</span>
|
||||
<span class="fw-bold">{% bs_icon 'server' %} {% trans "Instances" %}</span>
|
||||
</li>
|
||||
<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 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 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 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 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>
|
||||
</ol>
|
||||
</nav>
|
||||
|
@ -52,7 +52,7 @@
|
|||
<div class="col-lg-12">
|
||||
{% if not instances %}
|
||||
<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" %}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{% load i18n %}
|
||||
{% load static %}
|
||||
{% load common_tags %}
|
||||
{% load icons %}
|
||||
{% load bootstrap_icons %}
|
||||
{% block title %}{% trans "Computes" %}{% endblock %}
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
|
@ -16,7 +16,7 @@
|
|||
{% if not computes %}
|
||||
<div class="col-lg-12">
|
||||
<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>
|
||||
{% else %}
|
||||
|
@ -45,12 +45,12 @@
|
|||
<td class="col-sm-2">
|
||||
<div class="float-end btn-group">
|
||||
{% 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 %}
|
||||
<a class="btn btn-light" title="{%trans "Overview" %}">{% icon 'eye' %}</a>
|
||||
<a class="btn btn-light" title="{%trans "Overview" %}">{% bs_icon 'eye' %}</a>
|
||||
{% endif %}
|
||||
<a class="btn btn-primary" title="{%trans "Edit" %}" href="{% url 'compute_update' compute.id %}">{% icon 'pencil' %}</a>
|
||||
<a class="btn btn-danger" title="{%trans "Delete" %}" href="{% url 'compute_delete' compute.id %}">{% icon 'times' %}</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 %}">{% bs_icon 'x' %}</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
{% load i18n %}
|
||||
{% load django_bootstrap5 %}
|
||||
{% load icons %}
|
||||
{% load bootstrap_icons %}
|
||||
|
||||
<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_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_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>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
{% load icons %}
|
||||
{% load bootstrap_icons %}
|
||||
|
||||
{% block title %}{% trans "Overview" %} - {{ compute.name }}{% endblock %}
|
||||
|
||||
|
@ -12,25 +12,25 @@
|
|||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb shadow-sm">
|
||||
<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 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 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 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 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 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 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>
|
||||
</ol>
|
||||
</nav>
|
||||
|
@ -96,7 +96,7 @@
|
|||
<div class="my-3 card border-success">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">
|
||||
<i class="fa fa-long-arrow-right"></i>
|
||||
{% bs_icon 'arrow-right' %}
|
||||
{% trans "CPU Utilization" %}
|
||||
</h5>
|
||||
<canvas id="cpuChart" width="735" height="160"></canvas>
|
||||
|
@ -106,7 +106,7 @@
|
|||
<div class="my-3 card border-primary">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title ">
|
||||
<i class="fa fa-long-arrow-right"></i> {% trans "RAM Utilization" %}
|
||||
{% bs_icon 'arrow-right'%} {% trans "RAM Utilization" %}
|
||||
</h5>
|
||||
<canvas id="memChart" width="735" height="160"></canvas>
|
||||
</div>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
Django==3.2.20
|
||||
django_bootstrap5==23.3
|
||||
django-bootstrap-icons==0.8.3
|
||||
django-login-required-middleware==0.9.0
|
||||
django-otp==1.2.2
|
||||
django-icons==23.3
|
||||
django-qr-code==3.1.1
|
||||
gunicorn==20.1.0
|
||||
libsass==0.22.0
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{% load i18n %}
|
||||
{% load bootstrap_icons %}
|
||||
{% if request.user.is_superuser %}
|
||||
<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>
|
||||
|
||||
<!-- Modal pool -->
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{% load i18n %}
|
||||
{% load bootstrap_icons %}
|
||||
{% if request.user.is_superuser %}
|
||||
<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>
|
||||
|
||||
<!-- Modal pool -->
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{% load i18n %}
|
||||
{% load bootstrap_icons %}
|
||||
{% if request.user.is_superuser %}
|
||||
<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>
|
||||
|
||||
<!-- Modal pool -->
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% load icons %}
|
||||
{% load static %}
|
||||
{% block title %}{% trans "Instances" %}{% endblock %}
|
||||
{% block style %}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% load i18n %}
|
||||
{% load icons %}
|
||||
{% load bootstrap_icons %}
|
||||
<table class="table table-hover sortable-theme-bootstrap" data-sortable>
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -20,7 +20,7 @@
|
|||
{% if compute.status is True and compute.instance_set.count > 0 %}
|
||||
<tr class="table-secondary fw-bold border-bottom border-dark">
|
||||
<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>
|
||||
<a class="link-dark" href="{% url 'overview' compute.id %}">{{ compute.name }}</a>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{% load i18n %}
|
||||
{% load bootstrap_icons %}
|
||||
<nav class="navbar navbar-expand-sm fixed-bottom navbar-light bg-light" aria-label="Instance bottom navbar">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="#">{% trans 'HOST' %}</a>
|
||||
|
@ -9,15 +10,15 @@
|
|||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<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 %}
|
||||
</a>
|
||||
</li>
|
||||
<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 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>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
{% load i18n %}
|
||||
{% load django_bootstrap5 %}
|
||||
{% load bootstrap_icons %}
|
||||
{% if request.user.is_superuser %}
|
||||
<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>
|
||||
|
||||
<!-- Modal Flavor -->
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{% load i18n %}
|
||||
{% load bootstrap_icons %}
|
||||
<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>
|
||||
|
||||
<!-- Modal pool -->
|
||||
|
@ -28,7 +29,7 @@
|
|||
<tbody>
|
||||
{% for compute in computes %}
|
||||
{% if compute.status is True %}
|
||||
<tr>
|
||||
<tr style="text-decoration: none">
|
||||
<td>{{ compute.name }}</td>
|
||||
<td>{{ compute.cpu_count }}</td>
|
||||
<td>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
{% load icons %}
|
||||
{% load bootstrap_icons %}
|
||||
{% block title %}{% trans "Create new instance" %}{% endblock %}
|
||||
|
||||
{% block style %}
|
||||
|
@ -37,7 +37,7 @@
|
|||
<ul class="nav nav-tabs" role="tablist" aria-label="Instance create method">
|
||||
<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()">
|
||||
<span class="fa fa-arrow-left"></span>
|
||||
<span>{% bs_icon 'arrow-left'%} </span>
|
||||
</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
|
@ -64,7 +64,7 @@
|
|||
{% if not flavors %}
|
||||
<div class="col-lg-12">
|
||||
<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>
|
||||
{% else %}
|
||||
|
@ -173,7 +173,7 @@
|
|||
<label class="col-sm-4 col-form-label">{% trans "Advanced" %}</label>
|
||||
<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">
|
||||
<span class="fa fa-caret-down"></span>
|
||||
<span>{% bs_icon 'caret-down'%} </span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -303,14 +303,14 @@
|
|||
</div>
|
||||
</div>
|
||||
<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>
|
||||
</td>
|
||||
<td style="width:5px;">
|
||||
<form action="{% url 'instances:flavor_delete' flavor.id %}" method="post" role="form" aria-label="Delete flavor form">
|
||||
{% csrf_token %}
|
||||
<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>
|
||||
</form>
|
||||
</td>
|
||||
|
@ -428,7 +428,7 @@
|
|||
<label class="col-sm-3 col-form-label">{% trans "Advanced" %}</label>
|
||||
<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">
|
||||
<span class="fa fa-caret-down"></span>
|
||||
<span>{% bs_icon 'caret-down'%} </span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -670,7 +670,7 @@
|
|||
<label class="col-sm-3 col-form-label">{% trans "Advanced" %}</label>
|
||||
<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">
|
||||
<span class="fa fa-caret-down"></span>
|
||||
<span>{% bs_icon 'caret-down'%} </span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -865,7 +865,7 @@
|
|||
'{% endfor %}' +
|
||||
'</select>' +
|
||||
' -> ' + 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;
|
||||
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 +')">' +
|
||||
' eth' + net_counter +
|
||||
' -> ' + 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);
|
||||
selected_list_html += li;
|
||||
net_counter++;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{% extends "base.html" %}
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap_icons %}
|
||||
|
||||
{% block title %}{% trans "Instance" %} - {{ instance.name }}{% endblock %}
|
||||
|
||||
|
@ -33,10 +34,10 @@
|
|||
{% else %}
|
||||
class="badge bg-danger"
|
||||
title="{% trans "Guest Agent Not Enabled & Not Connected" %}"
|
||||
{% endif %}><i class="fa fa-plug"></i></span>
|
||||
{% endif %}>{% bs_icon 'plug' %} </span>
|
||||
|
|
||||
{% 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 %}
|
||||
{% if instance.cur_vcpu %}
|
||||
|
@ -57,11 +58,11 @@
|
|||
{% endfor %}
|
||||
{% if instance.guest_agent_ready %}
|
||||
<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>
|
||||
{% endif %}
|
||||
<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>
|
||||
</div>
|
||||
{% if user_quota_msg %}
|
||||
|
@ -77,45 +78,45 @@
|
|||
<ul class="nav nav-pills nav-fill" id="navbtn" role="tablist" aria-label="Instance actions">
|
||||
<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">
|
||||
<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" %}
|
||||
</button>
|
||||
</li>
|
||||
<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">
|
||||
<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" %}
|
||||
</button>
|
||||
</li>
|
||||
<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">
|
||||
<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" %}
|
||||
</button>
|
||||
</li>
|
||||
{% if allow_admin_or_not_template and 'instances.snapshot_instances' in perms %}
|
||||
<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">
|
||||
<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" %}
|
||||
</button>
|
||||
</li>
|
||||
{% endif %}
|
||||
<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">
|
||||
<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" %}
|
||||
</button>
|
||||
</li>
|
||||
<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">
|
||||
<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" %}
|
||||
</button>
|
||||
</li>
|
||||
<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">
|
||||
<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" %}
|
||||
</button>
|
||||
</li>
|
||||
|
|
|
@ -1,45 +1,45 @@
|
|||
{% load i18n %}
|
||||
{% load icons %}
|
||||
{% load bootstrap_icons %}
|
||||
<form action="" method="post" role="form" aria-label="Shortcut instance action form">{% csrf_token %}
|
||||
{% if instance.proxy.instance.info.0 == 5 %}
|
||||
{% if instance.is_template %}
|
||||
<a href="{% url 'instances:instance' instance.id %}#clone" class="btn btn-sm btn-secondary" title="{% trans "Clone" %}">
|
||||
{% icon 'clone' %}
|
||||
{% bs_icon 'clone' %}
|
||||
</a>
|
||||
{% else %}
|
||||
<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>
|
||||
{% 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 "Power Off" %}">{% icon 'power-off' %}</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 "Suspend" %}">{% bs_icon 'pause' %}</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" %}">{% bs_icon 'repeat' %}</a>
|
||||
<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>
|
||||
{% endif %}
|
||||
{% if instance.proxy.instance.info.0 == 3 %}
|
||||
<a class="btn btn-sm btn-secondary" href="{% url 'instances:resume' instance.id %}" title="{% trans "Resume" %}">
|
||||
{% icon 'play' %}
|
||||
{% bs_icon 'play' %}
|
||||
</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" %}">
|
||||
{% icon '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>
|
||||
<span class="fa fa-eye"></span>
|
||||
<span>{% bs_icon 'eye'%} </span>
|
||||
</button>
|
||||
{% endif %}
|
||||
{% 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 %}"
|
||||
title="{% trans "Suspend" %}">{% 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:powercycle' instance.id %}">{% icon 'refresh' %}</a>
|
||||
title="{% trans "Suspend" %}">{% bs_icon 'pause' %}</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 %}">{% bs_icon 'repeat' %}</a>
|
||||
<button class="btn btn-sm btn-secondary" type="button" onclick='open_console("{{ instance.compute.id }}-{{ instance.get_uuid }}")'
|
||||
title="{% trans "Console" %}">
|
||||
<span class="fa fa-eye"></span>
|
||||
<span>{% bs_icon 'eye'%} </span>
|
||||
</button>
|
||||
{% endif %}
|
||||
</form>
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{% load i18n %}
|
||||
{% load bootstrap_icons %}
|
||||
{% 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" %}">
|
||||
<i class="fa fa-edit" aria-hidden="true"></i>
|
||||
{% bs_icon 'pencil-square' %}
|
||||
</button>
|
||||
|
||||
<!-- Modal pool -->
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% load i18n %}
|
||||
{% load django_bootstrap5 %}
|
||||
{% load icons %}
|
||||
{% load bootstrap_icons %}
|
||||
<div class="tab-pane" id="settings" role="tabpanel">
|
||||
<!-- Nav tabs -->
|
||||
<ul class="nav nav-tabs" role="tablist" aria-label="Instance settings">
|
||||
|
@ -8,7 +8,7 @@
|
|||
{% if instance.guest_agent_ready %}
|
||||
<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();">
|
||||
<span class="fa fa-info-circle"></span>
|
||||
<span>{% bs_icon 'info-circle' %} </span>
|
||||
</button>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
@ -134,10 +134,10 @@
|
|||
</div>
|
||||
<div>
|
||||
<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 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>
|
||||
|
@ -158,7 +158,7 @@
|
|||
type="submit" type="button"
|
||||
title="{% trans 'Add CD-ROM' %}"
|
||||
{% if instance.status != 5 %} disabled {% endif %}>
|
||||
<span class="fa fa-plus"></span>
|
||||
<span>{% bs_icon 'plus' %} </span>
|
||||
</button>
|
||||
</p>
|
||||
</form>
|
||||
|
@ -199,7 +199,7 @@
|
|||
{% endif %}
|
||||
{% 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)" %}">
|
||||
{% icon 'remove' %}
|
||||
{% bs_icon 'dash-circle' %}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
|
@ -274,7 +274,7 @@
|
|||
<strong>IO Mode:</strong> {{ disk.io }} <br/>
|
||||
<strong>Discard:</strong> {{ disk.discard }} <br/>
|
||||
<strong>Detect Zeroes:</strong> {{ disk.detect_zeroes }}">
|
||||
<span class="fa fa-info"></span>
|
||||
<span>{% bs_icon 'info' %} </span>
|
||||
</button>
|
||||
{{ disk.dev }}
|
||||
</td>
|
||||
|
@ -307,11 +307,11 @@
|
|||
<input type="hidden" name="name" value="{{ disk.image }}">
|
||||
{% 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?" %}')">
|
||||
{% icon 'eject' %}
|
||||
{% bs_icon 'eject' %}
|
||||
</button>
|
||||
{% 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!" %}')">
|
||||
{% icon 'eject' %}
|
||||
{% bs_icon 'eject' %}
|
||||
</button>
|
||||
{% endif %}
|
||||
</form>
|
||||
|
@ -323,11 +323,11 @@
|
|||
<input type="hidden" name="name" value="{{ disk.image }}">
|
||||
{% 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?" %}')">
|
||||
<i class="fa fa-trash"></i>
|
||||
{% bs_icon 'trash' %}
|
||||
</button>
|
||||
{% else %}
|
||||
<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>
|
||||
{% endif %}
|
||||
</form>
|
||||
|
@ -393,7 +393,7 @@
|
|||
title="{% trans "Edit NIC" %}"
|
||||
data-bs-target="#editInstanceNetwork{{ forloop.counter0 }}"
|
||||
data-bs-toggle="modal">
|
||||
<span class="fa fa-edit" aria-hidden="true"></span>
|
||||
<span aria-hidden="true">{% bs_icon 'pencil-square' %} </span>
|
||||
</button>
|
||||
|
||||
<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 %}
|
||||
<button class="btn btn-sm btn-danger" value="{{ network.mac }}" name="delete_network" title="{% trans "Delete Device" %}"
|
||||
onclick="return confirm('{% trans "Are you sure?" %}')">
|
||||
<i class="fa fa-trash"></i>
|
||||
{% bs_icon 'trash' %}
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
|
@ -547,7 +547,7 @@
|
|||
<button type="submit" class="btn btn-sm btn-primary"
|
||||
name="set_qos" data-bs-toggle="modal"
|
||||
title="{% trans "Edit QoS" %}" onclick="return confirm('{% trans "Are you sure?" %}')">
|
||||
<span class="fa fa-save"></span>
|
||||
<span>{% bs_icon 'save' %} </span>
|
||||
</button>
|
||||
</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"
|
||||
name="unset_qos"
|
||||
title="{% trans "Delete QoS" %}" onclick="return confirm('{% trans "Are you sure?" %}')">
|
||||
<i class="fa fa-trash"></i>
|
||||
{% bs_icon 'trash' %}
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
|
@ -694,7 +694,7 @@
|
|||
<td><a href="{% url 'accounts:account' userinstance.user.id %}">{{ userinstance.user }}</a></td>
|
||||
<td style="width:30px;">
|
||||
<a href="{% url 'accounts:user_instance_delete' userinstance.id %}?next={% url 'instances:instance' instance.id %}#users">
|
||||
{% icon 'trash' %}
|
||||
{% bs_icon 'trash' %}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% load i18n %}
|
||||
{% load icons %}
|
||||
{% load bootstrap_icons %}
|
||||
<div class="tab-pane" id="snapshots" role="tabpanel">
|
||||
<!-- Nav tabs -->
|
||||
<ul class="nav nav-tabs" role="tablist" aria-label="Instance snapshot menu">
|
||||
|
@ -90,12 +90,12 @@
|
|||
<input type="hidden" name="name" value="{{ snap.name }}">
|
||||
{% 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?')">
|
||||
<span class="fa fa-download"></span>
|
||||
<span>{% bs_icon 'download' %} </span>
|
||||
</button>
|
||||
{% else %}
|
||||
<button type="button" class="btn btn-sm btn-primary disabled"
|
||||
title="{% trans "To restore snapshots you need Power Off the instance." %}">
|
||||
<span class="fa fa-download"></span>
|
||||
<span>{% bs_icon 'download' %} </span>
|
||||
</button>
|
||||
{% endif %}
|
||||
</form>
|
||||
|
@ -104,7 +104,7 @@
|
|||
<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 }}">
|
||||
<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>
|
||||
</form>
|
||||
</td>
|
||||
|
@ -123,7 +123,7 @@
|
|||
<input type="hidden" name="date" value="{{ ext_snap.date }}">
|
||||
<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?')">
|
||||
<span class="fa fa-download"></span>
|
||||
<span>{% bs_icon 'download' %} </span>
|
||||
</button>
|
||||
</form>
|
||||
</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 %}
|
||||
<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?')">
|
||||
{% icon 'trash' %}
|
||||
{% bs_icon 'trash' %}
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{% load i18n %}
|
||||
{% load bootstrap_icons %}
|
||||
<div class="tab-pane" id="graphics" role="tabpanel" >
|
||||
<!-- Nav tabs -->
|
||||
<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 class="mb-1 card border-success">
|
||||
<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" %}
|
||||
</h5>
|
||||
</div>
|
||||
|
@ -32,7 +33,7 @@
|
|||
</div>
|
||||
<div class="mb-1 card border-danger">
|
||||
<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" %}
|
||||
</h5>
|
||||
</div>
|
||||
|
@ -47,7 +48,7 @@
|
|||
{% for net in instance.networks %}
|
||||
<div class="mb-1 card border-info">
|
||||
<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 }}
|
||||
</h5>
|
||||
</div>
|
||||
|
@ -63,7 +64,7 @@
|
|||
{% for disk in instance.disks %}
|
||||
<div class="mb-1 card border-warning">
|
||||
<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 }}
|
||||
</h5>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{% load i18n %}
|
||||
{% load bootstrap_icons %}
|
||||
{% if request.user.is_superuser %}
|
||||
<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>
|
||||
|
||||
<!-- Modal Secret -->
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap_icons %}
|
||||
|
||||
{% block title %}{% trans "Interface" %} - {{ iface }}{% endblock %}
|
||||
|
||||
|
@ -10,25 +11,25 @@
|
|||
<div class="col-lg-12">
|
||||
<ol class="breadcrumb shadow-sm">
|
||||
<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 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 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 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 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 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 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>
|
||||
</ol>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
{% load bootstrap_icons %}
|
||||
|
||||
{% block title %}{% trans "Interfaces" %} - {{ compute.name }}{% endblock %}
|
||||
|
||||
|
@ -16,25 +17,25 @@
|
|||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb shadow-sm">
|
||||
<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 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 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 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 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 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 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>
|
||||
</ol>
|
||||
</nav>
|
||||
|
@ -45,7 +46,7 @@
|
|||
{% if not ifaces_all %}
|
||||
<div class="col-lg-12">
|
||||
<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>
|
||||
{% else %}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import json
|
||||
import logging
|
||||
|
||||
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.save()
|
||||
logger = logging.getLogger("")
|
||||
logger.info(user + " " + host+ " " + instance+ " " + message)
|
||||
|
||||
|
||||
@superuser_only
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{% load i18n %}
|
||||
{% load bootstrap_icons %}
|
||||
{% 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">
|
||||
<span class="fa fa-barcode" aria-hidden="true"></span>
|
||||
<span aria-hidden="true">{% bs_icon 'qr-code' %} </span>
|
||||
</a>
|
||||
|
||||
<!-- Modal pool -->
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{% load i18n %}
|
||||
{% load bootstrap_icons %}
|
||||
{% if request.user.is_superuser %}
|
||||
<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>
|
||||
|
||||
<!-- Modal pool -->
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{% load i18n %}
|
||||
{% load bootstrap_icons %}
|
||||
{% if request.user.is_superuser %}
|
||||
<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>
|
||||
|
||||
<!-- Modal pool -->
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{% load i18n %}
|
||||
{% load bootstrap_icons %}
|
||||
{% if request.user.is_superuser %}
|
||||
<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>
|
||||
|
||||
<!-- Modal pool -->
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
{% load bootstrap_icons %}
|
||||
|
||||
{% block title %}{% trans "Network" %} - {{ pool }}{% endblock %}
|
||||
|
||||
|
@ -11,25 +12,25 @@
|
|||
<div class="col-lg-12">
|
||||
<ol class="breadcrumb shadow-sm">
|
||||
<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 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 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 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 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 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 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>
|
||||
</ol>
|
||||
|
||||
|
@ -68,7 +69,7 @@
|
|||
|
||||
<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">
|
||||
<span class="fa fa-chevron-down"></span>
|
||||
<span>{% bs_icon 'chevron-down' %} </span>
|
||||
{% trans 'XML' %}
|
||||
</button>
|
||||
<div class="collapse" id="collapseXML">
|
||||
|
@ -154,7 +155,7 @@
|
|||
|
||||
<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">
|
||||
<span class="fa fa-chevron-down"></span>
|
||||
<span>{% bs_icon 'chevron-down' %} </span>
|
||||
{% trans 'Show' %}
|
||||
</button>
|
||||
<div id="collapseipv4fix" class="collapse">
|
||||
|
@ -187,12 +188,12 @@
|
|||
<button type="submit" class="btn btn-sm btn-primary"
|
||||
name="modify_fixed_address"
|
||||
title="{% trans "Edit entry" %}" onclick="return confirm('{% trans "Are you sure?" %}')">
|
||||
<i class="fa fa-save"></i>
|
||||
{% bs_icon 'save' %}
|
||||
</button>
|
||||
<button type="submit" class="btn btn-sm btn-danger"
|
||||
name="delete_fixed_address"
|
||||
title="{% trans "Delete entry" %}" onclick="return confirm('{% trans "Are you sure?" %}')">
|
||||
<i class="fa fa-trash"></i>
|
||||
{% bs_icon 'trash' %}
|
||||
</button>
|
||||
</td>
|
||||
</form>
|
||||
|
@ -264,7 +265,7 @@
|
|||
{% if ipv6_fixed_address %}
|
||||
<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">
|
||||
<span class="fa fa-chevron-down"></span>
|
||||
<span>{% bs_icon 'chevron-down' %} </span>
|
||||
{% trans 'Show' %}
|
||||
</button>
|
||||
<div id="collapseipv6fix" class="collapse">
|
||||
|
@ -296,12 +297,12 @@
|
|||
<button type="submit" class="btn btn-sm btn-primary"
|
||||
name="modify_fixed_address"
|
||||
title="{% trans "Edit entry" %}" onclick="return confirm('{% trans "Are you sure?" %}')">
|
||||
<span class="fa fa-save"></span>
|
||||
<span>{% bs_icon 'save' %} </span>
|
||||
</button>
|
||||
<button type="submit" class="btn btn-sm btn-danger"
|
||||
name="delete_fixed_address"
|
||||
title="{% trans "Delete entry" %}" onclick="return confirm('{% trans "Are you sure?" %}')">
|
||||
<span class="fa fa-trash"></span>
|
||||
<span>{% bs_icon 'trash' %} </span>
|
||||
</button>
|
||||
</td>
|
||||
</form>
|
||||
|
@ -351,12 +352,12 @@
|
|||
<button type="submit" class="btn btn-sm btn-primary"
|
||||
name="set_qos" data-bs-toggle="modal"
|
||||
title="{% trans "Edit QoS" %}" onclick="return confirm('{% trans "Are you sure?" %}')">
|
||||
<i class="fa fa-save"></i>
|
||||
{% bs_icon 'save' %}
|
||||
</button>
|
||||
<button type="submit" class="btn btn-sm btn-danger"
|
||||
name="unset_qos"
|
||||
title="{% trans "Delete QoS" %}" onclick="return confirm('{% trans "Are you sure?" %}')">
|
||||
<i class="fa fa-trash"></i>
|
||||
{% bs_icon 'trash' %}
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap_icons %}
|
||||
|
||||
{% block title %}{% trans "Networks" %} - {{ compute.name }}{% endblock %}
|
||||
|
||||
|
@ -13,25 +14,25 @@
|
|||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb shadow-sm">
|
||||
<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 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 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 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 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 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 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>
|
||||
</ol>
|
||||
</nav>
|
||||
|
@ -42,7 +43,7 @@
|
|||
{% if not networks %}
|
||||
<div class="col-lg-12">
|
||||
<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>
|
||||
{% else %}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{% load i18n %}
|
||||
{% load bootstrap_icons %}
|
||||
{% if request.user.is_superuser %}
|
||||
<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>
|
||||
|
||||
<!-- Modal Secret -->
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{% load i18n %}
|
||||
{% load bootstrap_icons %}
|
||||
{% if request.user.is_superuser %}
|
||||
<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>
|
||||
|
||||
<!-- Modal Secret -->
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
{% load bootstrap_icons %}
|
||||
|
||||
{% block title %}{% trans "NWFilter" %}: {{ name }}{% endblock %}
|
||||
|
||||
|
@ -11,25 +12,25 @@
|
|||
<div class="col-lg-12">
|
||||
<ol class="breadcrumb shadow-sm">
|
||||
<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 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 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 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 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 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 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>
|
||||
</ol>
|
||||
</div>
|
||||
|
@ -45,7 +46,7 @@
|
|||
<div class="row">
|
||||
<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">
|
||||
<span class="fa fa-chevron-down"></span>
|
||||
<span>{% bs_icon 'chevron-down' %} </span>
|
||||
{% trans 'XML' %}
|
||||
</button>
|
||||
<div class="collapse" id="collapseXML">
|
||||
|
@ -76,7 +77,7 @@
|
|||
{% endfor %}
|
||||
</select>
|
||||
<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>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -101,7 +102,7 @@
|
|||
<form action="" method="post" role="form" aria-label="Delete NWFilter form">{% csrf_token %}
|
||||
<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?" %}');">
|
||||
<i class="fa fa-trash"></i>
|
||||
{% bs_icon 'trash' %}
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
|
@ -141,7 +142,7 @@
|
|||
<input type="hidden" name="direction" value="{{ rule.direction }}">
|
||||
<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?" %}');">
|
||||
<i class="fa fa-trash"></i>
|
||||
{% bs_icon 'trash' %}
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
{% load bootstrap_icons %}
|
||||
|
||||
{% block title %}{% trans "NWFilters" %} - {{ compute.name }}{% endblock %}
|
||||
|
||||
|
@ -17,25 +18,25 @@
|
|||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb shadow-sm">
|
||||
<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 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 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 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 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 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 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>
|
||||
</ol>
|
||||
</nav>
|
||||
|
@ -81,7 +82,7 @@
|
|||
</div> <!-- /.modal-dialog -->
|
||||
</div> <!-- /.modal -->
|
||||
<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>
|
||||
</td>
|
||||
<td>
|
||||
|
@ -110,13 +111,13 @@
|
|||
</div> <!-- /.modal-content -->
|
||||
</div> <!-- /.modal-dialog -->
|
||||
</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>
|
||||
<form action="" method="post" role="form" aria-label="Delete NWFilter form">{% csrf_token %}
|
||||
<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?" %}')">
|
||||
<i class="fa fa-trash"></i>
|
||||
{% bs_icon 'trash' %}
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
|
@ -129,7 +130,7 @@
|
|||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<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>
|
||||
|
|
5
static/css/bootstrap-icons.min.css
vendored
Executable file
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
BIN
static/fonts/bootstrap-icons.woff
Executable file
Binary file not shown.
BIN
static/fonts/bootstrap-icons.woff2
Executable file
BIN
static/fonts/bootstrap-icons.woff2
Executable file
Binary file not shown.
|
@ -1,7 +1,8 @@
|
|||
{% load i18n %}
|
||||
{% load bootstrap_icons %}
|
||||
{% if request.user.is_superuser %}
|
||||
<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>
|
||||
|
||||
<!-- Modal Storage pool -->
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
{% load i18n %}
|
||||
{% load django_bootstrap5 %}
|
||||
{% load bootstrap_icons %}
|
||||
{% if request.user.is_superuser %}
|
||||
{% if state != 0 %}
|
||||
{% if pool == "iso" %}
|
||||
<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>
|
||||
|
||||
<!-- Modal Upload -->
|
||||
|
@ -35,7 +36,7 @@
|
|||
</div> <!-- /.modal -->
|
||||
{% else %}
|
||||
<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>
|
||||
|
||||
<!-- Modal Image -->
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
{% load bootstrap_icons %}
|
||||
{% block title %}{{ compute }} - {% trans "Storage" %}: {{ pool }}{% endblock %}
|
||||
{% block style %}
|
||||
<link rel="stylesheet" href="{% static "css/sortable-theme-bootstrap.css" %}"/>
|
||||
|
@ -17,25 +18,25 @@
|
|||
|
||||
<ol class="breadcrumb shadow-sm">
|
||||
<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 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 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 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 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 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 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>
|
||||
</ol>
|
||||
</div>
|
||||
|
@ -161,11 +162,11 @@
|
|||
</div> <!-- /.modal -->
|
||||
{% ifnotequal volume.type "iso" %}
|
||||
<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>
|
||||
{% else %}
|
||||
<button class="btn btn-sm btn-secondary disabled">
|
||||
<i class="fa fa-files-o"></i>
|
||||
{% bs_icon 'files' %}
|
||||
</button>
|
||||
{% endifnotequal %}
|
||||
</td>
|
||||
|
@ -173,7 +174,7 @@
|
|||
<form action="" method="post" role="form" aria-label="Delete volume form">{% csrf_token %}
|
||||
<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?" %}')">
|
||||
<i class="fa fa-trash"></i>
|
||||
{% bs_icon 'trash' %}
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
|
@ -184,7 +185,7 @@
|
|||
{% else %}
|
||||
<div class="col-lg-12">
|
||||
<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>
|
||||
{% endif %}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap_icons %}
|
||||
|
||||
{% block title %}{% trans "Storages" %} - {{ compute.name }}{% endblock %}
|
||||
|
||||
|
@ -13,25 +14,25 @@
|
|||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb shadow-sm">
|
||||
<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 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 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 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 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 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 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>
|
||||
</ol>
|
||||
</nav>
|
||||
|
@ -42,7 +43,7 @@
|
|||
{% if not storages %}
|
||||
<div class="col-lg-12">
|
||||
<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>
|
||||
{% else %}
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
<!-- Custom Fonts -->
|
||||
<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 -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% extends "base.html" %}
|
||||
{% load django_bootstrap5 %}
|
||||
{% load icons %}
|
||||
{% load bootstrap_icons %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{{ title }}{% endblock %}
|
||||
|
@ -16,9 +16,9 @@
|
|||
{%trans "Are you sure you want to delete" %} "{{ object }}"?
|
||||
</div>
|
||||
<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">
|
||||
{% icon 'trash' %} {% trans "Delete" %}
|
||||
{% bs_icon 'trash' %} {% trans "Delete" %}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% extends "base.html" %}
|
||||
{% load django_bootstrap5 %}
|
||||
{% load icons %}
|
||||
{% load bootstrap_icons %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{{ title }}{% endblock %}
|
||||
|
@ -17,9 +17,9 @@
|
|||
</div>
|
||||
<div class="card-footer">
|
||||
<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">
|
||||
{% icon 'check' %} {% trans "Save" %}
|
||||
{% bs_icon 'check2' %} {% trans "Save" %}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% load i18n %}
|
||||
{% load icons %}
|
||||
{% load bootstrap_icons %}
|
||||
{% load common_tags %}
|
||||
<!-- Fixed 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">
|
||||
<ul class="navbar-nav">
|
||||
<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>
|
||||
{% if request.user.is_superuser %}
|
||||
<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>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
@ -23,28 +23,28 @@
|
|||
{% if request.user.is_superuser %}
|
||||
<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">
|
||||
{% icon 'wrench' %}
|
||||
{% bs_icon 'wrench' %}
|
||||
</a>
|
||||
<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:group_list' %}" href="{% url 'admin:group_list' %}">{% icon 'users' %} {% 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 'appsettings' %}" href="{% url 'appsettings' %}">{% icon 'cogs' %} {% trans "Settings" %}</i></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' %}">{% bs_icon 'people-fill' %} {% trans "Groups" %}</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' %}">{% bs_icon 'gear-wide-connected' %} {% trans "Settings" %}</i></a>
|
||||
</div>
|
||||
</li>
|
||||
{% endif %}
|
||||
<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">
|
||||
<i class="fa fa-fw fa-user"></i> {{ request.user.username }}
|
||||
{% bs_icon 'person' %} {{ request.user.username }}
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarUserDropdown">
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
<a class="dropdown-item disabled" href="#">
|
||||
{% trans "Language" %}: <span class="badge bg-secondary">{{ LANGUAGE_CODE }}</span>
|
||||
</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>
|
||||
<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>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{% load i18n %}
|
||||
{% load bootstrap_icons %}
|
||||
{% if request.user.is_superuser %}
|
||||
<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>
|
||||
|
||||
<!-- Modal Secret -->
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
{% load bootstrap_icons %}
|
||||
{% block title %}{% trans "Secrets" %} - {{ compute.name }}{% endblock %}
|
||||
|
||||
{% block style %}
|
||||
|
@ -19,25 +20,25 @@
|
|||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb shadow-sm">
|
||||
<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 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 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 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 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 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 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>
|
||||
</ol>
|
||||
</nav>
|
||||
|
@ -48,7 +49,7 @@
|
|||
{% if not secrets_all %}
|
||||
<div class="col-lg-12">
|
||||
<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>
|
||||
{% else %}
|
||||
|
@ -73,10 +74,10 @@
|
|||
<form action="" method="post" role="form" aria-label="Delete secret form">{% csrf_token %}
|
||||
<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" %}">
|
||||
<span class="fa fa-pencil"></span>
|
||||
<span>{% bs_icon 'pencil' %} </span>
|
||||
</a>
|
||||
<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>
|
||||
</form>
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@ INSTALLED_APPS = [
|
|||
"django.contrib.messages",
|
||||
"django.contrib.staticfiles",
|
||||
"django_bootstrap5",
|
||||
"django_icons",
|
||||
"django_otp",
|
||||
"django_otp.plugins.otp_totp",
|
||||
"drf_yasg",
|
||||
|
@ -42,6 +41,7 @@ INSTALLED_APPS = [
|
|||
"logs",
|
||||
"qr_code",
|
||||
"rest_framework",
|
||||
"django_bootstrap_icons",
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
|
@ -87,20 +87,6 @@ TEMPLATES = [
|
|||
WSGI_APPLICATION = "webvirtcloud.wsgi.application"
|
||||
|
||||
|
||||
# Settings for django-icons
|
||||
DJANGO_ICONS = {
|
||||
|
||||
'DEFAULTS': {
|
||||
'renderer': 'fontawesome4',
|
||||
},
|
||||
|
||||
'RENDERERS': {
|
||||
'fontawesome4': 'FontAwesome4Renderer',
|
||||
'bootstrap3': 'Bootstrap3Renderer',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/3.0/ref/settings/#databases
|
||||
|
||||
|
@ -169,17 +155,31 @@ DJANGO_ICONS = {
|
|||
|
||||
|
||||
LOGGING = {
|
||||
"version": 1,
|
||||
"disable_existing_loggers": False,
|
||||
"handlers": {
|
||||
"mail_admins": {"level": "ERROR", "class": "django.utils.log.AdminEmailHandler"}
|
||||
'version': 1,
|
||||
'disable_existing_loggers': False,
|
||||
'formatters': {
|
||||
'standard': {
|
||||
'format': '[%(asctime)s] %(levelname)s: %(message)s'
|
||||
},
|
||||
},
|
||||
"loggers": {
|
||||
"django.request": {
|
||||
"handlers": ["mail_admins"],
|
||||
"level": "ERROR",
|
||||
"propagate": True,
|
||||
}
|
||||
'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
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue