hz-field breaks with late binding 'item'

Bug #1616251 reported by Tyr Johanson
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Hengqing Hu

Bug Description

Normal usage of hz-resource-property-list will break hz-field because the "item" is loaded asynchronously. Notice the use of a link function which inspects the "item" attribute, but doesn't watch it.

NOTE: A simple work around until this can be made more dynamic is to use "ng-if='ctrl.item'" on the hz-resource-property-list.

Using hz-resource-property-list on a details view within a routed-details-view. The specific item is provided by the routed-details-view ctrl.context.loadPromise. The natural usage in my template is

      ['address', 'ptrdname', 'description', 'id', 'ttl', 'status', 'action']

where ctrl.item is set by the result of the context load promise.

function onGetResponse(response) {
  ctrl.item = response.data;

Tags: angularjs
tags: added: angularjs
Changed in horizon:
milestone: none → next
Changed in horizon:
importance: Undecided → Low
Revision history for this message
Hengqing Hu (hudayou) wrote :

I have met the same problem in octavia-dashboard, when use did some action, the detail page is not updated because of that.


Revision history for this message
Akihiro Motoki (amotoki) wrote :

This affects multiple repos as mentioned in comment #1. It sounds better to raise the priority.

Changed in horizon:
milestone: next → rocky-2
importance: Low → High
Revision history for this message
Akihiro Motoki (amotoki) wrote :
Changed in horizon:
assignee: nobody → Hengqing Hu (hudayou)
Changed in horizon:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

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

commit d175d33037abd8a9ec00c101718d80a6bb30d915
Author: Jacky Hu <email address hidden>
Date: Sun Apr 15 19:44:59 2018 +0800

    Watch field item changes

    To allow fields in hz-resource-property-list to be refreshed upon

    Change-Id: I8f2dffad0fb28bd5b8d0a019ed28268fb8cbcd60
    Closes-Bug: #1616251

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

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

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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