From 8d5c92c01dfb5157764a79576cde33fa82ba775d Mon Sep 17 00:00:00 2001 From: Sam Betts Date: Tue, 10 Feb 2015 14:19:50 +0000 Subject: [PATCH] Reduce page title duplication in Nexus1000v views Patch https://review.openstack.org/#/c/142802 adds a method of reducing duplication of page title logic, this patch applies that change to the project router nexus 1000v views. Change-Id: I65561fa557211446ae7c48f5ae72882bcd931e23 Partial-Bug: 1413749 --- .../templates/nexus1000v/create_network_profile.html | 4 ---- .../router/nexus1000v/templates/nexus1000v/index.html | 4 ---- .../templates/nexus1000v/network_profile/index.html | 4 ---- .../templates/nexus1000v/policy_profile/index.html | 4 ---- .../templates/nexus1000v/update_network_profile.html | 4 ---- openstack_dashboard/dashboards/router/nexus1000v/views.py | 5 +++++ 6 files changed, 5 insertions(+), 20 deletions(-) diff --git a/openstack_dashboard/dashboards/router/nexus1000v/templates/nexus1000v/create_network_profile.html b/openstack_dashboard/dashboards/router/nexus1000v/templates/nexus1000v/create_network_profile.html index e7574f5dc0..e5f7129cda 100644 --- a/openstack_dashboard/dashboards/router/nexus1000v/templates/nexus1000v/create_network_profile.html +++ b/openstack_dashboard/dashboards/router/nexus1000v/templates/nexus1000v/create_network_profile.html @@ -2,10 +2,6 @@ {% load i18n %} {% block title %}{% trans "Create Network Profile" %}{% endblock %} -{% block page_header %} - {% include "horizon/common/_page_header.html" with title=_("Create Network Profile") %} -{% endblock page_header %} - {% block main %} {% include "router/nexus1000v/_create_network_profile.html" %} {% endblock %} diff --git a/openstack_dashboard/dashboards/router/nexus1000v/templates/nexus1000v/index.html b/openstack_dashboard/dashboards/router/nexus1000v/templates/nexus1000v/index.html index f2c28116dc..7d07d0dd15 100644 --- a/openstack_dashboard/dashboards/router/nexus1000v/templates/nexus1000v/index.html +++ b/openstack_dashboard/dashboards/router/nexus1000v/templates/nexus1000v/index.html @@ -2,10 +2,6 @@ {% load i18n %} {% block title %}{% trans "Cisco Nexus 1000V Networking" %}{% endblock %} -{% block page_header %} - {% include "horizon/common/_page_header.html" with title=_("Cisco Nexus 1000V") %} -{% endblock page_header %} - {% block main %}
{{ network_profile_table.render }} diff --git a/openstack_dashboard/dashboards/router/nexus1000v/templates/nexus1000v/network_profile/index.html b/openstack_dashboard/dashboards/router/nexus1000v/templates/nexus1000v/network_profile/index.html index a8f0a82151..fe1a96f10e 100644 --- a/openstack_dashboard/dashboards/router/nexus1000v/templates/nexus1000v/network_profile/index.html +++ b/openstack_dashboard/dashboards/router/nexus1000v/templates/nexus1000v/network_profile/index.html @@ -2,10 +2,6 @@ {% load i18n %} {% block title %}{% trans "Cisco Nexus 1000V Networking" %}{% endblock %} -{% block page_header %} - {% include "horizon/common/_page_header.html" with title=_("Cisco Nexus 1000V") %} -{% endblock page_header %} - {% block main %}
{{ table.render }} diff --git a/openstack_dashboard/dashboards/router/nexus1000v/templates/nexus1000v/policy_profile/index.html b/openstack_dashboard/dashboards/router/nexus1000v/templates/nexus1000v/policy_profile/index.html index 2c141511a7..6434db0aec 100644 --- a/openstack_dashboard/dashboards/router/nexus1000v/templates/nexus1000v/policy_profile/index.html +++ b/openstack_dashboard/dashboards/router/nexus1000v/templates/nexus1000v/policy_profile/index.html @@ -2,10 +2,6 @@ {% load i18n %} {% block title %}{% trans "Cisco Nexus 1000V Networking" %}{% endblock %} -{% block page_header %} - {% include "horizon/common/_page_header.html" with title=_("Cisco Nexus 1000V") %} -{% endblock page_header %} - {% block main %}
{{ table.render }} diff --git a/openstack_dashboard/dashboards/router/nexus1000v/templates/nexus1000v/update_network_profile.html b/openstack_dashboard/dashboards/router/nexus1000v/templates/nexus1000v/update_network_profile.html index b55833cfa2..7f5ec27a8a 100644 --- a/openstack_dashboard/dashboards/router/nexus1000v/templates/nexus1000v/update_network_profile.html +++ b/openstack_dashboard/dashboards/router/nexus1000v/templates/nexus1000v/update_network_profile.html @@ -2,10 +2,6 @@ {% load i18n %} {% block title %}{% trans "Update Network Profile" %}{% endblock %} -{% block page_header %} - {% include "horizon/common/_page_header.html" with title=_("Update Network Profile") %} -{% endblock page_header %} - {% block main %} {% include 'router/nexus1000v/_update_network_profile.html' %} {% endblock %} diff --git a/openstack_dashboard/dashboards/router/nexus1000v/views.py b/openstack_dashboard/dashboards/router/nexus1000v/views.py index 43b8c4e433..e99d067a04 100644 --- a/openstack_dashboard/dashboards/router/nexus1000v/views.py +++ b/openstack_dashboard/dashboards/router/nexus1000v/views.py @@ -67,6 +67,7 @@ def _get_profiles(request, type_p): class NetworkProfileIndexView(tables.DataTableView): table_class = profiletables.NetworkProfile template_name = 'router/nexus1000v/network_profile/index.html' + page_title = _("Cisco Nexus 1000V") def get_data(self): return _get_profiles(self.request, 'network') @@ -75,6 +76,7 @@ class NetworkProfileIndexView(tables.DataTableView): class PolicyProfileIndexView(tables.DataTableView): table_class = profiletables.PolicyProfile template_name = 'router/nexus1000v/policy_profile/index.html' + page_title = _("Cisco Nexus 1000V") def get_data(self): return _get_profiles(self.request, 'policy') @@ -89,6 +91,7 @@ class IndexView(tables.MultiTableView): table_classes = (profiletables.NetworkProfile, profiletables.PolicyProfile,) template_name = 'router/nexus1000v/index.html' + page_title = _("Cisco Nexus 1000V") def get_network_profile_data(self): return _get_profiles(self.request, 'network') @@ -101,6 +104,7 @@ class CreateNetworkProfileView(forms.ModalFormView): form_class = profileforms.CreateNetworkProfile template_name = 'router/nexus1000v/create_network_profile.html' success_url = urlresolvers.reverse_lazy('horizon:router:nexus1000v:index') + page_title = _("Create Network Profile") class UpdateNetworkProfileView(forms.ModalFormView): @@ -108,6 +112,7 @@ class UpdateNetworkProfileView(forms.ModalFormView): template_name = 'router/nexus1000v/update_network_profile.html' context_object_name = 'network_profile' success_url = urlresolvers.reverse_lazy('horizon:router:nexus1000v:index') + page_title = _("Update Network Profile") def get_context_data(self, **kwargs): context = super(UpdateNetworkProfileView,