LEFT | RIGHT |
(no file at all) | |
1 /* | 1 /* |
2 This file is part of the Juju GUI, which lets users view and manage Juju | 2 This file is part of the Juju GUI, which lets users view and manage Juju |
3 environments within a graphical interface (https://launchpad.net/juju-gui). | 3 environments within a graphical interface (https://launchpad.net/juju-gui). |
4 Copyright (C) 2012-2013 Canonical Ltd. | 4 Copyright (C) 2012-2013 Canonical Ltd. |
5 | 5 |
6 This program is free software: you can redistribute it and/or modify it under | 6 This program is free software: you can redistribute it and/or modify it under |
7 the terms of the GNU Affero General Public License version 3, as published by | 7 the terms of the GNU Affero General Public License version 3, as published by |
8 the Free Software Foundation. | 8 the Free Software Foundation. |
9 | 9 |
10 This program is distributed in the hope that it will be useful, but WITHOUT | 10 This program is distributed in the hope that it will be useful, but WITHOUT |
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 // Watch specific things, (add units), remove db.update above | 586 // Watch specific things, (add units), remove db.update above |
587 // Note: This hides under tha flag as tests don't properly clean | 587 // Note: This hides under tha flag as tests don't properly clean |
588 // up sometimes and this binding creates spooky interaction | 588 // up sometimes and this binding creates spooky interaction |
589 // at a distance and strange failures. | 589 // at a distance and strange failures. |
590 this.db.services.after(['add', 'remove', '*:change'], | 590 this.db.services.after(['add', 'remove', '*:change'], |
591 this.on_database_changed, this); | 591 this.on_database_changed, this); |
592 this.db.relations.after(['add', 'remove', '*:change'], | 592 this.db.relations.after(['add', 'remove', '*:change'], |
593 this.on_database_changed, this); | 593 this.on_database_changed, this); |
594 } | 594 } |
595 this.addSubApplications(cfg); | 595 this.addSubApplications(cfg); |
| 596 |
| 597 // When someone wants a charm to be deployed they fire initiateDeploy |
| 598 // and we show the charm panel to configure/deploy the service. |
| 599 Y.on('initiateDeploy', function(charm) { |
| 600 this.deploy(charm); |
| 601 }, this.charmPanel); |
596 }, | 602 }, |
597 | 603 |
598 /** | 604 /** |
599 Start the simulator if it can start and it has not already been started. | 605 Start the simulator if it can start and it has not already been started. |
600 | 606 |
601 @method simulateEvents | 607 @method simulateEvents |
602 */ | 608 */ |
603 simulateEvents: function() { | 609 simulateEvents: function() { |
604 if (!this._simulator && this.env) { | 610 if (!this._simulator && this.env) { |
605 // Try/Catch this to allow mocks in tests. | 611 // Try/Catch this to allow mocks in tests. |
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1391 'app-subapp-extension', | 1397 'app-subapp-extension', |
1392 'sub-app', | 1398 'sub-app', |
1393 'subapp-browser', | 1399 'subapp-browser', |
1394 'event-key', | 1400 'event-key', |
1395 'event-touch', | 1401 'event-touch', |
1396 'model-controller', | 1402 'model-controller', |
1397 'FileSaver', | 1403 'FileSaver', |
1398 'juju-inspector-widget' | 1404 'juju-inspector-widget' |
1399 ] | 1405 ] |
1400 }); | 1406 }); |
LEFT | RIGHT |