Merge lp:~bac/juju-gui/fix-dnd-bundles-wrt-id into lp:juju-gui/experimental
Status: | Merged |
---|---|
Merged at revision: | 1207 |
Proposed branch: | lp:~bac/juju-gui/fix-dnd-bundles-wrt-id |
Merge into: | lp:juju-gui/experimental |
Diff against target: |
114 lines (+29/-8) 4 files modified
app/views/topology/service.js (+1/-0) app/widgets/token.js (+7/-1) test/test_service_module.js (+6/-4) test/utils.js (+15/-3) |
To merge this branch: | bzr merge lp:~bac/juju-gui/fix-dnd-bundles-wrt-id |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju GUI Hackers | Pending | ||
Review via email: mp+196139@code.launchpad.net |
Description of the change
Send bundle id when d'n'd from sidebar.
This path was initially missed. The Token had to be fixed to include the
ID in the drag data.
Note, for selfish reasons, test/utils.js loadFixtures was updated to retry on
failures. The reason for the occassional 404 in this function when run by
lbox is still unknown. Hopefully the dumb retry will help.
QA Instructions:
# Use juju-quickstart trunk
% cd projects/
% bzr pull
% make
# Deploy on EC2
% juju switch ec2
% .venv/bin/python juju-quickstart --gui-charm-url cs:~juju-
% juju set juju-gui "juju-gui-source=lp:~bac/juju-gui/fix-dnd-bundles-wrt-id"
# May want to wait a bit. Perhaps it isn't necessary.
% juju set juju-gui "charmworld-url=http://
Find one of Jorge's bundles on http://
(wordpress-simple is a fast one.) Look at the deployment counts.
In the GUI search for 'jorge', find the bundle from above, and *drag* it onto
the canvas. Have a light snack. When everything is green and happy, look at
the page again on staging and see that the count has increased by one. NOTE:
in my QA I didn't see the incremented values reflected immediately which is
really strange. A few minutes later they were updated.
Reviewers: mp+196139_ code.launchpad. net,
Message:
Please take a look.
Description:
Send bundle id when d'n'd from sidebar.
This path was initially missed. The Token had to be fixed to include
the
ID in the drag data.
Note, for selfish reasons, test/utils.js loadFixtures was updated to
retry on
failures. The reason for the occassional 404 in this function when run
by
lbox is still unknown. Hopefully the dumb retry will help.
QA Instructions:
# Use juju-quickstart trunk juju-quickstart gui/precise/ juju-gui- 128 staging. jujucharms. com"
% cd projects/
% bzr pull
% make
# Deploy on EC2
% juju switch ec2
% .venv/bin/python juju-quickstart --gui-charm-url
cs:~juju-
% juju set juju-gui
"juju-gui-source=lp:~bac/juju-gui/fix-dnd-bundles-wrt-id"
# May want to wait a bit. Perhaps it isn't necessary.
% juju set juju-gui "charmworld-url=http://
Find one of Jorge's bundles on http:// staging. jujucharms. com.
(wordpress-simple is a fast one.) Look at the deployment counts.
In the GUI search for 'jorge', find the bundle from above, and *drag* it
onto
the canvas. Have a light snack. When everything is green and happy,
look at
the page again on staging and see that the count has increased by one.
NOTE:
in my QA I didn't see the incremented values reflected immediately which
is
really strange. A few minutes later they were updated.
https:/ /code.launchpad .net/~bac/ juju-gui/ fix-dnd- bundles- wrt-id/ +merge/ 196139
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/29960045/
Affected files (+31, -8 lines): topology/ service. js token.js service_ module. js
A [revision details]
M app/views/
M app/widgets/
M test/test_
M test/utils.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: test/test_ service_ module. js service_ module. js' service_ module. js 2013-11-19 17:00:32 +0000 service_ module. js 2013-11-21 12:18:26 +0000
dataTransfer: {
getData: function(name) {
return JSON.stringify({ basket/ thing"} ',
dataType: 'token- drag-and- drop',
iconSrc: src
});
=== modified file 'test/test_
--- test/test_
+++ test/test_
@@ -316,7 +316,8 @@
- data: '{"basket_name": "foo", "data": "BUNDLE DATA"}',
+ data: '{"basket_name": "foo", "data": "BUNDLE DATA",' +
+ ' "id": "~jorge/
@@ -330,8 +331,9 @@
// mock out the Y.BundleHelpers call. ers.deployBundl e; ers.deployBundl e = function( deployerData, env, db) { ers.deployBundl e = function( deployerData, id, env, db) {
assert. include( deployerData, 'BUNDLE DATA'); basket/ thing') ;
juju.BundleHel pers.deployBund le = _deployBundle;
var _deployBundle = juju.BundleHelp
- juju.BundleHelp
+ juju.BundleHelp
+ assert.equal(id, '~jorge/
// Restore the deployBundle call for future tests.
done();
@@ -353,11 +355,11 @...