From 6dbf6e18f28b873dd8e49d6a9efc312abcaa10b8 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Wed, 17 Feb 2016 18:31:46 +0100 Subject: [PATCH] Working in the new networkmap. --- pandora_console/include/class/Map.class.php | 8 +++++++- pandora_console/include/class/Networkmap.class.php | 2 +- pandora_console/include/javascript/map/MapController.js | 2 ++ .../include/javascript/map/NetworkmapController.js | 9 ++++++++- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/class/Map.class.php b/pandora_console/include/class/Map.class.php index 6e8bc4b411..c9b60f6c34 100644 --- a/pandora_console/include/class/Map.class.php +++ b/pandora_console/include/class/Map.class.php @@ -128,10 +128,16 @@ abstract class Map { } public function writeJSContants() { + $contants = array(); + $contants["ITEM_TYPE_AGENT_NETWORKMAP"] = ITEM_TYPE_AGENT_NETWORKMAP; + $contants["ITEM_TYPE_MODULE_NETWORKMAP"] = ITEM_TYPE_MODULE_NETWORKMAP; + $contants["ITEM_TYPE_EDGE_NETWORKMAP"] = ITEM_TYPE_EDGE_NETWORKMAP; ?> $id); + $nodes[$graphviz_id] = array('id' => $id, 'type' => $type); } } diff --git a/pandora_console/include/javascript/map/MapController.js b/pandora_console/include/javascript/map/MapController.js index 4cf0788d55..d8f8da0fc7 100644 --- a/pandora_console/include/javascript/map/MapController.js +++ b/pandora_console/include/javascript/map/MapController.js @@ -31,6 +31,8 @@ MapController.prototype._marginConstant = 0; //To be beauty MapController.prototype.init_map = function() { var svg = d3.select("#map svg"); + + svg.append("g").append("circle") .attr("id", "node_10") .attr("class", "node") diff --git a/pandora_console/include/javascript/map/NetworkmapController.js b/pandora_console/include/javascript/map/NetworkmapController.js index 7489308cfc..5c6c91c421 100644 --- a/pandora_console/include/javascript/map/NetworkmapController.js +++ b/pandora_console/include/javascript/map/NetworkmapController.js @@ -17,4 +17,11 @@ var NetworkmapController = function(target) { } NetworkmapController.prototype = Object.create(MapController.prototype); -NetworkmapController.prototype.constructor = NetworkmapController; \ No newline at end of file +NetworkmapController.prototype.constructor = NetworkmapController; + +NetworkmapController.prototype.init_map = function() { + + + + MapController.prototype.init_map.call(this); +}; \ No newline at end of file