AngularJS based panels page title updated
to more logical ones instead of "Horizon - OpenStack Dashboard". Change-Id: Ia230ba28e011e99142e7fd2379fe1735ccd0b010 Closes-Bug: #1647855
This commit is contained in:
parent
c6d656a0b1
commit
124bbb3d82
@ -61,3 +61,9 @@ class ResourceBrowserView(MultiTableView):
|
||||
|
||||
class AngularIndexView(generic.TemplateView):
|
||||
template_name = 'angular.html'
|
||||
title = _("Horizon")
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(AngularIndexView, self).get_context_data(**kwargs)
|
||||
context["title"] = self.title
|
||||
return context
|
||||
|
@ -18,16 +18,19 @@
|
||||
|
||||
from django.conf import settings
|
||||
from django.conf.urls import url
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from horizon.browsers.views import AngularIndexView
|
||||
from openstack_dashboard.dashboards.admin.flavors import views
|
||||
|
||||
|
||||
if settings.ANGULAR_FEATURES['flavors_panel']:
|
||||
title = _("Flavors")
|
||||
# New angular panel
|
||||
urlpatterns = [
|
||||
url(r'^$', AngularIndexView.as_view(), name='index'),
|
||||
url(r'^create/$', AngularIndexView.as_view(), name='create'),
|
||||
url(r'^(?P<id>[^/]+)/update/$', AngularIndexView.as_view(),
|
||||
url(r'^$', AngularIndexView.as_view(title=title), name='index'),
|
||||
url(r'^create/$', AngularIndexView.as_view(title=title),
|
||||
name='create'),
|
||||
url(r'^(?P<id>[^/]+)/update/$', AngularIndexView.as_view(title=title),
|
||||
name='index'),
|
||||
]
|
||||
else:
|
||||
|
@ -18,15 +18,17 @@
|
||||
|
||||
from django.conf import settings
|
||||
from django.conf.urls import url
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from horizon.browsers.views import AngularIndexView
|
||||
from openstack_dashboard.dashboards.admin.images import views
|
||||
|
||||
if settings.ANGULAR_FEATURES['images_panel']:
|
||||
title = _("Images")
|
||||
# New angular images
|
||||
urlpatterns = [
|
||||
url(r'^$', AngularIndexView.as_view(), name='index'),
|
||||
url(r'^$', AngularIndexView.as_view(title=title), name='index'),
|
||||
url(r'^(?P<image_id>[^/]+)/detail/$',
|
||||
AngularIndexView.as_view(), name='detail'),
|
||||
AngularIndexView.as_view(title=title), name='detail'),
|
||||
]
|
||||
else:
|
||||
urlpatterns = [
|
||||
|
@ -19,14 +19,17 @@
|
||||
|
||||
from django.conf import settings
|
||||
from django.conf.urls import url
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from horizon.browsers.views import AngularIndexView
|
||||
from openstack_dashboard.dashboards.identity.users import views
|
||||
|
||||
|
||||
if settings.ANGULAR_FEATURES.get('users_panel', False):
|
||||
title = _("Users")
|
||||
# new angular panel
|
||||
urlpatterns = [
|
||||
url(r'^$', views.AngularIndexView.as_view(), name='index'),
|
||||
url(r'^$', AngularIndexView.as_view(title=title), name='index'),
|
||||
]
|
||||
else:
|
||||
urlpatterns = [
|
||||
|
@ -25,7 +25,6 @@ from django.core.urlresolvers import reverse_lazy
|
||||
from django.utils.decorators import method_decorator # noqa
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.views.decorators.debug import sensitive_post_parameters # noqa
|
||||
from django.views import generic
|
||||
|
||||
from horizon import exceptions
|
||||
from horizon import forms
|
||||
@ -45,10 +44,6 @@ from openstack_dashboard.dashboards.identity.users \
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class AngularIndexView(generic.TemplateView):
|
||||
template_name = 'angular.html'
|
||||
|
||||
|
||||
class IndexView(tables.DataTableView):
|
||||
table_class = project_tables.UsersTable
|
||||
template_name = 'identity/users/index.html'
|
||||
|
@ -18,13 +18,15 @@
|
||||
|
||||
from django.conf import settings
|
||||
from django.conf.urls import url
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from horizon.browsers.views import AngularIndexView
|
||||
from openstack_dashboard.dashboards.project.images.images import views
|
||||
|
||||
|
||||
if settings.ANGULAR_FEATURES['images_panel']:
|
||||
title = _("Images")
|
||||
urlpatterns = [
|
||||
url(r'^(?P<image_id>[^/]+)/$', AngularIndexView.as_view(),
|
||||
url(r'^(?P<image_id>[^/]+)/$', AngularIndexView.as_view(title=title),
|
||||
name='detail'),
|
||||
]
|
||||
else:
|
||||
|
@ -19,6 +19,7 @@
|
||||
from django.conf import settings
|
||||
from django.conf.urls import include
|
||||
from django.conf.urls import url
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from horizon.browsers.views import AngularIndexView
|
||||
from openstack_dashboard.dashboards.project.images.images \
|
||||
import urls as image_urls
|
||||
@ -28,9 +29,10 @@ from openstack_dashboard.dashboards.project.images import views
|
||||
|
||||
|
||||
if settings.ANGULAR_FEATURES['images_panel']:
|
||||
title = _("Images")
|
||||
# New angular images
|
||||
urlpatterns = [
|
||||
url(r'^$', AngularIndexView.as_view(), name='index'),
|
||||
url(r'^$', AngularIndexView.as_view(title=title), name='index'),
|
||||
url(r'', include(image_urls, namespace='images')),
|
||||
url(r'', include(snapshot_urls, namespace='snapshots')),
|
||||
]
|
||||
|
@ -13,9 +13,11 @@
|
||||
# under the License.
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from horizon.browsers.views import AngularIndexView
|
||||
|
||||
title = _("Volumes")
|
||||
|
||||
urlpatterns = [
|
||||
url('', AngularIndexView.as_view(), name='index'),
|
||||
url('', AngularIndexView.as_view(title=title), name='index'),
|
||||
]
|
||||
|
@ -1,6 +1,6 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Horizon" %}{% endblock %}
|
||||
{% block title %}{{ title }}{% endblock %}
|
||||
|
||||
{% block breadcrumb_nav %}{% endblock %}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user