From 80adb295068bfd4e204c225c7e737db5e090548d Mon Sep 17 00:00:00 2001 From: Shu Muto Date: Wed, 29 Mar 2017 17:49:34 +0900 Subject: [PATCH] Fix breadcrumbs AngularIndexView of Horizon enables breadcrumbs for Angular-based panels. This change uses page title for current tag of breadcrumb by default. Magnum UI uses additional words "Container Infra -" for page title, so we should set "panel" argument for current tag of breadcrumb. This patch fixes this issue. Also, removes unnecessary url pattern. Change-Id: I0c67c5281140fc9ba76f007292e6634c567defa0 --- magnum_ui/content/cluster_templates/urls.py | 8 +++++--- magnum_ui/content/clusters/urls.py | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/magnum_ui/content/cluster_templates/urls.py b/magnum_ui/content/cluster_templates/urls.py index 389d1fc9..99a1ba9e 100644 --- a/magnum_ui/content/cluster_templates/urls.py +++ b/magnum_ui/content/cluster_templates/urls.py @@ -15,11 +15,13 @@ from django.conf.urls import url from django.utils.translation import ugettext_lazy as _ from horizon.browsers import views +from magnum_ui.content.cluster_templates import panel title = _("Container Infra - Cluster Templates") +page_title = panel.ClusterTemplates.name urlpatterns = [ - url(r'^[0-9a-f\-]{36}$', views.AngularIndexView.as_view(title=title), - name='detail'), - url(r'^$', views.AngularIndexView.as_view(title=title), name='index'), + url(r'^$', + views.AngularIndexView.as_view(title=title, page_title=page_title), + name='index'), ] diff --git a/magnum_ui/content/clusters/urls.py b/magnum_ui/content/clusters/urls.py index b48178d0..60479216 100644 --- a/magnum_ui/content/clusters/urls.py +++ b/magnum_ui/content/clusters/urls.py @@ -15,11 +15,13 @@ from django.conf.urls import url from django.utils.translation import ugettext_lazy as _ from horizon.browsers import views +from magnum_ui.content.clusters import panel title = _("Container Infra - Clusters") +page_title = panel.Clusters.name urlpatterns = [ - url(r'^[0-9a-f\-]{36}$', views.AngularIndexView.as_view(title=title), - name='detail'), - url(r'^$', views.AngularIndexView.as_view(title=title), name='index'), + url(r'^$', + views.AngularIndexView.as_view(title=title, page_title=page_title), + name='index'), ]