diff --git a/zun_ui/content/container/containers/admin_urls.py b/zun_ui/content/container/containers/admin_urls.py new file mode 100644 index 0000000..ab6179a --- /dev/null +++ b/zun_ui/content/container/containers/admin_urls.py @@ -0,0 +1,23 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +from django.conf.urls import url +from django.utils.translation import ugettext_lazy as _ +from horizon.browsers import views +from zun_ui.content.container.containers import views as zun_views + +title = _("Containers") +urlpatterns = [ + url(r'^(?P[^/]+)/console', + zun_views.SerialConsoleView.as_view(), name='console'), + url('', views.AngularIndexView.as_view(title=title), name='index'), +] diff --git a/zun_ui/content/container/containers/panel.py b/zun_ui/content/container/containers/panel.py index be9782d..d96cdd5 100644 --- a/zun_ui/content/container/containers/panel.py +++ b/zun_ui/content/container/containers/panel.py @@ -26,3 +26,4 @@ class Containers(horizon.Panel): class ContainersForAdmin(horizon.Panel): name = _("Containers") slug = "container.containers" + urls = "admin_urls" diff --git a/zun_ui/static/dashboard/container/containers/containers.service.js b/zun_ui/static/dashboard/container/containers/containers.service.js index 8d81126..78c1f36 100644 --- a/zun_ui/static/dashboard/container/containers/containers.service.js +++ b/zun_ui/static/dashboard/container/containers/containers.service.js @@ -22,7 +22,6 @@ '$location', 'horizon.app.core.detailRoute', 'horizon.app.core.openstack-service-api.zun', - 'horizon.framework.util.navigations.service' ]; /* @@ -33,7 +32,7 @@ * This service provides functions that are used through * the containers features. */ - function containersService($location, detailRoute, zun, navigation) { + function containersService($location, detailRoute, zun) { return { getDefaultIndexUrl: getDefaultIndexUrl, getDetailsPath: getDetailsPath, @@ -42,19 +41,14 @@ }; function getDefaultIndexUrl() { - var dashboard, breadcrumbDashboard; + var dashboard; var path = "/container/containers"; if (zun.isAdmin()) { dashboard = "/admin"; - breadcrumbDashboard = gettext("Admin"); } else { dashboard = "/project"; - breadcrumbDashboard = gettext("Project"); } var url = dashboard + path + "/"; - navigation.setBreadcrumb([ - breadcrumbDashboard, gettext("Container"), gettext("Containers")]); - navigation.expandNavigationByUrl(url); return url; } /*