Merge lp://staging/~gary/juju-gui/bug1236427 into lp://staging/juju-gui/experimental
Proposed by
Gary Poster
Status: | Merged |
---|---|
Merged at revision: | 1130 |
Proposed branch: | lp://staging/~gary/juju-gui/bug1236427 |
Merge into: | lp://staging/juju-gui/experimental |
Diff against target: |
49 lines (+20/-1) 2 files modified
app/views/inspector.js (+3/-1) test/test_inspector_overview.js (+17/-0) |
To merge this branch: | bzr merge lp://staging/~gary/juju-gui/bug1236427 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju GUI Hackers | Pending | ||
Review via email:
|
Description of the change
After units are deployed, re-enable unit control
To post a comment you must log in.
Reviewers: mp+190750_ code.launchpad. net,
Message:
Please take a look.
Description:
After units are deployed, re-enable unit control
https:/ /code.launchpad .net/~gary/ juju-gui/ bug1236427/ +merge/ 190750
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/14512056/
Affected files (+22, -1 lines): inspector. js inspector_ overview. js
A [revision details]
M app/views/
M test/test_
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_ inspector_ overview. js inspector_ overview. js' inspector_ overview. js 2013-10-09 20:32:53 +0000 inspector_ overview. js 2013-10-11 19:33:07 +0000
assert. equal(4, message. Params. NumUnits) ;
=== modified file 'test/test_
--- test/test_
+++ test/test_
@@ -196,6 +196,23 @@
});
+ it('should disable and enable the unit control appropriately', one('.num- units-control' ); set('value' , 7); simulate( 'keydown' , { keyCode: ENTER }); one('.confirm- num-units' ).simulate( 'click' ); isTrue( control. get('disabled' )); message( ); Params. NumUnits} isFalse( control. get('disabled' ));
setUpInspecto r();
function() {
+ setUpInspector();
+ var control = container.
+ control.
+ control.
+ // confirm the 'please confirm constraints' dialogue
+ container.
+ assert.
+ var message = conn.last_
+ conn.msg({
+ RequestId: message.RequestId,
+ Error: undefined,
+ Response: {Units: message.
+ });
+ assert.
+ });
+
it('should set the constraints before deploying any more units',
function() {
Index: app/views/ inspector. js inspector. js' inspector. js 2013-10-02 12:15:05 +0000 inspector. js 2013-10-11 19:33:07 +0000
=== modified file 'app/views/
--- app/views/
+++ app/views/
@@ -201,6 +201,8 @@
},
_ addUnitCallback : function(ev) { ager.get( 'container' ); one('.num- units-control' ); ager.get( 'model' ); ager.get( 'db');
'unit_count' , service. get('unit_ count') + unit_names.length);
db.fire( 'update' ); 'disabled' , false);
+ var container = this.viewletMan
+ var field = container.
var service, db;
service = this.viewletMan
db = this.viewletMan
@@ -224,7 +226,7 @@
}
- // View is redrawn so we do not need to enable field.
+ field.set(
},
_ removeUnitCallb ack: function(ev) {