New maps in progress... (new ajax and class files for nodes)
This commit is contained in:
parent
2b89d5d7e0
commit
fcc42ce5a3
|
@ -20,10 +20,16 @@ if (is_ajax ()) {
|
||||||
// Login check
|
// Login check
|
||||||
check_login ();
|
check_login ();
|
||||||
|
|
||||||
|
require_once($config['homedir'] . "/include/class/Node.class.php");
|
||||||
|
|
||||||
$getNodeData = (bool)get_parameter('getNodeData', 0);
|
$getNodeData = (bool)get_parameter('getNodeData', 0);
|
||||||
|
|
||||||
if ($getNodeData) {
|
if ($getNodeData) {
|
||||||
|
$id_node = (int)get_parameter('id_node');
|
||||||
|
$type = (int)get_parameter('type');
|
||||||
|
$id_map = (int)get_parameter('id_map');
|
||||||
|
|
||||||
|
$node = new Node($id_node);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
// Pandora FMS - http://pandorafms.com
|
||||||
|
// ==================================================
|
||||||
|
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||||
|
// Please see http://pandorafms.org for full contribution list
|
||||||
|
|
||||||
|
// This program is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License
|
||||||
|
// as published by the Free Software Foundation; version 2
|
||||||
|
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package Include
|
||||||
|
* @subpackage Maps
|
||||||
|
*/
|
||||||
|
|
||||||
|
abstract class Node {
|
||||||
|
|
||||||
|
private $id_node = null;
|
||||||
|
|
||||||
|
public function __construct($id) {
|
||||||
|
$this->$id_node = $id;
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
|
@ -0,0 +1,31 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
// Pandora FMS - http://pandorafms.com
|
||||||
|
// ==================================================
|
||||||
|
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||||
|
// Please see http://pandorafms.org for full contribution list
|
||||||
|
|
||||||
|
// This program is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License
|
||||||
|
// as published by the Free Software Foundation; version 2
|
||||||
|
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package Include
|
||||||
|
* @subpackage Networkmap
|
||||||
|
*/
|
||||||
|
|
||||||
|
require_once("include/class/Node.class.php");
|
||||||
|
|
||||||
|
class Node_Networkmap extends Node {
|
||||||
|
|
||||||
|
public function __construct($id) {
|
||||||
|
parent::__construct($id);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
|
@ -14,8 +14,6 @@
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @package Include
|
* @package Include
|
||||||
* @subpackage Maps
|
* @subpackage Maps
|
||||||
|
|
|
@ -241,7 +241,7 @@ MapController.prototype.tooltip_map_create = function(self, event) {
|
||||||
var node_id = $(event.currentTarget).attr("id");
|
var node_id = $(event.currentTarget).attr("id");
|
||||||
|
|
||||||
//Always changes the content because this may be change
|
//Always changes the content because this may be change
|
||||||
var nodeContent = this.nodeData();
|
var nodeContent = this.nodeData(node_id/*, type, id_map*/);
|
||||||
|
|
||||||
/*----------------------FOR TEST--------------------*/
|
/*----------------------FOR TEST--------------------*/
|
||||||
nodeContent = '<span>I\'M A FUCKING TOOLTIP!!</span>';
|
nodeContent = '<span>I\'M A FUCKING TOOLTIP!!</span>';
|
||||||
|
@ -300,24 +300,21 @@ Function nodeData
|
||||||
Return array(data)
|
Return array(data)
|
||||||
This function returns the data of the node
|
This function returns the data of the node
|
||||||
*/
|
*/
|
||||||
MapController.prototype.nodeData = function() {
|
MapController.prototype.nodeData = function(id/*, type, id_map*/) {
|
||||||
/*
|
var params = {};
|
||||||
$.ajax({
|
params["getNodeData"] = 1;
|
||||||
url: ,
|
params["id_node"] = id;
|
||||||
type: 'POST',
|
/*params["type"] = type;
|
||||||
dataType: 'json',
|
params["id_map"] = id_map;*/
|
||||||
data: {
|
params["page"] = "include/ajax/map.ajax";
|
||||||
getNodeData: 1,
|
|
||||||
},
|
|
||||||
complete: function(xhr, textStatus) {
|
|
||||||
|
|
||||||
},
|
|
||||||
success: function(data, textStatus, xhr) {
|
|
||||||
|
|
||||||
},
|
|
||||||
error: function(xhr, textStatus, errorThrown) {
|
|
||||||
|
|
||||||
|
jQuery.ajax ({
|
||||||
|
data: params,
|
||||||
|
dataType: "json",
|
||||||
|
type: "POST",
|
||||||
|
url: "ajax.php",
|
||||||
|
success: function (data) {
|
||||||
|
return data;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue