Merge lp:~jcsackett/juju-gui/charm-unification-cleanup into lp:juju-gui/experimental
Proposed by
j.c.sackett
Status: | Merged |
---|---|
Merged at revision: | 951 |
Proposed branch: | lp:~jcsackett/juju-gui/charm-unification-cleanup |
Merge into: | lp:juju-gui/experimental |
Diff against target: |
96 lines (+13/-30) 1 file modified
app/models/charm.js (+13/-30) |
To merge this branch: | bzr merge lp:~jcsackett/juju-gui/charm-unification-cleanup |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju GUI Hackers | Pending | ||
Review via email: mp+180008@code.launchpad.net |
Description of the change
Minor clean ups from model unification.
* XXX notes have been consolidated to indicate what should actually be done once
possible.
* The checks in BrowserCharm.parse have been updated based on investigation into
the PyJuju and GoJuju environments. As the data passed is consistently in one
form or another, we now just check if "config" exists and parse
the data as needed in that case.
To post a comment you must log in.
Reviewers: mp+180008_ code.launchpad. net,
Message:
Please take a look.
Description:
Minor clean ups from model unification.
This began as an effort to do some cleanup from the charm unification
work.
However, the real cleanup consists of removing models.Charm, which we
have
elected to not do at this time, and removing the Charm View code (and
related
attributes on BrowserCharm). The latter cannot be done until the Service
Inspector is no longer feature flagged.
* XXX notes have been consolidated to indicate what should actually be provides" .
done once
possible.
* The checks in BrowserCharm.parse have been updated based on
investigation into
the PyJuju and GoJuju environments:
* * Go Juju and Py Juju both pass "subordinate", "config", and
"requires/
* * Fake backend doesn't actually pass this information in at all, as
charms only
reach parse on deploy from the charm browser.
* * Charm browser passes in the browsercharm attributes, e.g.
"is_subordinate".
* * As the data is consistent, we now just check if "config" exists and
parse
the data as needed in that case.
https:/ /code.launchpad .net/~jcsackett /juju-gui/ charm-unificati on-cleanup/ +merge/ 180008
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/12897043/
Affected files:
A [revision details]
M app/models/charm.js
Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: <email address hidden>
+New revision: <email address hidden>
Index: app/models/charm.js charm.js' create( 'charm' , Y.Model, [], {
=== modified file 'app/models/
--- app/models/charm.js 2013-08-12 17:39:36 +0000
+++ app/models/charm.js 2013-08-13 21:34:51 +0000
@@ -111,6 +111,9 @@
*
* @class Charm
*/
+ // XXX jcsackett Aug 12 2013 Charm model is only being kept while we
observe
+ // the effects of the changeover to Browsercharm. This can be deleted
once we
+ // ascertain there is no fallout.
var Charm = Y.Base.
/**
this. set('id' , cfg.url);
Y.Object. each(
function( value, key) { self.set(key, value); });
this. set('options' , cfg.config. options) ; s.parse. apply(this, arguments),
@@ -148,8 +151,6 @@
* @param {Object} cfg The configuration object.
*/
initializer: function(cfg) {
- // XXX jcsackett July 19 2013 This is temporary while resolving
Charm and
- // BrowserCharm; Charm wants a fully qualified url as it's ID.
if (cfg && cfg.url) {
}
@@ -164,10 +165,6 @@
parts,
- // XXX jcsackett July 16 2013 There are a raft of bits and bobs of
- // differences between the two charm models that need to be resolved
for
- // the new API to work with the old model. These will no longer be
needed
- // when we switch over to BrowserCharm everywhere.
if (cfg) {
if (cfg.config) {
@@ -210,12 +207,7 @@
var data = Charm.superclas
self = this;
- // TODO (gary): verify whether is_subordinate is ever...