Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(764)

Side by Side Diff: app/views/environment.js

Issue 7003054: Make tests more reliable.
Patch Set: Created 12 years, 3 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 'use strict'; 1 'use strict';
2 /** 2 /**
3 * Provides the main app class. 3 * Provides the main app class.
4 * 4 *
5 * @module environment 5 * @module environment
6 */ 6 */
7 7
8 YUI.add('juju-view-environment', function(Y) { 8 YUI.add('juju-view-environment', function(Y) {
9 9
10 var views = Y.namespace('juju.views'), 10 var views = Y.namespace('juju.views'),
(...skipping 16 matching lines...) Expand all
27 broadcast: true, 27 broadcast: true,
28 preventable: false}); 28 preventable: false});
29 }, 29 },
30 30
31 render: function() { 31 render: function() {
32 var container = this.get('container'), 32 var container = this.get('container'),
33 topo = this.topo; 33 topo = this.topo;
34 34
35 //If we need the initial HTML template 35 //If we need the initial HTML template
36 // take care of that. 36 // take care of that.
37 if (!this.svg) { 37 if (!this.rendered) {
38 EnvironmentView.superclass.render.apply(this, arguments); 38 EnvironmentView.superclass.render.apply(this, arguments);
39 container.setHTML(Templates.overview()); 39 container.setHTML(Templates.overview());
40 this.svg = container.one('.topology'); 40 this.rendered = true;
41 } 41 }
42 42
43 if (!topo) { 43 if (!topo) {
44 topo = new views.Topology(); 44 topo = new views.Topology();
45 topo.setAttrs({ 45 topo.setAttrs({
46 size: [640, 480], 46 size: [640, 480],
47 env: this.get('env'), 47 env: this.get('env'),
48 db: this.get('db'), 48 db: this.get('db'),
49 getServiceEndpoints: this.get('getServiceEndpoints'), 49 getServiceEndpoints: this.get('getServiceEndpoints'),
50 container: container}); 50 container: container});
(...skipping 20 matching lines...) Expand all
71 } 71 }
72 }, { 72 }, {
73 ATTRS: {} 73 ATTRS: {}
74 }); 74 });
75 75
76 views.environment = EnvironmentView; 76 views.environment = EnvironmentView;
77 }, '0.1.0', { 77 }, '0.1.0', {
78 requires: ['juju-templates', 78 requires: ['juju-templates',
79 'juju-view-utils', 79 'juju-view-utils',
80 'juju-models', 80 'juju-models',
81 'd3', 81 'juju-topology',
82 'd3-components', 82 'svg-layouts',
83 'base-build', 83 'base-build',
84 'handlebars-base', 84 'handlebars-base',
85 'node', 85 'node',
86 'svg-layouts',
87 'event-resize',
88 'slider',
89 'view'] 86 'view']
90 }); 87 });
OLDNEW

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b