Commit Graph

40 Commits

Author SHA1 Message Date
Akihiro Motoki cd7c1b5110 Address RemovedInDjango40Warning (2)
django.utils.translation.ugettext(), ugettext_lazy(), ugettext_noop(),
ungettext(), and ungettext_lazy() are deprecated in favor of the
functions that they’re aliases for: django.utils.translation.gettext(),
gettext_lazy(), gettext_noop(), ngettext(), and ngettext_lazy().

https://docs.djangoproject.com/en/4.0/releases/3.0/#id3

Change-Id: I77878f84e9d10cf6a136dada81eabf4e18676250
2022-02-04 16:22:07 +09:00
Zuul f90c3cd501 Merge "Use python3-style super()" 2020-10-27 04:42:53 +00:00
Akihiro Motoki e5d09edc20 Use python3-style super()
In python3, super() does not always require a class and self reference.
In other words, super() is enough for most cases.
This is much simpler and it is time to switch it to the newer style.

pylint provides a check for this.
Let's enable 'super-with-arguments' check.

NOTE: _prepare_mappings() method of FormRegion in
openstack_dashboard/test/integration_tests/regions/forms.py is refactored.
super() (without explicit class and self referece) does not work when
a subclass method calls a same method in a parent class multiple times.
It looks better to prepare a separate method to provide a common logic.

Change-Id: Id9512a14be9f20dbd5ebd63d446570c7b7c825ff
2020-10-15 14:37:20 +09:00
Walter Doekes 612942bdf7
users: Correct lock_password status visibility (Yes/No) in user details
Before this change, it would always say No, regardless of actual
setting.

Change-Id: Ib30d818ecae7b8edd33e94ad2c3c0e2ad8e01822
Closes-Bug: #1897269
2020-10-06 10:13:07 +02:00
Ivan Kolodyazhny ee6fa9a245 Remove Keystone v2 related code
Kyestone V2 support was removed in Train, so it's safe to do such cleanup.

* Functions which just return horizon settings are dropped and
  the settings are referred directly now.
* The service catalog in the sample test data is updated to match
  the format of the keystone API v3.
* Related to the above change of the sample service catalog,
  openstack_dashboard.test.unit.api.test_keystone.ServiceAPITests is
  updated to specify the region name explicitly because 'RegionTwo'
  endpoint is no longer the second entry of the endpoint list in the
  keystone API v3.

Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: Ib60f360c96341fa5c618595f4a9bfdfe7ec5ae83
2020-04-23 11:43:12 +09:00
vmarkov 7f849239ea Support for Keystone password_lock option
This feature was added in Keystone V3 API. Proposed patch adds support
to Horizon

Co-Authored-By: Ivan Kolodyazhny <e0ne@e0ne.info>
Closes-bug: #1766485
Change-Id: Ic20a58c76826d703b43fa6a2d77ae5f77dcda1f4
2020-04-10 13:22:53 +03:00
Akihiro Motoki ec970fd6e8 Handle partial dict setting
In Train cycle, we moved the definition of default values
to openstack_dashboard/defaults.py. The current code accesses
a dict member using []. It requires operators to define a dict
setting with a full member.

This commit allows to use dict-type settings with partial members.

A new function is introduced to retrieve a dict-type setting
considering default values defined in
{openstack_dashboard,horizon,openstack_auth}/defaults.py

Change-Id: I7ff0ad4bca698aef9c0eba370b0570200a14367a
Closes-Bug: #1843104
2019-09-26 14:31:17 +09:00
Akihiro Motoki 8653f718f2 Define default settings explicitly (openstack_dashboard 4/5)
This commit mainly covers settings
in openstack_dashboard/dashboards/identity/.

Part of blueprint ini-based-configuration
Change-Id: Ibb174f62d0047a10b2832dd2ff350f5f32955b08
2019-07-05 14:49:11 +09:00
Akihiro Motoki 53486be43f Define default settings explicitly (openstack_dashboard 2/5)
This commit mainly covers settings
in openstack_dashboard/dashboards/admin/.

Part of blueprint ini-based-configuration
Change-Id: Ifb3e9401a926ba9e035e1b498a4a4493c1b594f5
2019-04-24 02:32:47 +09:00
Zuul 4242987e42 Merge "Show domain info in project and user detail panel" 2019-02-12 21:54:18 +00:00
Zuul c9536342c2 Merge "pylint: fix len-as-condition warning" 2019-01-16 14:25:39 +00:00
Akihiro Motoki e9f75a7bcb pylint: fix useless-super-delegation warning
Change-Id: Iddea27e720dc7184fa3d524a2a465732f18d4dee
2019-01-16 13:05:09 +09:00
Akihiro Motoki c076db20c8 pylint: fix len-as-condition warning
Change-Id: Ib89c1854ad42b96e4caf281160d568fe98430afe
2019-01-16 12:56:20 +09:00
Akihiro Motoki 3a584a90c1 Show domain info in project and user detail panel
Domain info in the user detail panel was previously displayed
but it has been broken after the user detail panel was tabbified.
This commit fixes the handling of context data. This covers
domain_name, project_name and extras.
Similar change is applied to the project detail panel too.

Change-Id: I575ae9697783c36fdae5dd397d6783b979d0c4a6
Closes-Bug: #1809284
2019-01-13 02:58:56 +09:00
David Gutman ac93358932 Change user details view in a tab view
Change the existing user details view into a tabbed view with
currently just one tab (overview tab) which presents general
informations of the user.

This is done to be able to add other tabs to the user details
view.

Change-Id: I38a33a3b218caf5d76eabd513e22aa118cc26ea1
Partial-Bug: #1792524
2018-09-14 09:32:43 +02:00
Akihiro Motoki e477eafa45 django2: Replace django.core.urlresolves with django.urls
(In Django 2.0) The django.core.urlresolvers module is removed
in favor of its new location, django.urls.
It was depreacted in Django 1.10:
https://docs.djangoproject.com/en/2.0/releases/1.10/#id3

blueprint django2-support
Change-Id: I46ab5c325491274b8eaffbf848e5d80f83c2fd26
2018-02-17 01:36:48 +09:00
wei.ying 5d8c8fb85b Fix unauthorized exception in users panel
If a member role user login and use admin to get keystoneclient,
but he is not a super user, then a notAuthorized exceptions will be raised,
it seems to be unreasonable.

The following actions will throw unauthorized exception.

Go to Users panel, Click user name , Click Change Password,
Submit Change Password form.

Change-Id: I4f6486b92f023ad0daecfff51e3a1ed16b0e78c0
Closes-Bug: #1684475
2017-04-30 06:11:43 +08:00
Gábor Antal 34a3aa0ba8 Handle log message interpolation by the logger
According to OpenStack Guideline[1], logged string message should be
interpolated by the logger.

[1]: http://docs.openstack.org/developer/oslo.i18n/guidelines.html#adding-variables-to-log-messages
Change-Id: I51f50935f1eeffe4960562d6309dfdf05814e595
Closes-Bug: #1596829
2017-03-31 20:59:16 +09:00
Akihiro Motoki baa4ca8dce hacking: noqa cleanup in openstack_dashboard
attribute-level imports are not checked by hacking module now.
most noqa is used to disable warnings on attribute-level imports.
This commit drops noqa for this purpose.

After this, there are only 3 noqa under openstack_dashboard/ :)

Change-Id: I4a449802f5dbd6e44e4b8b5c378a555d47d9a99f
2017-03-17 19:38:47 +00:00
Radomir Dopieralski 8b839938bc Disentangle domain context from effective domain
Since the existence of a domain token was equivalent with having
selected a domain context with Keystone V2, some code confuses the
two. This is no longer true for Kestone V3, so we have to separate
the two concepts and use domain context when we mean the domain
context.

Close-bug: #1661537

Change-Id: Ifa66d8c397e34d16a4534e7216eb11c752699505
2017-02-13 11:40:57 +01:00
Luis Daniel Castellanos 33fcd95caf Implement "filter first" for identity panels
Implemented the "filter first" for the following identity panels:
- Users
- Groups
- Roles
- Projects

The functionality helps horizon not to hang and timeout when there is
a large set of identity resources to display. It can be turned on and
off easily.

In a subsequent patch set the same functionality will be added to
other identity views such as Project > Manage Members

Change-Id: I6e569712fb5159552a27271837cf2629059f5894
2017-01-19 15:32:20 -06:00
Rob Cresswell 83e3ff88ec Remove duplicated modal_header statements
Across the codebase we've been using modal_header values that are
identical (or very close to) the page_title values. This patch sets the
modal_header to default to the page_title value, and cleans up a few
inconsistencies. Also deleted a couple of redundant submit_label values
that were identical to the default ("Submit").

Change-Id: I88815c3801c29b3fbc41e0cb426a50653255595f
Closes-Bug: 1653960
2017-01-04 13:31:36 +00:00
Yakup Adakli 124bbb3d82 AngularJS based panels page title updated
to more logical ones instead of "Horizon - OpenStack Dashboard".

Change-Id: Ia230ba28e011e99142e7fd2379fe1735ccd0b010
Closes-Bug: #1647855
2016-12-15 15:01:37 +03:00
jing.liuqing 1ee056fa7e Update Angular Users Table use registry
This patch updates an angular users table.

To be added in subsequent patches:
 - Detail Table
 - Actions
 - filterFacets
 - Integration to Searchlight

To Test
 - change 'users_panel' to True in settings.py

Change-Id: I3c4cb39d80adc9aa207e56dc72a936f567f5b4d1
Partially-Implements: blueprint ng-users
2016-11-11 15:54:48 -08:00
Eddie Ramirez bc1fb4910b Server-side filtering for Identity
Implements server-side filtering in Identity->Projects

Projects (Only V3 supports server filtering)
Users (Only V3 supports server filtering)
Groups
Roles

This filtering method allows a user to filter by
several fields:
- Name
- UUID
- Enabled

Cannot implement filter by email ttps://review.openstack.org/#/c/110970/

Implements blueprint: server-side-filtering
Co-Authored-By: Daniel Castellanos <luis.daniel.castellanos@intel.com>

Change-Id: I37d6afdef84593e2779d21bec0c2f55e2794ab78
2016-09-13 10:06:27 -05:00
Kenji Ishii ab11eef92a Supports extra properties in project and user
This change is to support extra properties in project and user.
To show an extra property in project/user table, you can customize.
The explanation of the method to add an extra property is added
by this patch.
In addition, when you do a create or update user, you can specify a
value of extra property by setting in local_settings.py

Change-Id: Ifee491f2a55d9207fe5da70136f749e1fc4bab82
Implements: blueprint support-extra-prop-for-project-and-user
2016-08-21 22:13:35 +09:00
daniel-a-nguyen 2b846515f3 Retrieve domain scoped token
This patch supports using domain scoped tokens against keystone v3.

Use Cases:

Cloud Admin - view and manage identity resources across domains
Domain Admin - view and manage identity resources in the domain logged in
User - view identity project in the domain logged in

Regression:

Supports keystone v2 through local_settings.py configuration
Supports keystone v3 with multidomain = False
Supports keystone v3 with mulitdomain = True

Relates to https://review.openstack.org/#/c/141153/

Background on how to test is here
https://wiki.openstack.org/wiki/Horizon/DomainWorkFlow

Co-Authored-By: Brad Pokorny <Brad_Pokorny@symantec.com>
Co-Authored-By: Brian Tully <brian.tully@hp.com>
Co-Authored-By: Michael Hagedorn <mike.hagedorn@hp.com>
Co-Authored-By: woomatt <matt.wood@hp.com>

Partially Implements: blueprint domain-scoped-tokens

Closes-Bug: #1413851
Change-Id: Iaa19bfef9b0c70304ff81d083c62b218b2d02479
2016-03-08 15:17:38 -08:00
kenji-ishii bf8f8702de Display user's description in user detail
In the case of using keystone v3, user's description is
displayed in user list, but it is not displayed in user
detail. I think we should display just like a user list.

Change-Id: I113a8e5060481b6715acfa936c21ebdc0f4aae29
Closes-Bug: #1522655
2015-12-07 18:40:18 +09:00
Itxaka b817eaf4cd description field was missing from the initial values
description field was missing from the initial values on
the UpdateView modal.
Adds a test to check that the proper values are
initialized

Change-Id: Ief1a59f228c652a60f4dd44138218a55681edb18
Closes-Bug: 1520177
2015-11-27 17:04:05 +01:00
Rob Cresswell d861d6848b Add breadcrumbs to final details pages
This patch adds the breadcrumb navigation to the final few details
pages: Users, Load Balancers, Projects, Hypervisors.

- Small redesigns the Load Balancer page to make the Member/Monitor
listings more readable
- Small redesign of Monitor Details to make Pools list more readable
- Adds missing translation wrapper to subnets breadcrumb

At this point, all Details pages should now use the breadcrumb format,
with the exception of Network Details, which is waiting on
https://bugs.launchpad.net/horizon/+bug/1416838

Closes-Bug: 1413823
Closes-Bug: 1100318
Change-Id: I3a1de6d24dfd49ae2e28107e9de76bbd9d972162
2015-11-15 20:15:37 +00:00
chenqiaomin 7eae1b69ad Display the project name in user detail page
In the user detail page, only display the "Project ID",
now display the "Project Name" corresponding to the
"Project ID".

Change-Id: Id54352a2659146787a913f26df9d49d0ae84261d
Closes-Bug: #1479171
2015-09-04 12:50:10 +00:00
Cindy Lu 9620cbac91 move Users Edit Password into separate form
Based on inline TODO comment.
Code refactor.
Fix unused test case (was not used as helper method and
was not prefixed with 'test_' so it was not used).

Change-Id: Ie696970b4b61d699cc4afa5174248df6c00c688d
Closes-Bug: #1402047
2015-02-18 17:50:20 -08:00
Jenkins e16bf06120 Merge "Reduce page title duplication in Identity views" 2015-02-13 22:46:59 +00:00
Cindy Lu 81f3ce638f remove duplicate line from users/views.py
Change-Id: I6b50b65df93ccc55d8462eed382c32cd3a9aef45
2015-02-12 10:28:51 -08:00
Sam Betts 7365c0c88e Reduce page title duplication in Identity views
Patch https://review.openstack.org/#/c/142802 adds a method of
reducing duplication of page title logic, this patch applies that change
to the identity views.

Change-Id: I2f240a8b6a0ac76078a930bdf760e1cbab21e0cc
Partial-Bug: 1413749
2015-02-12 11:47:35 +00:00
Thai Tran ba97e645bc Clean modal forms in Identity Users
Refactoring identity users modals.
Based on merged patch: https://review.openstack.org/#/c/123472/

Change-Id: Ic3777e3b4db185eb17f988c4d9567313108b0171
Partially-Implements: blueprint form-template-to-view
2015-01-27 23:43:01 +00:00
nikunj2512 592f489564 Create a "user details" page
This patch add the detail page for the "User" table/resource.

Change-Id: I907a3727cfeb62b7924d823578a219625b8493e8
Closes-bug: #1380595
2014-12-19 12:35:50 +05:30
Akihiro Motoki 832a741c88 Fix E128 errors in remaining openstack_dashboard/
E128 continuation line under-indented for visual indent

Closes-Bug: #1375929
Change-Id: I2a72313d359bdfe2e2667eba5d3bf9744ec8f60a
2014-10-16 16:53:52 +09:00
Akihiro Motoki 05068093a5 Fix E127 errors in other openstack_dashboard/dashboards/
E127 continuation line over-indented for visual indent

Partial-Bug: #1375931
Change-Id: Idad463a925d622908662942dc8a58ce888242f28
2014-10-11 13:33:28 +09:00
David Lyle 18e8ea810d Separating Identity Dashboard and using RBAC
Moving identity panels to their own dashboard.

RBAC is now used to determine the data to load in the identity
dashboard. Using the default policy file, a user with role member
will now be able to see their project list.

Also, adding a policy check mechanism at the panel and dashboard
level to determine which panels and dashboards the user can access.

Implements blueprint separate-identity-dash

Change-Id: I7ebfec2bf6e44899bec79d3b23c90d56a976200f
2014-08-18 16:40:56 -06:00