Inappropriate UI in Horizon Dashboard

Bug #1821115 reported by Takashi Kuroda on 2019-03-21
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Undecided
Riedo Ilofin

Bug Description

Release: OSP 15 Stein

1. Create application credential WITHOUT ticking "Unrestricted (dangerous)" checkbox.
     "Identity" -> "Application Credentials" -> "+Create Application Credential"
2. Show details of application credential created above.
3. "maybe" is shown in "Unrestricted" field.

NOTE 1: Localised UI corresponds to this "maybe" (at lease Japanese).
NOTE 2: In case of checking "Unrestricted (dangerous)", "yes" is shown.

Takashi Kuroda (tkuroda) wrote :
Yuko Katabami (ykatabam) wrote :

I got the following information by an engineer who looked into the code.
It seems that "None" should be changed to "False". It was tested and verified in devstack.
Please take a look.
Hope this is helpful!

[root@devstack horizon]# git diff
diff --git a/openstack_dashboard/dashboards/identity/application_credentials/forms.py b/openstack_dashboard/dashboards/identity/application_credentials/forms.py
index 5b6286f..447524a 100644
--- a/openstack_dashboard/dashboards/identity/application_credentials/forms.py
+++ b/openstack_dashboard/dashboards/identity/application_credentials/forms.py
@@ -94,7 +94,7 @@ class CreateApplicationCredentialForm(forms.SelfHandlingForm):
                 secret=data['secret'] or None,
                 expires_at=expiration or None,
                 roles=roles,
- unrestricted=data['unrestricted'] or None
+ unrestricted=data['unrestricted'] or False
             )
             self.request.session['application_credential'] = \
                 new_app_cred.to_dict()

After creating application credential without selecting "Unrestricted
(dangerous)" checkbox,

it was confirmed that "no/いいえ" is shown in "Unrestricted" field as
expected.

Thank you very much.

Taka

On 2019年04月05日 10:18, Yuko Katabami wrote:
> I got the following information by an engineer who looked into the code.
> It seems that "None" should be changed to "False". It was tested and verified in devstack.
> Please take a look.
> Hope this is helpful!
>
>
> [root@devstack horizon]# git diff
> diff --git a/openstack_dashboard/dashboards/identity/application_credentials/forms.py b/openstack_dashboard/dashboards/identity/application_credentials/forms.py
> index 5b6286f..447524a 100644
> --- a/openstack_dashboard/dashboards/identity/application_credentials/forms.py
> +++ b/openstack_dashboard/dashboards/identity/application_credentials/forms.py
> @@ -94,7 +94,7 @@ class CreateApplicationCredentialForm(forms.SelfHandlingForm):
> secret=data['secret'] or None,
> expires_at=expiration or None,
> roles=roles,
> - unrestricted=data['unrestricted'] or None
> + unrestricted=data['unrestricted'] or False
> )
> self.request.session['application_credential'] = \
> new_app_cred.to_dict()
>

Yuko Katabami (ykatabam) wrote :

I was suggested that the following is probably where the string "maybe" is coming from:
https://docs.djangoproject.com/en/2.2/ref/templates/builtins/#yesno

Riedo Ilofin (r9n) on 2019-04-10
Changed in horizon:
assignee: nobody → Riedo Ilofin (r9n)

Fix proposed to branch: master
Review: https://review.openstack.org/651678

Changed in horizon:
status: New → In Progress
Changed in horizon:
assignee: Riedo Ilofin (r9n) → Ivan Kolodyazhny (e0ne)
Changed in horizon:
assignee: Ivan Kolodyazhny (e0ne) → Riedo Ilofin (r9n)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers