Add ngSwift Django Interface
This patch adds the scaffolding for the new angular Swift interface, but none of the static files for that interface. The body of the interface will be added in a follow-on patch. To test set DISABLED = False in _1921_project_ng_containers_panel.py Co-Author: Neill Cox <neill@ingenious.com.au> Change-Id: Icc11167f82554dee31edc465a14be8ebbe435403
This commit is contained in:
23
openstack_dashboard/dashboards/project/ngcontainers/panel.py
Normal file
23
openstack_dashboard/dashboards/project/ngcontainers/panel.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# Copyright 2015, Rackspace, US, Inc.
|
||||
#
|
||||
# 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.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
|
||||
class NGContainers(horizon.Panel):
|
||||
name = _("NGContainers")
|
||||
slug = 'ngcontainers'
|
||||
permissions = ('openstack.services.object-store',)
|
@@ -0,0 +1,11 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Containers" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Containers") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
[This content to be replaced in follow-on patch with actual interface.]
|
||||
{% endblock %}
|
26
openstack_dashboard/dashboards/project/ngcontainers/urls.py
Normal file
26
openstack_dashboard/dashboards/project/ngcontainers/urls.py
Normal file
@@ -0,0 +1,26 @@
|
||||
# Copyright 2015, Rackspace, US, Inc.
|
||||
#
|
||||
# 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 patterns
|
||||
from django.conf.urls import url
|
||||
|
||||
from openstack_dashboard.dashboards.project.ngcontainers import views
|
||||
|
||||
|
||||
VIEW_MOD = 'openstack_dashboard.dashboards.project.ngcontainers.views'
|
||||
|
||||
urlpatterns = patterns(
|
||||
'openstack_dashboard.dashboards.project.ngcontainers.views',
|
||||
url(r'^$', views.IndexView.as_view(), name='index'),
|
||||
)
|
19
openstack_dashboard/dashboards/project/ngcontainers/views.py
Normal file
19
openstack_dashboard/dashboards/project/ngcontainers/views.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# Copyright 2015, Rackspace, US, Inc.
|
||||
#
|
||||
# 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/ngcontainers/index.html'
|
@@ -0,0 +1,26 @@
|
||||
# Copyright 2016, Rackspace, US, Inc.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# The slug of the panel to be added to HORIZON_CONFIG. Required.
|
||||
PANEL = 'ngcontainers'
|
||||
# The slug of the dashboard the PANEL associated with. Required.
|
||||
PANEL_DASHBOARD = 'project'
|
||||
# The slug of the panel group the PANEL is associated with.
|
||||
PANEL_GROUP = 'object_store'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = ('openstack_dashboard.dashboards.project.'
|
||||
'ngcontainers.panel.NGContainers')
|
||||
|
||||
DISABLED = True
|
Reference in New Issue
Block a user