Public bug reported:

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.


Details:
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

<hz-resource-property-list
    resource-type-name="OS::Designate::FloatingIp"
    item="ctrl.item"
    property-groups="[
      ['address', 'ptrdname', 'description', 'id', 'ttl', 'status', 'action']
    ]">
</hz-resource-property-list>

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

$scope.context.loadPromise.then(onGetResponse);
function onGetResponse(response) {
  ctrl.item = response.data;
}

** Affects: horizon
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1616252

Title:
  hz-field breaks with late binding 'item'

Status in OpenStack Dashboard (Horizon):
  New

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.

  
  Details:
  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

  <hz-resource-property-list
      resource-type-name="OS::Designate::FloatingIp"
      item="ctrl.item"
      property-groups="[
        ['address', 'ptrdname', 'description', 'id', 'ttl', 'status', 'action']
      ]">
  </hz-resource-property-list>

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

  $scope.context.loadPromise.then(onGetResponse);
  function onGetResponse(response) {
    ctrl.item = response.data;
  }

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1616252/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to