From a47d0067719b5328735523795aeca96bfe45ca9b Mon Sep 17 00:00:00 2001 From: catborise Date: Thu, 10 Jun 2021 13:46:08 +0300 Subject: [PATCH 1/3] fix edit instance volume for running instances to prevent bus error --- instances/templates/{ => instances}/edit_instance_volume.html | 2 +- instances/templates/instances/settings_tab.html | 2 +- instances/views.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename instances/templates/{ => instances}/edit_instance_volume.html (98%) diff --git a/instances/templates/edit_instance_volume.html b/instances/templates/instances/edit_instance_volume.html similarity index 98% rename from instances/templates/edit_instance_volume.html rename to instances/templates/instances/edit_instance_volume.html index ec0c3df..ff5fbdc 100644 --- a/instances/templates/edit_instance_volume.html +++ b/instances/templates/instances/edit_instance_volume.html @@ -121,7 +121,7 @@
diff --git a/instances/templates/instances/settings_tab.html b/instances/templates/instances/settings_tab.html index ef79a45..ddcf390 100644 --- a/instances/templates/instances/settings_tab.html +++ b/instances/templates/instances/settings_tab.html @@ -290,7 +290,7 @@ - {% include 'edit_instance_volume.html' with id=forloop.counter0 %} + {% include 'instances/edit_instance_volume.html' with id=forloop.counter0 %}
{% csrf_token %} diff --git a/instances/views.py b/instances/views.py index 2fb3ab5..6669aa9 100644 --- a/instances/views.py +++ b/instances/views.py @@ -596,8 +596,8 @@ def edit_volume(request, pk): shareable = bool(request.POST.get("vol_shareable", False)) readonly = bool(request.POST.get("vol_readonly", False)) disk_type = request.POST.get("vol_type", "") - new_bus = request.POST.get("vol_bus", "") bus = request.POST.get("vol_bus_old", "") + new_bus = request.POST.get("vol_bus", bus) serial = request.POST.get("vol_serial", "") format = request.POST.get("vol_format", "") cache = request.POST.get("vol_cache", app_settings.INSTANCE_VOLUME_DEFAULT_CACHE) From d7c0f9445d86105608720c487731e489b3accd11 Mon Sep 17 00:00:00 2001 From: catborise Date: Thu, 10 Jun 2021 15:17:53 +0300 Subject: [PATCH 2/3] rearrange search functionality --- admin/templates/admin/group_list.html | 4 +--- admin/templates/admin/user_list.html | 4 +--- computes/templates/computes/instances.html | 4 +--- computes/templates/computes/list.html | 9 ++++---- instances/templates/allinstances.html | 8 +++---- nwfilters/templates/nwfilter.html | 23 ++++---------------- nwfilters/templates/nwfilters.html | 25 +++++----------------- static/js/filter-table.js | 8 +++---- storages/templates/storage.html | 24 ++++++--------------- templates/search_block.html | 2 +- 10 files changed, 31 insertions(+), 80 deletions(-) diff --git a/admin/templates/admin/group_list.html b/admin/templates/admin/group_list.html index d101466..1f9562f 100644 --- a/admin/templates/admin/group_list.html +++ b/admin/templates/admin/group_list.html @@ -9,9 +9,7 @@ {% icon 'plus' %} - + {% include 'search_block.html' %}

{% trans "Groups" %}

diff --git a/admin/templates/admin/user_list.html b/admin/templates/admin/user_list.html index f1a6323..9bcb683 100644 --- a/admin/templates/admin/user_list.html +++ b/admin/templates/admin/user_list.html @@ -12,9 +12,7 @@ {% icon 'plus' %} - +{% include 'search_block.html' %} {% endblock page_heading_extra %} {% block content %} diff --git a/computes/templates/computes/instances.html b/computes/templates/computes/instances.html index f69143f..bdac072 100644 --- a/computes/templates/computes/instances.html +++ b/computes/templates/computes/instances.html @@ -14,9 +14,7 @@ {% icon 'plus' %} {% if instances %} - + {% include 'search_block.html' %} {% endif %} {% endblock page_heading_extra %} diff --git a/computes/templates/computes/list.html b/computes/templates/computes/list.html index 8e4b899..9cb3233 100644 --- a/computes/templates/computes/list.html +++ b/computes/templates/computes/list.html @@ -22,9 +22,9 @@ {% else %}
- +
- + @@ -33,7 +33,7 @@ {% for compute in computes %} - + @@ -64,5 +64,6 @@ {% endblock content %} {% block script %} - + + {% endblock script %} diff --git a/instances/templates/allinstances.html b/instances/templates/allinstances.html index 8c29794..8a71a44 100644 --- a/instances/templates/allinstances.html +++ b/instances/templates/allinstances.html @@ -4,7 +4,7 @@ {% load staticfiles %} {% block title %}{% trans "Instances" %}{% endblock %} {% block style %} - + {% endblock %} {% block page_heading %}{% trans "Instances" %}{% endblock page_heading %} @@ -12,9 +12,7 @@ {% if request.user.is_superuser %} {% include 'create_inst_block.html' %} {% endif %} - + {% include 'search_block.html' %} {% endblock page_heading_extra %} {% block content %} @@ -37,7 +35,7 @@ {% endblock content %} {% block script %} - + {% if request.user.is_superuser %} - - + + + + + - - - + + - {% endblock %} diff --git a/templates/search_block.html b/templates/search_block.html index 7f2b515..f80a4ce 100644 --- a/templates/search_block.html +++ b/templates/search_block.html @@ -1,4 +1,4 @@ {% load i18n %} From 5aa22ac042dc3e9f30d74201decae25c1c41f36a Mon Sep 17 00:00:00 2001 From: catborise Date: Tue, 15 Jun 2021 09:42:55 +0300 Subject: [PATCH 3/3] Django 3.2.4 LTS upgrade --- computes/templates/computes/instances.html | 2 +- computes/templates/overview.html | 2 +- computes/urls.py | 2 +- conf/requirements.txt | 2 +- console/templates/console-base.html | 2 +- console/templates/console-spice-full.html | 2 +- console/templates/console-spice-lite.html | 2 +- console/templates/console-vnc-full.html | 2 +- console/templates/console-vnc-lite.html | 2 +- instances/templates/allinstances.html | 2 +- instances/templates/create_instance_w1.html | 2 +- instances/templates/create_instance_w2.html | 2 +- instances/templates/instance.html | 2 +- interfaces/templates/interfaces.html | 2 +- networks/templates/network.html | 2 +- nwfilters/templates/nwfilter.html | 2 +- nwfilters/templates/nwfilters.html | 2 +- storages/templates/storage.html | 2 +- {secrets => virtsecrets}/__init__.py | 0 {secrets => virtsecrets}/forms.py | 0 .../migrations/__init__.py | 0 {secrets => virtsecrets}/models.py | 0 .../templates/create_secret_block.html | 0 .../templates/secrets.html | 2 +- {secrets => virtsecrets}/tests.py | 0 {secrets => virtsecrets}/views.py | 4 +- vrtManager/{secrets.py => virtsecrets.py} | 0 webvirtcloud/settings.py.template | 44 ++++++++++++++++--- 28 files changed, 58 insertions(+), 28 deletions(-) rename {secrets => virtsecrets}/__init__.py (100%) rename {secrets => virtsecrets}/forms.py (100%) rename {secrets => virtsecrets}/migrations/__init__.py (100%) rename {secrets => virtsecrets}/models.py (100%) rename {secrets => virtsecrets}/templates/create_secret_block.html (100%) rename {secrets => virtsecrets}/templates/secrets.html (99%) rename {secrets => virtsecrets}/tests.py (100%) rename {secrets => virtsecrets}/views.py (97%) rename vrtManager/{secrets.py => virtsecrets.py} (100%) diff --git a/computes/templates/computes/instances.html b/computes/templates/computes/instances.html index bdac072..e6416c5 100644 --- a/computes/templates/computes/instances.html +++ b/computes/templates/computes/instances.html @@ -1,6 +1,6 @@ {% extends "base.html" %} {% load i18n %} -{% load staticfiles %} +{% load static %} {% load icons %} {% block title %}{% trans "Instances" %} - {{ compute.name }}{% endblock %} {% block style %} diff --git a/computes/templates/overview.html b/computes/templates/overview.html index 2894ebb..bddaa83 100644 --- a/computes/templates/overview.html +++ b/computes/templates/overview.html @@ -1,6 +1,6 @@ {% extends "base.html" %} {% load i18n %} -{% load staticfiles %} +{% load static %} {% load icons %} {% block title %}{% trans "Overview" %} - {{ compute.name }}{% endblock %} diff --git a/computes/urls.py b/computes/urls.py index 6e43695..15f6331 100644 --- a/computes/urls.py +++ b/computes/urls.py @@ -1,4 +1,4 @@ -from secrets.views import secrets +from virtsecrets.views import secrets from django.urls import include, path # from instances.views import create_instance, create_instance_select_type diff --git a/conf/requirements.txt b/conf/requirements.txt index 8d13382..235cd22 100644 --- a/conf/requirements.txt +++ b/conf/requirements.txt @@ -1,4 +1,4 @@ -Django==2.2.22 +Django==3.2.4 django-bootstrap4==3.0.1 django-icons==4.0.0 django-login-required-middleware==0.6.1 diff --git a/console/templates/console-base.html b/console/templates/console-base.html index 7875f7e..8627cec 100644 --- a/console/templates/console-base.html +++ b/console/templates/console-base.html @@ -1,4 +1,4 @@ -{% load staticfiles %} +{% load static %} {% load i18n %} diff --git a/console/templates/console-spice-full.html b/console/templates/console-spice-full.html index da7dae1..0dfed9f 100644 --- a/console/templates/console-spice-full.html +++ b/console/templates/console-spice-full.html @@ -24,7 +24,7 @@ --> {% extends "console-base.html" %} {% load i18n %} -{% load staticfiles %} +{% load static %} {% block head %} WebVirtCloud - Spice Client - Full diff --git a/console/templates/console-spice-lite.html b/console/templates/console-spice-lite.html index a984063..469c971 100644 --- a/console/templates/console-spice-lite.html +++ b/console/templates/console-spice-lite.html @@ -24,7 +24,7 @@ --> {% extends "console-base.html" %} {% load i18n %} -{% load staticfiles %} +{% load static %} {% block head %} WebVirtCloud - Spice - Lite diff --git a/console/templates/console-vnc-full.html b/console/templates/console-vnc-full.html index 05bf5b4..fae93e5 100755 --- a/console/templates/console-vnc-full.html +++ b/console/templates/console-vnc-full.html @@ -1,6 +1,6 @@ {% extends "console-base.html" %} {% load i18n %} -{% load staticfiles %} +{% load static %} {% block head %}
{% trans "Name" %} {% trans "Status" %} {% trans "Details" %}
{{ compute.name }}