mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
New maps in progress... (Node details finished)
This commit is contained in:
parent
9d2dff71e3
commit
56cadb2037
@ -154,8 +154,6 @@ if (is_ajax ()) {
|
|||||||
}
|
}
|
||||||
else if ($getNodeDetails) {
|
else if ($getNodeDetails) {
|
||||||
$id_node_data = (int)get_parameter('id_node_data');
|
$id_node_data = (int)get_parameter('id_node_data');
|
||||||
$type = (int)get_parameter('type');
|
|
||||||
$id_map = (int)get_parameter('id_map');
|
|
||||||
$data_graph_id = (int)get_parameter('data_graph_id');
|
$data_graph_id = (int)get_parameter('data_graph_id');
|
||||||
$node_id = get_parameter('node_id');
|
$node_id = get_parameter('node_id');
|
||||||
|
|
||||||
@ -172,8 +170,6 @@ if (is_ajax ()) {
|
|||||||
<?php
|
<?php
|
||||||
$details = ob_get_clean();
|
$details = ob_get_clean();
|
||||||
|
|
||||||
switch ($type) {
|
|
||||||
case ITEM_TYPE_AGENT_NETWORKMAP:
|
|
||||||
$details = str_replace(
|
$details = str_replace(
|
||||||
"{data_graph_id}",
|
"{data_graph_id}",
|
||||||
$data_graph_id,
|
$data_graph_id,
|
||||||
@ -244,12 +240,6 @@ if (is_ajax ()) {
|
|||||||
$body,
|
$body,
|
||||||
$details);
|
$details);
|
||||||
|
|
||||||
break;
|
|
||||||
case ITEM_TYPE_MODULE_NETWORKMAP:
|
|
||||||
$details = "<span>...</span>";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
echo json_encode($details);
|
echo json_encode($details);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1095,8 +1095,12 @@ MapController.prototype.init_events = function(principalObject) {
|
|||||||
{
|
{
|
||||||
title: 'Show details',
|
title: 'Show details',
|
||||||
action: function(elm, d, i) {
|
action: function(elm, d, i) {
|
||||||
|
var nodeTarget = $(elm);
|
||||||
|
var type = parseInt(nodeTarget.data("type"));
|
||||||
|
if (type == 0) {
|
||||||
self.nodeGetDetails(self, elm);
|
self.nodeGetDetails(self, elm);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Resize',
|
title: 'Resize',
|
||||||
@ -1294,16 +1298,12 @@ MapController.prototype.editMap = function(self, target) {
|
|||||||
MapController.prototype.nodeGetDetails = function(self, target) {
|
MapController.prototype.nodeGetDetails = function(self, target) {
|
||||||
var nodeTarget = $(target);
|
var nodeTarget = $(target);
|
||||||
var node_id = nodeTarget.attr("id");
|
var node_id = nodeTarget.attr("id");
|
||||||
var type = parseInt(nodeTarget.data("type"));
|
|
||||||
var data_id = parseInt(nodeTarget.data("id"));
|
var data_id = parseInt(nodeTarget.data("id"));
|
||||||
var data_graph_id = parseInt(nodeTarget.data("graph_id"));
|
var data_graph_id = parseInt(nodeTarget.data("graph_id"));
|
||||||
var id_map = self._id;
|
|
||||||
|
|
||||||
var params = {};
|
var params = {};
|
||||||
params["getNodeDetails"] = 1;
|
params["getNodeDetails"] = 1;
|
||||||
params["id_node_data"] = data_id;
|
params["id_node_data"] = data_id;
|
||||||
params["type"] = type;
|
|
||||||
params["id_map"] = id_map;
|
|
||||||
params["data_graph_id"] = data_graph_id;
|
params["data_graph_id"] = data_graph_id;
|
||||||
params["node_id"] = node_id;
|
params["node_id"] = node_id;
|
||||||
params["page"] = "include/ajax/map.ajax";
|
params["page"] = "include/ajax/map.ajax";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user