Simon Hunt

GUI -- Starting migration of topology view to the updated framework. WIP.

...@@ -70,6 +70,7 @@ ...@@ -70,6 +70,7 @@
70 <script type="text/javascript"> 70 <script type="text/javascript">
71 var ONOS = $.onos({ 71 var ONOS = $.onos({
72 comment: "configuration options", 72 comment: "configuration options",
73 + startVid: 'topo',
73 trace: false 74 trace: false
74 }); 75 });
75 </script> 76 </script>
...@@ -77,12 +78,15 @@ ...@@ -77,12 +78,15 @@
77 <!-- Framework module files included here --> 78 <!-- Framework module files included here -->
78 <script src="mast2.js"></script> 79 <script src="mast2.js"></script>
79 80
80 - <!-- Contributed (application) views injected here --> 81 + <!-- Sample views; can be dispensed with eventually -->
81 - <!-- TODO: replace with template marker and inject refs server-side -->
82 <script src="sample2.js"></script> 82 <script src="sample2.js"></script>
83 <script src="sampleAlt2.js"></script> 83 <script src="sampleAlt2.js"></script>
84 <script src="sampleRadio.js"></script> 84 <script src="sampleRadio.js"></script>
85 85
86 + <!-- Contributed (application) views injected here -->
87 + <!-- TODO: replace with template marker and inject refs server-side -->
88 + <script src="topo2.js"></script>
89 +
86 <!-- finally, build the UI--> 90 <!-- finally, build the UI-->
87 <script type="text/javascript"> 91 <script type="text/javascript">
88 $(ONOS.buildUi); 92 $(ONOS.buildUi);
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
25 var tsI = new Date().getTime(), // initialize time stamp 25 var tsI = new Date().getTime(), // initialize time stamp
26 tsB, // build time stamp 26 tsB, // build time stamp
27 mastHeight = 36, // see mast2.css 27 mastHeight = 36, // see mast2.css
28 - defaultHash = 'sample'; 28 + defaultVid = 'sample';
29 29
30 30
31 // attach our main function to the jQuery object 31 // attach our main function to the jQuery object
...@@ -35,7 +35,8 @@ ...@@ -35,7 +35,8 @@
35 navApi; 35 navApi;
36 36
37 var defaultOptions = { 37 var defaultOptions = {
38 - trace: false 38 + trace: false,
39 + startVid: defaultVid
39 }; 40 };
40 41
41 // compute runtime settings 42 // compute runtime settings
...@@ -91,7 +92,7 @@ ...@@ -91,7 +92,7 @@
91 traceFn('hash', hash); 92 traceFn('hash', hash);
92 93
93 if (!hash) { 94 if (!hash) {
94 - hash = defaultHash; 95 + hash = settings.startVid;
95 redo = true; 96 redo = true;
96 } 97 }
97 98
...@@ -336,10 +337,6 @@ ...@@ -336,10 +337,6 @@
336 } 337 }
337 338
338 var viewInstanceMethods = { 339 var viewInstanceMethods = {
339 - toString: function () {
340 - return '[View: id="' + this.vid + '"]';
341 - },
342 -
343 token: function () { 340 token: function () {
344 return { 341 return {
345 // attributes 342 // attributes
...@@ -350,6 +347,7 @@ ...@@ -350,6 +347,7 @@
350 // functions 347 // functions
351 width: this.width, 348 width: this.width,
352 height: this.height, 349 height: this.height,
350 + uid: this.uid,
353 setRadio: this.setRadio 351 setRadio: this.setRadio
354 } 352 }
355 }, 353 },
...@@ -433,6 +431,10 @@ ...@@ -433,6 +431,10 @@
433 431
434 setRadio: function (btnSet, cb) { 432 setRadio: function (btnSet, cb) {
435 setRadioButtons(this.vid, btnSet, cb); 433 setRadioButtons(this.vid, btnSet, cb);
434 + },
435 +
436 + uid: function (id) {
437 + return uid(this, id);
436 } 438 }
437 439
438 // TODO: consider schedule, clearTimer, etc. 440 // TODO: consider schedule, clearTimer, etc.
......
This diff is collapsed. Click to expand it.
...@@ -20,3 +20,7 @@ ...@@ -20,3 +20,7 @@
20 @author Simon Hunt 20 @author Simon Hunt
21 */ 21 */
22 22
23 +svg #topo-bg {
24 + opacity: 0.5;
25 +}
26 +
......
This diff is collapsed. Click to expand it.