← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1572686] Re: Metadata widget errors and problems with changing metadata

 

Reviewed:  https://review.openstack.org/315282
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=6ad36e0e5706f0b0a89269ccfa694dee82fd712c
Submitter: Jenkins
Branch:    master

commit 6ad36e0e5706f0b0a89269ccfa694dee82fd712c
Author: Travis Tripp <travis.tripp@xxxxxxx>
Date:   Wed May 11 16:58:47 2016 -0600

    Fix existing metadata display in metadata widget
    
    The metadata widget displays both available and existing
    metadata for a given resource. For example, on images
    you can click "Update Metadata" and it will show you
    all of the metadata that you can apply on the left
    and all the metadata that is already on the image
    on the right. This is basically a vertical transfer
    table.
    
    Available metadata is structure as a tree and the
    actual properties are "leaf" nodes. When you
    transfer from left to right it is only supposed to
    show actual properties and not the "folders". These
    are the leaf nodes.
    
    This was handled by filtering with the built in
    angular filter [0] and was relying on a property
    "leaf" to be set to null. However, in doing research,
    I found that the way angular handles null in filtering
    changes between angular versions [0]. I tried various
    options and could not seem to make it work, so this
    patch changes from setting leaf from null to false.
    
    This fix removes the console log, but also removes
    an issue where sometimes you couldn't remove metadata
    item that had previously been saved.
    
    [0] http://stackoverflow.com/questions/18644412/angularjs-filter-not-null
    
    Change-Id: Ib93890d40b8103c378bb806015e50f3baa2b4fc6
    Closes-Bug: 1572686


** Changed in: horizon
       Status: In Progress => Fix Released

-- 
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/1572686

Title:
  Metadata widget errors and problems with changing metadata

Status in OpenStack Dashboard (Horizon):
  Fix Released

Bug description:
  Seeing the following error in the Update Metadata widget, in both
  Launch Instance and from Images:

  angular.js:11707 TypeError: Cannot read property 'type' of null
      at new MetadataTreeItemController (metadata-tree-item.controller.js:35)
      at Object.invoke (angular.js:4219)
      at extend.instance (angular.js:8525)
      at angular.js:7771
      at forEach (angular.js:334)
      at nodeLinkFn (angular.js:7770)
      at delayedNodeLinkFn (angular.js:8048)
      at compositeLinkFn (angular.js:7149)
      at nodeLinkFn (angular.js:7795)
      at compositeLinkFn (angular.js:7149)

  Refers to this line of code:
  https://github.com/openstack/horizon/blob/b0f3ec3ace531c110f328d208cded302d2617f88/horizon/static/framework/widgets/metadata/tree
  /metadata-tree-item.controller.js#L35

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


References