mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 00:34:46 +02:00
2010-01-25 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql: add the group column for SLA purposes. * operation/agentes/gis_view.php: page for GIS data in agents view. * operation/agentes/ver_agente.php: add the tab for GIS data. * operation/menu.php, godmode/menu.php: change the lines for show the entries in menu, now show the entries gis when it's set on. * godmode/setup/setup.php: add the field to set on or off the GIS features in the Pandora Console. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2303 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
43fab89123
commit
b3975d1797
@ -1,3 +1,13 @@
|
||||
2010-01-25 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* pandoradb.sql: add the group column for SLA purposes.
|
||||
* operation/agentes/gis_view.php: page for GIS data in agents view.
|
||||
* operation/agentes/ver_agente.php: add the tab for GIS data.
|
||||
* operation/menu.php, godmode/menu.php: change the lines for show the
|
||||
entries in menu, now show the entries gis when it's set on.
|
||||
* godmode/setup/setup.php: add the field to set on or off the GIS features
|
||||
in the Pandora Console.
|
||||
|
||||
2010-01-25 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/config_process.php: small fix for to erase a alert message in php
|
||||
|
@ -122,10 +122,12 @@ if (give_acl ($config['id_user'], 0, "IW")) {
|
||||
$menu["gmap"]["sec2"] = "godmode/reporting/map_builder";
|
||||
$menu["gmap"]["id"] = "god-map";
|
||||
|
||||
$menu["godgismaps"]["text"] = __('GIS Maps');
|
||||
$menu["godgismaps"]["sec2"] = "godmode/gis_maps/index";
|
||||
$menu["godgismaps"]["refr"] = 60;
|
||||
$menu["godgismaps"]["id"] = "god-gismaps";
|
||||
if ($config['activate_gis']) {
|
||||
$menu["godgismaps"]["text"] = __('GIS Maps');
|
||||
$menu["godgismaps"]["sec2"] = "godmode/gis_maps/index";
|
||||
$menu["godgismaps"]["refr"] = 60;
|
||||
$menu["godgismaps"]["id"] = "god-gismaps";
|
||||
}
|
||||
}
|
||||
|
||||
if (give_acl ($config['id_user'], 0, "PM")) {
|
||||
@ -166,7 +168,8 @@ if (give_acl ($config['id_user'], 0, "PM")) {
|
||||
|
||||
$sub = array ();
|
||||
|
||||
$sub["godmode/setup/gis"]["text"] = __('Map GIS');
|
||||
if ($config['activate_gis'])
|
||||
$sub["godmode/setup/gis"]["text"] = __('Map GIS');
|
||||
$sub["godmode/setup/setup_visuals"]["text"] = __('Visual styles');
|
||||
$sub["godmode/setup/file_manager"]["text"] = __('File manager');
|
||||
$sub["godmode/setup/links"]["text"] = __('Links');
|
||||
|
@ -119,6 +119,10 @@ $table->data[15][0] = __('IP list with API access') .
|
||||
$list_ACL_IPs_for_API = get_parameter('list_ACL_IPs_for_API', implode("\n", $config['list_ACL_IPs_for_API']));
|
||||
$table->data[15][1] = print_textarea('list_ACL_IPs_for_API', 10, 15, $list_ACL_IPs_for_API, null, true);
|
||||
|
||||
$table->data[16][0] = __('Enable GIS features in Pandora Console');
|
||||
$table->data[16][1] = __('Yes').' '.print_radio_button ('activate_gis', 1, '', $config["activate_gis"], true).' ';
|
||||
$table->data[16][1] .= __('No').' '.print_radio_button ('activate_gis', 0, '', $config["activate_gis"], true);
|
||||
|
||||
enterprise_hook ('setup');
|
||||
|
||||
echo '<form id="form_setup" method="post">';
|
||||
|
29
pandora_console/operation/agentes/gis_view.php
Normal file
29
pandora_console/operation/agentes/gis_view.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* Pandora FMS- http://pandorafms.com
|
||||
* ==================================================
|
||||
* Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for 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.
|
||||
*/
|
||||
|
||||
// Load global vars
|
||||
require_once ("include/config.php");
|
||||
|
||||
check_login ();
|
||||
|
||||
if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
|
||||
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", "Trying to access Visual Setup Management");
|
||||
require ("general/noaccess.php");
|
||||
return;
|
||||
}
|
||||
|
||||
require_once ('include/functions_gis.php');
|
||||
|
||||
?>
|
@ -253,36 +253,50 @@ echo "<img src='images/agents_group.png' class='top' border=0 title='". __("Grou
|
||||
// Inventory
|
||||
enterprise_hook ('inventory_tab');
|
||||
|
||||
// GIS tab
|
||||
if ($config['activate_gis']) {
|
||||
if ($tab == "gis") {
|
||||
echo "<li class='nomn_high'>";
|
||||
} else {
|
||||
echo "<li class='nomn'>";
|
||||
}
|
||||
echo "<a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=gis&id_agente=$id_agente'><img src='images/world.png' class='top' border=0 title='".__('GIS data')."'> </a>";
|
||||
echo "</li>";
|
||||
}
|
||||
|
||||
echo "</ul>";
|
||||
echo "</div>";
|
||||
echo "</div>";
|
||||
echo "<div style='height: 25px'> </div>";
|
||||
|
||||
switch ($tab) {
|
||||
case "sla":
|
||||
require ("sla_view.php");
|
||||
break;
|
||||
case "manage":
|
||||
require ("estado_generalagente.php");
|
||||
break;
|
||||
case "main":
|
||||
require ("estado_generalagente.php");
|
||||
require ("estado_monitores.php");
|
||||
require ("alerts_status.php");
|
||||
require ("status_events.php");
|
||||
break;
|
||||
case "data_view":
|
||||
require ("datos_agente.php");
|
||||
break;
|
||||
case "data":
|
||||
require ("estado_ultimopaquete.php");
|
||||
break;
|
||||
case "alert":
|
||||
require ("alerts_status.php");
|
||||
break;
|
||||
case "inventory":
|
||||
enterprise_include ('operation/agentes/agent_inventory.php');
|
||||
break;
|
||||
case "gis":
|
||||
require ("gis_view.php");
|
||||
break;
|
||||
case "sla":
|
||||
require ("sla_view.php");
|
||||
break;
|
||||
case "manage":
|
||||
require ("estado_generalagente.php");
|
||||
break;
|
||||
case "main":
|
||||
require ("estado_generalagente.php");
|
||||
require ("estado_monitores.php");
|
||||
require ("alerts_status.php");
|
||||
require ("status_events.php");
|
||||
break;
|
||||
case "data_view":
|
||||
require ("datos_agente.php");
|
||||
break;
|
||||
case "data":
|
||||
require ("estado_ultimopaquete.php");
|
||||
break;
|
||||
case "alert":
|
||||
require ("alerts_status.php");
|
||||
break;
|
||||
case "inventory":
|
||||
enterprise_include ('operation/agentes/agent_inventory.php');
|
||||
break;
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -61,28 +61,30 @@ if (give_acl ($config['id_user'], 0, "AR")) {
|
||||
//End of view agents
|
||||
|
||||
//INI GIS Maps
|
||||
$menu["gismaps"]["text"] = __('GIS Maps');
|
||||
$menu["gismaps"]["sec2"] = "operation/gis_maps/index";
|
||||
$menu["gismaps"]["refr"] = 60;
|
||||
$menu["gismaps"]["id"] = "oper-gismaps";
|
||||
|
||||
$sub = array ();
|
||||
|
||||
$gisMaps = get_db_all_rows_in_table ('tgis_map', 'map_name');
|
||||
if ($gisMaps === false) {
|
||||
$gisMaps = array ();
|
||||
}
|
||||
$id = (int) get_parameter ('id', -1);
|
||||
|
||||
foreach ($gisMaps as $gisMap) {
|
||||
if (! give_acl ($config["id_user"], $gisMap["group_id"], "AR")) {
|
||||
continue;
|
||||
if ($config['activate_gis']) {
|
||||
$menu["gismaps"]["text"] = __('GIS Maps');
|
||||
$menu["gismaps"]["sec2"] = "operation/gis_maps/index";
|
||||
$menu["gismaps"]["refr"] = 60;
|
||||
$menu["gismaps"]["id"] = "oper-gismaps";
|
||||
|
||||
$sub = array ();
|
||||
|
||||
$gisMaps = get_db_all_rows_in_table ('tgis_map', 'map_name');
|
||||
if ($gisMaps === false) {
|
||||
$gisMaps = array ();
|
||||
}
|
||||
$sub["operation/gis_maps/render_view&id=".$gisMap["id_tgis_map"]]["text"] = mb_substr ($gisMap["map_name"], 0, 15);
|
||||
$sub["operation/gis_maps/render_view&id=".$gisMap["id_tgis_map"]]["refr"] = 0;
|
||||
$id = (int) get_parameter ('id', -1);
|
||||
|
||||
foreach ($gisMaps as $gisMap) {
|
||||
if (! give_acl ($config["id_user"], $gisMap["group_id"], "AR")) {
|
||||
continue;
|
||||
}
|
||||
$sub["operation/gis_maps/render_view&id=".$gisMap["id_tgis_map"]]["text"] = mb_substr ($gisMap["map_name"], 0, 15);
|
||||
$sub["operation/gis_maps/render_view&id=".$gisMap["id_tgis_map"]]["refr"] = 0;
|
||||
}
|
||||
|
||||
$menu["gismaps"]["sub"] = $sub;
|
||||
}
|
||||
|
||||
$menu["gismaps"]["sub"] = $sub;
|
||||
//END GIS Maps
|
||||
|
||||
//Visual console
|
||||
|
@ -917,6 +917,7 @@ CREATE TABLE IF NOT EXISTS `tgis_map_connection` (
|
||||
`initial_longitude` DOUBLE NULL COMMENT 'longitude of the center of the map when it\'s loaded' ,
|
||||
`initial_latitude` DOUBLE NULL COMMENT 'latitude of the center of the map when it\'s loaded' ,
|
||||
`initial_altitude` DOUBLE NULL COMMENT 'altitude of the center of the map when it\'s loaded' ,
|
||||
`group_id` INT(10) NOT NULL DEFAULT 0 COMMENT 'Group that owns the map',
|
||||
PRIMARY KEY (`id_tmap_connection`) )
|
||||
ENGINE = InnoDB
|
||||
COMMENT = 'Table to store the map connection information';
|
||||
|
Loading…
x
Reference in New Issue
Block a user