summaryrefslogtreecommitdiff
path: root/openstack_dashboard/dashboards/identity/roles/urls.py
diff options
context:
space:
mode:
authorchen.qiaomin@99cloud.net <chen.qiaomin@99cloud.net>2016-07-22 11:32:09 +0800
committerCindy Lu <clu@us.ibm.com>2017-01-04 11:54:59 -0800
commit001c2a1879fd4e2f0dc594da4d4429be0c43c9a5 (patch)
tree7491059c19e581864957f84dae7abe04e6314e0c /openstack_dashboard/dashboards/identity/roles/urls.py
parente5dac64cb0aac2176d5a608b155976f5375d6a7e (diff)
downloadhorizon-001c2a1879fd4e2f0dc594da4d4429be0c43c9a5.tar.gz
Adding identity ng-roles panel
This patch adds an angular roles table. To be added in subsequent patches: - Actions - filterFacets - Integration to Searchlight To test, v3 needs to be enabled in local_settings.py and set 'roles_panel' to True in settings.py Change-Id: Ie0eb168774f15536c778917abeb293e79d3b34e8 Co-Authored-By: Allen <chen.qiaomin@99cloud.net> Co-Authored-By: kenji-i <ken-ishii@sx.jp.nec.com> Co-Authored-By: Richard Jones <r1chardj0n3s@gmail.com> Partially-implements: blueprint ng-roles
Diffstat (limited to 'openstack_dashboard/dashboards/identity/roles/urls.py')
-rw-r--r--openstack_dashboard/dashboards/identity/roles/urls.py22
1 files changed, 16 insertions, 6 deletions
diff --git a/openstack_dashboard/dashboards/identity/roles/urls.py b/openstack_dashboard/dashboards/identity/roles/urls.py
index e0b50ba3a..4de1216fe 100644
--- a/openstack_dashboard/dashboards/identity/roles/urls.py
+++ b/openstack_dashboard/dashboards/identity/roles/urls.py
@@ -12,13 +12,23 @@
# License for the specific language governing permissions and limitations
# under the License.
+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.roles import views
-urlpatterns = [
- url(r'^$', views.IndexView.as_view(), name='index'),
- url(r'^(?P<role_id>[^/]+)/update/$',
- views.UpdateView.as_view(), name='update'),
- url(r'^create/$', views.CreateView.as_view(), name='create'),
-]
+if settings.ANGULAR_FEATURES.get('roles_panel', False):
+ # New angular panel
+ title = _('Roles')
+ urlpatterns = [
+ url(r'^$', AngularIndexView.as_view(title=title), name='index'),
+ ]
+else:
+ urlpatterns = [
+ url(r'^$', views.IndexView.as_view(), name='index'),
+ url(r'^(?P<role_id>[^/]+)/update/$',
+ views.UpdateView.as_view(), name='update'),
+ url(r'^create/$', views.CreateView.as_view(), name='create'),
+ ]