Merge "Consolidated common angular view"
This commit is contained in:
commit
5215f51c7a
@ -13,6 +13,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
from django.views import generic
|
||||||
|
|
||||||
from horizon.tables import MultiTableView # noqa
|
from horizon.tables import MultiTableView # noqa
|
||||||
from horizon.utils import memoized
|
from horizon.utils import memoized
|
||||||
@ -56,3 +57,7 @@ class ResourceBrowserView(MultiTableView):
|
|||||||
browser = self.get_browser()
|
browser = self.get_browser()
|
||||||
context["%s_browser" % browser.name] = browser
|
context["%s_browser" % browser.name] = browser
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
||||||
|
class AngularIndexView(generic.TemplateView):
|
||||||
|
template_name = 'angular.html'
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from django.conf.urls import url
|
from django.conf.urls import url
|
||||||
from openstack_dashboard.contrib.developer.resource_browser import views
|
from horizon.browsers.views import AngularIndexView
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url('', views.IndexView.as_view(), name='index'),
|
url('', AngularIndexView.as_view(), name='index'),
|
||||||
]
|
]
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
# (c) Copyright 2015 Hewlett-Packard Development Company, L.P.
|
|
||||||
#
|
|
||||||
# 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 = 'angular.html'
|
|
@ -18,16 +18,16 @@
|
|||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.conf.urls import url
|
from django.conf.urls import url
|
||||||
|
from horizon.browsers.views import AngularIndexView
|
||||||
from openstack_dashboard.dashboards.admin.flavors import views
|
from openstack_dashboard.dashboards.admin.flavors import views
|
||||||
|
|
||||||
|
|
||||||
if settings.ANGULAR_FEATURES['flavors_panel']:
|
if settings.ANGULAR_FEATURES['flavors_panel']:
|
||||||
# New angular panel
|
# New angular panel
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(r'^$', views.AngularIndexView.as_view(), name='index'),
|
url(r'^$', AngularIndexView.as_view(), name='index'),
|
||||||
url(r'^create/$', views.AngularIndexView.as_view(), name='create'),
|
url(r'^create/$', AngularIndexView.as_view(), name='create'),
|
||||||
url(r'^(?P<id>[^/]+)/update/$', views.AngularIndexView.as_view(),
|
url(r'^(?P<id>[^/]+)/update/$', AngularIndexView.as_view(),
|
||||||
name='index'),
|
name='index'),
|
||||||
]
|
]
|
||||||
else:
|
else:
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
from django.core.urlresolvers import reverse_lazy
|
from django.core.urlresolvers import reverse_lazy
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django.views import generic
|
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
from horizon import tables
|
from horizon import tables
|
||||||
@ -35,10 +34,6 @@ from openstack_dashboard.dashboards.admin.flavors \
|
|||||||
INDEX_URL = "horizon:admin:flavors:index"
|
INDEX_URL = "horizon:admin:flavors:index"
|
||||||
|
|
||||||
|
|
||||||
class AngularIndexView(generic.TemplateView):
|
|
||||||
template_name = 'angular.html'
|
|
||||||
|
|
||||||
|
|
||||||
class IndexView(tables.DataTableView):
|
class IndexView(tables.DataTableView):
|
||||||
table_class = project_tables.FlavorsTable
|
table_class = project_tables.FlavorsTable
|
||||||
template_name = 'admin/flavors/index.html'
|
template_name = 'admin/flavors/index.html'
|
||||||
|
@ -18,15 +18,15 @@
|
|||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.conf.urls import url
|
from django.conf.urls import url
|
||||||
|
from horizon.browsers.views import AngularIndexView
|
||||||
from openstack_dashboard.dashboards.admin.images import views
|
from openstack_dashboard.dashboards.admin.images import views
|
||||||
|
|
||||||
if settings.ANGULAR_FEATURES['images_panel']:
|
if settings.ANGULAR_FEATURES['images_panel']:
|
||||||
# New angular images
|
# New angular images
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(r'^$', views.AngularIndexView.as_view(), name='index'),
|
url(r'^$', AngularIndexView.as_view(), name='index'),
|
||||||
url(r'^(?P<image_id>[^/]+)/detail/$',
|
url(r'^(?P<image_id>[^/]+)/detail/$',
|
||||||
views.AngularIndexView.as_view(), name='detail'),
|
AngularIndexView.as_view(), name='detail'),
|
||||||
]
|
]
|
||||||
else:
|
else:
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
|
@ -24,7 +24,6 @@ from django.conf import settings
|
|||||||
from django.core.urlresolvers import reverse
|
from django.core.urlresolvers import reverse
|
||||||
from django.core.urlresolvers import reverse_lazy
|
from django.core.urlresolvers import reverse_lazy
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django.views import generic
|
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
from horizon import messages
|
from horizon import messages
|
||||||
@ -42,10 +41,6 @@ from openstack_dashboard.dashboards.admin.images \
|
|||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class AngularIndexView(generic.TemplateView):
|
|
||||||
template_name = 'angular.html'
|
|
||||||
|
|
||||||
|
|
||||||
class IndexView(tables.DataTableView):
|
class IndexView(tables.DataTableView):
|
||||||
DEFAULT_FILTERS = {'is_public': None}
|
DEFAULT_FILTERS = {'is_public': None}
|
||||||
table_class = project_tables.AdminImagesTable
|
table_class = project_tables.AdminImagesTable
|
||||||
|
@ -18,14 +18,13 @@
|
|||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.conf.urls import url
|
from django.conf.urls import url
|
||||||
|
from horizon.browsers.views import AngularIndexView
|
||||||
from openstack_dashboard.dashboards.project.images.images import views
|
from openstack_dashboard.dashboards.project.images.images import views
|
||||||
from openstack_dashboard.dashboards.project.images import views as imgviews
|
|
||||||
|
|
||||||
|
|
||||||
if settings.ANGULAR_FEATURES['images_panel']:
|
if settings.ANGULAR_FEATURES['images_panel']:
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(r'^(?P<image_id>[^/]+)/$', imgviews.AngularIndexView.as_view(),
|
url(r'^(?P<image_id>[^/]+)/$', AngularIndexView.as_view(),
|
||||||
name='detail'),
|
name='detail'),
|
||||||
]
|
]
|
||||||
else:
|
else:
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.conf.urls import include
|
from django.conf.urls import include
|
||||||
from django.conf.urls import url
|
from django.conf.urls import url
|
||||||
|
from horizon.browsers.views import AngularIndexView
|
||||||
from openstack_dashboard.dashboards.project.images.images \
|
from openstack_dashboard.dashboards.project.images.images \
|
||||||
import urls as image_urls
|
import urls as image_urls
|
||||||
from openstack_dashboard.dashboards.project.images.snapshots \
|
from openstack_dashboard.dashboards.project.images.snapshots \
|
||||||
@ -30,7 +30,7 @@ from openstack_dashboard.dashboards.project.images import views
|
|||||||
if settings.ANGULAR_FEATURES['images_panel']:
|
if settings.ANGULAR_FEATURES['images_panel']:
|
||||||
# New angular images
|
# New angular images
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(r'^$', views.AngularIndexView.as_view(), name='index'),
|
url(r'^$', AngularIndexView.as_view(), name='index'),
|
||||||
url(r'', include(image_urls, namespace='images')),
|
url(r'', include(image_urls, namespace='images')),
|
||||||
url(r'', include(snapshot_urls, namespace='snapshots')),
|
url(r'', include(snapshot_urls, namespace='snapshots')),
|
||||||
]
|
]
|
||||||
|
@ -22,7 +22,6 @@ Views for managing Images and Snapshots.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django.views import generic
|
|
||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
from horizon import messages
|
from horizon import messages
|
||||||
@ -35,10 +34,6 @@ from openstack_dashboard.dashboards.project.images.images \
|
|||||||
import tables as images_tables
|
import tables as images_tables
|
||||||
|
|
||||||
|
|
||||||
class AngularIndexView(generic.TemplateView):
|
|
||||||
template_name = 'angular.html'
|
|
||||||
|
|
||||||
|
|
||||||
class IndexView(tables.DataTableView):
|
class IndexView(tables.DataTableView):
|
||||||
table_class = images_tables.ImagesTable
|
table_class = images_tables.ImagesTable
|
||||||
template_name = 'project/images/index.html'
|
template_name = 'project/images/index.html'
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
# (c) Copyright 2015 Hewlett-Packard Development Company, L.P.
|
|
||||||
#
|
|
||||||
# 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 openstack_dashboard.dashboards.project.ngdetails import views
|
|
||||||
|
|
||||||
|
|
||||||
urlpatterns = [
|
|
||||||
url('', views.IndexView.as_view(), name='index'),
|
|
||||||
]
|
|
@ -1,19 +0,0 @@
|
|||||||
# (c) Copyright 2015 Hewlett-Packard Development Company, L.P.
|
|
||||||
#
|
|
||||||
# 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 = 'angular.html'
|
|
@ -13,10 +13,9 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from django.conf.urls import url
|
from django.conf.urls import url
|
||||||
|
from horizon.browsers.views import AngularIndexView
|
||||||
from openstack_dashboard.dashboards.project.ngvolumes import views
|
|
||||||
|
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url('', views.IndexView.as_view(), name='index'),
|
url('', AngularIndexView.as_view(), name='index'),
|
||||||
]
|
]
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
# (c) Copyright 2016 NEC Corporation, L.P.
|
|
||||||
#
|
|
||||||
# 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 = 'angular.html'
|
|
Loading…
x
Reference in New Issue
Block a user