Use common Angular view for Queues panel

This patch uses Horizon's common Angular views module for Queues panel.
Also, breadcrumbs are shown.

Change-Id: Iae5edc9d370fbda20889a043a2574bd034170881
Closes-Bug: #1664374
This commit is contained in:
Shu Muto 2017-02-14 12:33:00 +09:00
parent af8973b185
commit d803f27cce
4 changed files with 11 additions and 36 deletions

View File

@ -1,11 +0,0 @@
{% extends 'base.html' %}
{% load i18n %}
{% block title %}{% trans "Queues" %}{% endblock %}
{% block page_header %}
<base href="{{ WEBROOT }}" >
{% endblock page_header %}
{% block main %}
<ng-include src="'{{STATIC_URL}}/dashboard/project/queues/table/queue.html'"></ng-include>
{% endblock %}

View File

@ -13,10 +13,10 @@
# limitations under the License.
from django.conf import urls
from horizon.browsers import views
from zaqar_ui.content.queues import panel
from zaqar_ui.content.queues import views
title = panel.Queues.name
urlpatterns = [
urls.url(r'^$', views.IndexView.as_view(), name='index'),
urls.url(r'^$', views.AngularIndexView.as_view(title=title), name='index'),
]

View File

@ -1,19 +0,0 @@
# Copyright 2015 IBM Corp.
#
# 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.views import generic
class IndexView(generic.TemplateView):
template_name = 'project/queues/index.html'

View File

@ -32,7 +32,8 @@
config.$inject = [
'$provide',
'$windowProvider'
'$windowProvider',
'$routeProvider'
];
/**
@ -58,12 +59,16 @@
* @name horizon.dashboard.project.queues.basePath
* @param {Object} $provide
* @param {Object} $windowProvider
* @param {Object} $routeProvider
* @returns {undefined} Returns nothing
* @description Base path for the queues panel
*/
function config($provide, $windowProvider) {
function config($provide, $windowProvider, $routeProvider) {
var path = $windowProvider.$get().STATIC_URL + 'dashboard/project/queues/';
$provide.constant('horizon.dashboard.project.queues.basePath', path);
$routeProvider.when('/project/queues', {
templateUrl: path + 'table/queue.html'
});
}
})();