GUI -- TopoView - Linking Oblique module in.
- updated oblique test scenario events.

Change-Id: I590f22fbbc356c564cefe8d87e73fed701d88f98
diff --git a/web/gui/src/main/webapp/app/view/topo/topo.js b/web/gui/src/main/webapp/app/view/topo/topo.js
index e8266ff..89e2706 100644
--- a/web/gui/src/main/webapp/app/view/topo/topo.js
+++ b/web/gui/src/main/webapp/app/view/topo/topo.js
@@ -28,7 +28,7 @@
     ];
 
     // references to injected services etc.
-    var $log, fs, ks, zs, gs, ms, sus, flash, tes, tfs, tps, tis, tss, tts;
+    var $log, fs, ks, zs, gs, ms, sus, flash, tes, tfs, tps, tis, tss, tts, tos;
 
     // DOM elements
     var ovtopo, svg, defs, zoomLayer, mapG, forceG, noDevsLayer;
@@ -52,7 +52,7 @@
             //P: togglePorts,
 
             //X: [toggleNodeLock, 'Lock / unlock node positions'],
-            //Z: [toggleOblique, 'Toggle oblique view (Experimental)'],
+            Z: [tos.toggleOblique, 'Toggle oblique view (Experimental)'],
             L: [tfs.cycleDeviceLabels, 'Cycle device labels'],
             U: [tfs.unpin, 'Unpin node (hover mouse over)'],
             R: [resetZoom, 'Reset pan / zoom'],
@@ -214,10 +214,11 @@
             'GlyphService', 'MapService', 'SvgUtilService', 'FlashService',
             'TopoEventService', 'TopoForceService', 'TopoPanelService',
             'TopoInstService', 'TopoSelectService', 'TopoTrafficService',
+            'TopoObliqueService',
 
         function ($scope, _$log_, $loc, $timeout, _fs_, mast,
                   _ks_, _zs_, _gs_, _ms_, _sus_, _flash_,
-                  _tes_, _tfs_, _tps_, _tis_, _tss_, _tts_) {
+                  _tes_, _tfs_, _tps_, _tis_, _tss_, _tts_, _tos_) {
             var self = this,
                 projection,
                 dim,
@@ -238,10 +239,14 @@
             flash = _flash_;
             tes = _tes_;
             tfs = _tfs_;
+            // TODO: consider funnelling actions through TopoForceService...
+            //  rather than injecting references to these 'sub-modules',
+            //  just so we can invoke functions on them.
             tps = _tps_;
             tis = _tis_;
             tss = _tss_;
             tts = _tts_;
+            tos = _tos_;
 
             self.notifyResize = function () {
                 svgResized(fs.windowSize(mast.mastHeight()));
diff --git a/web/gui/src/main/webapp/app/view/topo/topoForce.js b/web/gui/src/main/webapp/app/view/topo/topoForce.js
index 334b10b..80a7b63 100644
--- a/web/gui/src/main/webapp/app/view/topo/topoForce.js
+++ b/web/gui/src/main/webapp/app/view/topo/topoForce.js
@@ -23,7 +23,7 @@
     'use strict';
 
     // injected refs
-    var $log, fs, sus, is, ts, flash, tis, tms, tss, tts, fltr,
+    var $log, fs, sus, is, ts, flash, tis, tms, tss, tts, tos, fltr,
         icfg, uplink;
 
     // configuration
@@ -1084,6 +1084,13 @@
         }
     }
 
+    function mkObliqueApi(uplink) {
+        return {
+            node: function () { return node; },
+            link: function () { return link; }
+        };
+    }
+
     function mkFilterApi(uplink) {
         return {
             node: function () { return node; },
@@ -1095,10 +1102,11 @@
     .factory('TopoForceService',
         ['$log', 'FnService', 'SvgUtilService', 'IconService', 'ThemeService',
             'FlashService', 'TopoInstService', 'TopoModelService',
-            'TopoSelectService', 'TopoTrafficService', 'TopoFilterService',
+            'TopoSelectService', 'TopoTrafficService',
+            'TopoObliqueService', 'TopoFilterService',
 
         function (_$log_, _fs_, _sus_, _is_, _ts_, _flash_,
-                  _tis_, _tms_, _tss_, _tts_, _fltr_) {
+                  _tis_, _tms_, _tss_, _tts_, _tos_, _fltr_) {
             $log = _$log_;
             fs = _fs_;
             sus = _sus_;
@@ -1109,6 +1117,7 @@
             tms = _tms_;
             tss = _tss_;
             tts = _tts_;
+            tos = _tos_;
             fltr = _fltr_;
 
             icfg = is.iconConfig();
@@ -1131,6 +1140,7 @@
                 tms.initModel(mkModelApi(uplink), dim);
                 tss.initSelect(mkSelectApi(uplink));
                 tts.initTraffic(mkTrafficApi(uplink));
+                tos.initOblique(mkObliqueApi(uplink));
                 fltr.initFilter(mkFilterApi(uplink), d3.select('#mast-right'));
 
                 settings = angular.extend({}, defaultSettings, opts);
@@ -1167,6 +1177,7 @@
 
             function destroyForce() {
                 fltr.destroyFilter();
+                tos.destroyOblique();
                 tts.destroyTraffic();
                 tss.destroySelect();
                 tms.destroyModel();
diff --git a/web/gui/src/main/webapp/app/view/topo/topoOblique.js b/web/gui/src/main/webapp/app/view/topo/topoOblique.js
index 2a2f81f..4b7bc50 100644
--- a/web/gui/src/main/webapp/app/view/topo/topoOblique.js
+++ b/web/gui/src/main/webapp/app/view/topo/topoOblique.js
@@ -38,6 +38,11 @@
 
     // ==========================
 
+
+    function toggleOblique() {
+        $log.log("TOGGLING OBLIQUE VIEW");
+    }
+
 // === -----------------------------------------------------
 // === MODULE DEFINITION ===
 
@@ -57,7 +62,9 @@
 
         return {
             initOblique: initOblique,
-            destroyOblique: destroyOblique
+            destroyOblique: destroyOblique,
+
+            toggleOblique: toggleOblique
         };
     }]);
 }());