From 911c9e41d2b4ab424851ec505733d13b868defd0 Mon Sep 17 00:00:00 2001 From: lombardof Date: Sun, 3 Jun 2018 16:52:12 +0200 Subject: [PATCH] VIM accounts part of the project view Change-Id: I58992f1fd42dcf78b2db33a285af1b8032a954db Signed-off-by: lombardof --- .../template/instance_list_ns.html | 2 +- .../osm/descriptor/descriptorlist.html | 2 +- .../project/osm/osm_project_left_sidebar.html | 6 ++--- projecthandler/urls/project.py | 1 + sf_t3d/urls.py | 2 +- template/left_sidebar_base.html | 3 --- vimhandler/template/vim_create.html | 8 +++---- vimhandler/template/vim_list.html | 14 +++++------ vimhandler/template/vim_show.html | 24 +++---------------- vimhandler/views.py | 20 +++++++++------- 10 files changed, 33 insertions(+), 49 deletions(-) diff --git a/instancehandler/template/instance_list_ns.html b/instancehandler/template/instance_list_ns.html index 0e32765..bc3b94a 100644 --- a/instancehandler/template/instance_list_ns.html +++ b/instancehandler/template/instance_list_ns.html @@ -7,7 +7,7 @@ diff --git a/projecthandler/template/project/osm/descriptor/descriptorlist.html b/projecthandler/template/project/osm/descriptor/descriptorlist.html index f2f4c8d..67f4a75 100644 --- a/projecthandler/template/project/osm/descriptor/descriptorlist.html +++ b/projecthandler/template/project/osm/descriptor/descriptorlist.html @@ -37,7 +37,7 @@
{% if descriptor_type == "nsd" %} - + {% endif %} diff --git a/projecthandler/template/project/osm/osm_project_left_sidebar.html b/projecthandler/template/project/osm/osm_project_left_sidebar.html index 495f85e..b265080 100644 --- a/projecthandler/template/project/osm/osm_project_left_sidebar.html +++ b/projecthandler/template/project/osm/osm_project_left_sidebar.html @@ -54,10 +54,10 @@ SDN Controllers -
  • CONFIG
  • - {% url "vim:list" type='ns' as vim_list_url %} + + {% url "projects:vims:list" project_id=project_id as vim_list_url %}
  • - + VIM Accounts
  • diff --git a/projecthandler/urls/project.py b/projecthandler/urls/project.py index eb88a9e..452365a 100644 --- a/projecthandler/urls/project.py +++ b/projecthandler/urls/project.py @@ -22,6 +22,7 @@ urlpatterns = [ url(r'^new/', views.create_new_project, name='new_project'), url(r'^(?P\d+)/$', views.open_project, name='open_project'), url(r'^(?P\d+)/sdn/', include('sdnctrlhandler.urls', namespace='sdns'), name='sdns_base'), + url(r'^(?P\d+)/vims/', include('vimhandler.urls', namespace='vims'), name='vims_base'), url(r'^(?P\d+)/instances/', include('instancehandler.urls', namespace='instances'), name='instances_base'), url(r'^(?P\d+)/delete$', views.delete_project, name='delete_project'), url(r'^(?P\d+)/graph(/$)', views.graph, name='graph_view'), diff --git a/sf_t3d/urls.py b/sf_t3d/urls.py index bea83a2..5b82f5a 100644 --- a/sf_t3d/urls.py +++ b/sf_t3d/urls.py @@ -26,7 +26,7 @@ urlpatterns = [ url(r'^auth_guest/$', user_views.guest_login, name='auth_user_guest'), url(r'^register', user_views.register_view, name='register_user'), url(r'^projects/', include('projecthandler.urls.project', namespace='projects'), name='projects_base'), - url(r'^vims/', include('vimhandler.urls', namespace='vim'), name='vims_base'), + #url(r'^vims/', include('vimhandler.urls', namespace='vim'), name='vims_base'), #url(r'^sdn/', include('sdnctrlhandler.urls', namespace='sdn'), name='sdns_base'), url(r'^$', views.home, name='home'), diff --git a/template/left_sidebar_base.html b/template/left_sidebar_base.html index 20f664e..d2f4b56 100644 --- a/template/left_sidebar_base.html +++ b/template/left_sidebar_base.html @@ -9,9 +9,6 @@
  • Home
  • {% url "projects:projects_list" as projects_list_url %}
  • Projects
  • - {% url "vim:list" as vims_list_url %} -
  • VIM Accounts
  • - {% block left_sidebar_base %} diff --git a/vimhandler/template/vim_create.html b/vimhandler/template/vim_create.html index a68527e..4368735 100644 --- a/vimhandler/template/vim_create.html +++ b/vimhandler/template/vim_create.html @@ -12,14 +12,14 @@ {% endblock %} {% block left_sidebar %} - {% include 'left_sidebar_base.html' %} + {% include 'osm/osm_project_left_sidebar.html' %} {% endblock %} {% block breadcrumb_body %} {{ block.super }} -
  • VIMS
  • +
  • VIMS
  • {% endblock %} {% block content_body %} @@ -27,7 +27,7 @@
    -
    + {% csrf_token %}
    @@ -175,7 +175,7 @@