1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

Added admin application

- Manage users
- Manage groups
- Manage logs
This commit is contained in:
Real-Gecko 2020-05-27 18:24:06 +06:00 committed by catborise
parent a5bf337052
commit 515b027ab8
6 changed files with 9 additions and 15 deletions

View file

@ -6,7 +6,7 @@
{% block content %}
{% if create_url %}
<a class="btn btn-success float-right" href="{% url create_url %}">{% icon 'plus' %} {%trans "Create New" %}</a>
<a class="btn btn-success float-right" href="{% url create_url %}">{% icon 'plus' %} {%trans "Create New" %}</a>
{% endif %}
<table class="table table-hover table-striped">
{% for object in object_list %}

View file

@ -30,7 +30,6 @@ def group_create(request):
if form.is_valid():
form.save()
return redirect('admin:group_list')
return render(
request,
'admin/common/form.html',
@ -116,8 +115,7 @@ def user_update(request, pk):
user = get_object_or_404(User, pk=pk)
attributes = UserAttributes.objects.get(user=user)
user_form = forms.UserForm(request.POST or None, instance=user)
attributes_form = forms.UserAttributesForm(
request.POST or None, instance=attributes)
attributes_form = forms.UserAttributesForm(request.POST or None, instance=attributes)
if user_form.is_valid() and attributes_form.is_valid():
user_form.save()
attributes_form.save()

View file

@ -16,7 +16,6 @@ from vrtManager.connection import (CONN_SOCKET, CONN_SSH, CONN_TCP, CONN_TLS, co
from vrtManager.hostdetails import wvmHostDetails
@superuser_only
def computes(request):
"""

View file

@ -34,8 +34,7 @@ def secrets(request, compute_id):
}
try:
conn = wvmSecrets(compute.hostname, compute.login,
compute.password, compute.type)
conn = wvmSecrets(compute.hostname, compute.login, compute.password, compute.type)
secrets = conn.get_secrets()
for uuid in secrets:

View file

@ -1,5 +1,5 @@
"""
Django settings for webvirtcloud project.
Django settings for Webvirtcloud project.
"""
@ -160,10 +160,8 @@ QEMU_KEYMAPS = ['ar', 'da', 'de', 'de-ch', 'en-gb', 'en-us', 'es', 'et', 'fi',
'ja', 'lt', 'lv', 'mk', 'nl', 'nl-be', 'no', 'pl', 'pt',
'pt-br', 'ru', 'sl', 'sv', 'th', 'tr']
# keepalive interval and count for libvirt connections
# Keepalive interval and count for libvirt connections
LIBVIRT_KEEPALIVE_INTERVAL = 5
LIBVIRT_KEEPALIVE_COUNT = 5
ALLOW_EMPTY_PASSWORD = True