converting a CharmBrowser model instance to a Charm instance is duplicated

Bug #1200254 reported by Richard Harding
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-gui
Triaged
Medium
Unassigned

Bug Description

In subapps/browser/views/charm.js _addCharmEnvironment we convert a BrowserCharm into a Charm instance. That logic is duped in the charm-token.js widget in _addDraggability (it's actually passed the data for that from a View). This means there's two place to keep the logic on correcting the id and config ATTRS of the Charm model instance.

I'd suggest the Charm model instance gain a helper to initFromBrowserCharm(), or something along those lines) that can keep this mapping in one place and be reused for the drag-n-drop and manual deploy work.

Tags: charmbrowser
Revision history for this message
Gary Poster (gary) wrote :

See also bug 1200008

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.