Topo2: Implemented host icons
Change-Id: I457b49aa3c9662b5452b7c50311b2b5dfbb74f2f
diff --git a/web/gui/src/main/webapp/app/view/topo2/topo2D3.js b/web/gui/src/main/webapp/app/view/topo2/topo2D3.js
index d32b55d..9123ac7 100644
--- a/web/gui/src/main/webapp/app/view/topo2/topo2D3.js
+++ b/web/gui/src/main/webapp/app/view/topo2/topo2D3.js
@@ -22,13 +22,6 @@
(function () {
'use strict';
- var is;
-
- // Configuration
- var hostRadius = 14;
-
- function init() {}
-
function nodeEnter(node) {
node.onEnter(this, node);
}
@@ -37,27 +30,8 @@
node.onExit(this, node);
}
- function hostLabel(d) {
- return d.get('id');
-
- // var idx = (hostLabelIndex < d.get('labels').length) ? hostLabelIndex : 0;
- // return d.labels[idx];
- }
-
- function hostEnter(d) {
- var node = d3.select(this),
- gid = d.get('type') || 'unknown',
- textDy = hostRadius + 10;
-
- d.el = node;
- // sus.visible(node, api.showHosts());
-
- is.addHostIcon(node, hostRadius, gid);
-
- node.append('text')
- .text(hostLabel)
- .attr('dy', textDy)
- .attr('text-anchor', 'middle');
+ function hostEnter(node) {
+ node.onEnter(this, node);
}
function linkEntering(link) {
@@ -66,19 +40,13 @@
angular.module('ovTopo2')
.factory('Topo2D3Service',
- ['IconService',
-
- function (_is_) {
- is = _is_;
-
- return {
- init: init,
- nodeEnter: nodeEnter,
- nodeExit: nodeExit,
- hostEnter: hostEnter,
- linkEntering: linkEntering
- };
- }
- ]
+ [function (_is_) {
+ return {
+ nodeEnter: nodeEnter,
+ nodeExit: nodeExit,
+ hostEnter: hostEnter,
+ linkEntering: linkEntering
+ };
+ }]
);
})();