Topo2Link - Fixed width of rectangle and centered text
Topo2Layout/Link - Added port number on link hover
Topo2Layout/Select - Added Drag functionality
Topo2SubRegion - Added onClick event to node
Topo2Device - Added Color Theme
TopoForce - Removed console.log
Change-Id: Icd85d92c8f3c5f96cb896068fe9375c250717f5f
diff --git a/web/gui/src/main/webapp/app/view/topo2/topo2SubRegion.js b/web/gui/src/main/webapp/app/view/topo2/topo2SubRegion.js
index 016c7b4..67de6cb 100644
--- a/web/gui/src/main/webapp/app/view/topo2/topo2SubRegion.js
+++ b/web/gui/src/main/webapp/app/view/topo2/topo2SubRegion.js
@@ -22,7 +22,8 @@
(function () {
'use strict';
- var Collection, Model, is, sus, ts, t2vs;
+ var wss, is, sus, ts, t2vs;
+ var Collection, Model;
var remappedDeviceTypes = {
virtual: 'cord'
@@ -71,11 +72,12 @@
angular.module('ovTopo2')
.factory('Topo2SubRegionService',
- ['Topo2Collection', 'Topo2NodeModel', 'IconService', 'SvgUtilService',
+ ['WebSocketService', 'Topo2Collection', 'Topo2NodeModel', 'IconService', 'SvgUtilService',
'ThemeService', 'Topo2ViewService',
- function (_Collection_, _NodeModel_, _is_, _sus_, _ts_, classnames, _t2vs_) {
+ function (_wss_, _Collection_, _NodeModel_, _is_, _sus_, _ts_, classnames, _t2vs_) {
+ wss = _wss_;
t2vs = _t2vs_;
is = _is_;
sus = _sus_;
@@ -89,6 +91,12 @@
},
nodeType: 'sub-region',
mapDeviceTypeToGlyph: mapDeviceTypeToGlyph,
+ onClick: function () {
+ wss.sendEvent('topo2navRegion', {
+ dir: 'down',
+ rid: this.get('id')
+ });
+ },
onEnter: function (el) {
var node = d3.select(el),
@@ -97,6 +105,7 @@
glyph, labelWidth;
this.el = node;
+ this.el.on('click', this.onClick.bind(this));
// Label
var labelElements = this.addLabelElements(label);