Admin/Flavors View Extra Specs does not render as a modal

Bug #1276735 reported by David Lapsley
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Invalid
Low
Unassigned

Bug Description

Each entry in the flavors table under admin/flavors has a row_action "More/View Extra Specs". This renders a modal as a separate page view instead of a modal.

To reproduce this problem (assuming you are running devstack):

1. Login as admin user
2. Select the Admin project
3. Select the Admin panel
4. Click on the Flavors Panel in the sidebar
5. For one of the rows in the flavors table, click the More button and select "View Extra Specs"

You will be redirected to another page showing the View Extra Specs form information (instead of a modal).

David Lapsley (dlapsley)
Changed in horizon:
assignee: nobody → David Lapsley (dlapsley)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

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

Changed in horizon:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
David Lapsley (dlapsley) wrote :

Please ignore fix #2 above. Accidentally linked a different review.

Revision history for this message
David Lapsley (dlapsley) wrote :

Hi Folks: after some more investigation, I've put together a patch that addresses the issue. Here is a description of the problem and the rationale for the posted fix.

Horizon currently has a modal_stack that enables a sequence of modals to be displayed in order. A modal can launch a child modal, and once the child modal has been submitted, the original modal can be popped off the stack and redisplayed. This functionality is supported by a lightweight, predominantly client-side front end. Horizon also provides a workflow feature, that enables similar functionality, however, this is supported by a heavier weight, set of server- and client-side modules.

Unfortunately, the modal_stack feature was never fully implemented. The result is that any modal that is launched from another modal will be redirected to a view in which the parent modal is rendered embedded within a page. The following comment from gabriel in the server-side code (horizon.forms.views) provides some insight into the original intention of this functoinality:

    TODO(gabriel): This is not a long-term solution to how
    AJAX should be handled, but it's an expedient solution
    until the blueprint for AJAX handling is architected
    and implemented.

    response['X-Horizon-Location'] = success_url

The resulting behavior is a very pragmatic workaround for several issues:

1. Child modals may alter the state of the parent modal, so without a redirect and full redraw of the parent modal, the data in the modal may be out dated.
2. The current implementation of the messaging system is not able to show success/error messages while a modal is active (this is due to a bug in the implementation).

However, from a user experience point of view, it is undesirable for several reasons:

1. It requires a full page redraw to return to the parent modal
2. The parent modal is redrawn embedded within a full page, which does not look very good.
3. The success/error messages are only shown on the next page redraw.

The submitted patch corrects this behavior with a few very minor changes in code, that fix bugs/oversights in the original design.

The specific use case addressed is for the admin/flavors "View Extra Specs" row_action. Please note:

1. The original intent of the modal_stack was precisely for this use case.
2. This issue could also be addressed by re-implementing admin/flavors/View Extra Specs as a workflow (although this is substantially more effort, and requires significantly more invasive restructuring of the code). 3. This work is a minimally invasive fix for a specific class of bug, it could also be extended to be a more generic framework as part of a blue print.

Changed in horizon:
importance: Undecided → Low
Revision history for this message
Timur Sufiev (tsufiev-x) wrote :

Hello, David

Your fix is great, I'm eager to see it merged into horizon master! Judging by the time you set WIP on it (12 May, more than 4 months ago), it seems that you've encountered some difficulties in fixing the last bits of it. Could you share them, so I could provide some help in finalizing your efforts?

Revision history for this message
Travis Tripp (travis-tripp) wrote :

This no longer affects Flavors. This base problem still exists for other dialogs of this type. However, for Flavors, Host Aggregates, and Images, this functionality has been replaced by the new Update metadata widget. This new widget retrieves available metadata published to the Glance Metadata Definition catalog and makes it easy to populate extra specs.

Related bugs:
https://review.openstack.org/#/c/104956/
https://review.openstack.org/#/c/112874/
https://review.openstack.org/#/c/110612/

See also:
http://docs.openstack.org/developer/glance/metadefs-concepts.html

It should be noted that the base modal problem still affects Cinder Volume Type extra specs. This was added late in Juno. In Kilo, we hope to also replace extra specs dialog with the new metadata widget. https://review.openstack.org/#/c/112880/

Revision history for this message
Travis Tripp (travis-tripp) wrote :

Note: If you open the dialog and don't have and available metadata definitions, it probably means you didn't load the metadata definitions into Glance. This is done automatically by devstack. However, if you don't have a devstack install, you will need to go to CLI where glance is installed and run:

glance-manage db_load_metadefs

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by David Lyle (<email address hidden>) on branch: master
Review: https://review.openstack.org/71330
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Revision history for this message
Ivan Kolodyazhny (e0ne) wrote :

We have to check if it's still actual.

Changed in horizon:
status: In Progress → New
assignee: David Lapsley (dlapsley) → nobody
Revision history for this message
Ying Zuo (yingzuo) wrote :

Flavors Extra Specs has been removed from Horizon a few releases back.

Changed in horizon:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.