From b916c9dcf916376209efdd66e971b465de94a286 Mon Sep 17 00:00:00 2001 From: catborise Date: Wed, 26 Sep 2018 17:20:46 +0300 Subject: [PATCH] instance network tab modified. Changing function modified. deleting function added. network info of nwfilters added. and some small fixes applied --- .../templates/add_instance_network_block.html | 4 +- instances/templates/instance.html | 75 ++++++++++++------- instances/views.py | 27 ++++--- vrtManager/instance.py | 27 ++++++- 4 files changed, 93 insertions(+), 40 deletions(-) diff --git a/instances/templates/add_instance_network_block.html b/instances/templates/add_instance_network_block.html index afb0ae5..9d65601 100644 --- a/instances/templates/add_instance_network_block.html +++ b/instances/templates/add_instance_network_block.html @@ -36,9 +36,9 @@
- - {% for nwfilter in nwfilters %} + {% for nwfilter in compute_nwfilters %} {% endfor %} diff --git a/instances/templates/instance.html b/instances/templates/instance.html index 4dbfa6d..b61e73b 100644 --- a/instances/templates/instance.html +++ b/instances/templates/instance.html @@ -833,36 +833,63 @@ {% if request.user.is_superuser %}

- {% trans "Assign network device to bridge" %} - {% include 'add_instance_network_block.html' %} + {% trans "Assign network device to bridge" %} + {% include 'add_instance_network_block.html' %}

-
{% csrf_token %} -

{% trans "Network devices" %}

+

{% trans "Network devices" %}

+
+ {% csrf_token %} {% for network in networks %} -
- -
- +
+
+
-
- +
+
+ + + + +
+
+ + + + +
+
+ + + + +
-
- + +
{% endfor %} - - + + + +
+
{% endif %} {% if request.user.is_superuser or request.user.userattributes.can_clone_instances %} @@ -1367,12 +1394,6 @@ }); }); -