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
This commit is contained in:
Shu Muto 2017-03-29 17:49:34 +09:00
parent cac8f9e094
commit 80adb29506
2 changed files with 10 additions and 6 deletions

View File

@ -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'),
]

View File

@ -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'),
]