instance description is shown only when it has a value

Bug #1737558 reported by Akihiro Motoki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Low
Akihiro Motoki

Bug Description

In the instance detail page, the description field is only shown when the description of a corresponding server has non-empty string. It is better to display "description" field regardless of its value.

[detail]
Nova API returns 'null' (python None) for description field if no description is set for the server.
The current _detail_overview.html checks {% if instance.description != None %} but it leads to a confused situation.

I guess this was introduced to support an older nova APi version without description support, but there is no good way to distinguish no description field and empty description. There is also no good way to handle False and None separately in django template filter (without creating a new attribute like has_description). Having a new attribute like has_description works but I think it is too much, and the recent releases of nova support description field, so no check looks needed.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to horizon (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/527156

Changed in horizon:
assignee: nobody → Akihiro Motoki (amotoki)
status: New → In Progress
Akihiro Motoki (amotoki)
Changed in horizon:
milestone: none → queens-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/527156
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=84216cb0f55481742340fab0f835407eefcb47fd
Submitter: Zuul
Branch: master

commit 84216cb0f55481742340fab0f835407eefcb47fd
Author: Akihiro Motoki <email address hidden>
Date: Tue Dec 12 01:37:04 2017 +0900

    Always display server description

    The description field is only shown when the description of
    a corresponding server has non-empty string. It is better to
    display "description" field regardless of its value.

    "description" field is supported since Mitaka release, so
    this commit always shows 'description' field rather than
    showing the field conditionally.

    Change-Id: I2064c6e8a625d4362ce00218528a09ef734087fc
    Closes-Bug: #1737558

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 13.0.0.0b3

This issue was fixed in the openstack/horizon 13.0.0.0b3 development milestone.

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.