LEFT | RIGHT |
(no file at all) | |
1 'use strict'; | 1 'use strict'; |
2 | 2 |
3 /** | 3 /** |
4 * Provides the main app class, based on the YUI App framework. | 4 * Provides the main app class, based on the YUI App framework. |
5 * | 5 * |
6 * @module app | 6 * @module app |
7 */ | 7 */ |
8 | 8 |
9 // Create a global for debug console access to YUI context. | 9 // Create a global for debug console access to YUI context. |
10 var yui; | 10 var yui; |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 } else { | 358 } else { |
359 // If any services have been removed, delete them from the map | 359 // If any services have been removed, delete them from the map |
360 // rather than updating it as a whole. | 360 // rather than updating it as a whole. |
361 Y.Object.each(this.serviceEndpoints, function(key, value, obj) { | 361 Y.Object.each(this.serviceEndpoints, function(key, value, obj) { |
362 if (self.db.services.getById(key) === null) { | 362 if (self.db.services.getById(key) === null) { |
363 delete(self.serviceEndpoints[key]); | 363 delete(self.serviceEndpoints[key]); |
364 } | 364 } |
365 }); | 365 }); |
366 } | 366 } |
367 | 367 |
| 368 // Regardless of which view we are rendering |
| 369 // update the env view on db change. |
| 370 if (this.views.environment.instance) { |
| 371 this.views.environment.instance.topo.update(); |
| 372 } |
368 // Redispatch to current view to update. | 373 // Redispatch to current view to update. |
369 if (active && active.name === 'EnvironmentView') { | 374 if (active && active.name === 'EnvironmentView') { |
370 active.update(); | |
371 active.rendered(); | 375 active.rendered(); |
372 } else { | 376 } else { |
373 this.dispatch(); | 377 this.dispatch(); |
374 } | 378 } |
375 }, | 379 }, |
376 | 380 |
377 /** | 381 /** |
378 * When services are added, update the endpoints map. | 382 * When services are added, update the endpoints map. |
379 * | 383 * |
380 * @method updateEndpoints | 384 * @method updateEndpoints |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
894 'juju-views', | 898 'juju-views', |
895 'juju-view-login', | 899 'juju-view-login', |
896 'io', | 900 'io', |
897 'json-parse', | 901 'json-parse', |
898 'app-base', | 902 'app-base', |
899 'app-transitions', | 903 'app-transitions', |
900 'base', | 904 'base', |
901 'node', | 905 'node', |
902 'model'] | 906 'model'] |
903 }); | 907 }); |
LEFT | RIGHT |