2010-01-18 Miguel de Dios <miguel.dedios@artica.es>

* operation/visual_console/render_view.php: fix style, add a white space.
	
	* include/styles/menu.css, include/styles/pandora.css: add styles for
	GIS maps.
	* operation/gis_maps/*, operation/menu.php, images/gis_map,
	godmode/setup/gis.php, godmode/menu.php: add first version of GIS maps.
	


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2279 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2010-01-18 14:23:30 +00:00
parent 044867ca61
commit 92f28d4b59
11 changed files with 90 additions and 0 deletions

View File

@ -1,3 +1,12 @@
2010-01-18 Miguel de Dios <miguel.dedios@artica.es>
* operation/visual_console/render_view.php: fix style, add a white space.
* include/styles/menu.css, include/styles/pandora.css: add styles for
GIS maps.
* operation/gis_maps/*, operation/menu.php, images/gis_map,
godmode/setup/gis.php, godmode/menu.php: add first version of GIS maps.
2010-01-18 Miguel de Dios <miguel.dedios@artica.es>
* include/javascript/OpenLayers/*: include the OpenLayers library into the

View File

@ -161,6 +161,7 @@ if (give_acl ($config['id_user'], 0, "PM")) {
$sub = array ();
$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');

View File

@ -0,0 +1,47 @@
<?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');
//printMap('map', 16, 19, 40.42056, -3.708187, array('OSM' => 'http://192.168.50.65/tiles/${z}/${x}/${y}.png'));
printMap('map', 16, 19, 40.42056, -3.708187, array('OSM' => 'http://tile.openstreetmap.org/${z}/${x}/${y}.png', array('Navigation','PanZoomBar','ScaleLine')));
makeLayer("layer");
addPoint('layer', __("center"), 40.42056, -3.708187);
echo "<h2>".__('Pandora Setup')." &raquo; ";
echo __('Map GIS')."</h2>";
$table->width = '90%';
$table->data = array ();
$table->style[0] = 'vertical-align: top;';
$table->data[1][0] = __('Coordenades and zoom by default:');
$table->data[1][1] = "<div id='map' style='width: 300px; height: 300px; border: 1px solid black;' ></div>";
print_table ($table);
?>
<a href="javascript: addPoint('layer', 'Pepito', -3.709, 40.423);">prueba punto</a>

Binary file not shown.

After

Width:  |  Height:  |  Size: 824 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 849 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 859 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 779 B

View File

@ -120,6 +120,9 @@
#icon_oper-visualc {
background-image: url(../../images/monitor.png);
}
#icon_oper-gismaps {
background-image: url(../../images/server_web.png);
}
#icon_oper-extensions, #icon_god-extensions {
background-image: url(../../images/extensions.png);
}

View File

@ -24,6 +24,9 @@ Description: The default Pandora FMS theme layout
font-family: verdana, sans-serif;
font-size: 8pt;
}
svg * {
font-size: 11pt;
}
body {
text-align: center;
background-color: #555555;

View File

@ -60,6 +60,31 @@ if (give_acl ($config['id_user'], 0, "AR")) {
$menu["estado"]["sub"] = $sub;
//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;
}
$sub["operation/gis_maps/render_view&amp;id=".$gisMap["id_tgis_map"]]["text"] = mb_substr ($gisMap["map_name"], 0, 15);
$sub["operation/gis_maps/render_view&amp;id=".$gisMap["id_tgis_map"]]["refr"] = 0;
}
$menu["gismaps"]["sub"] = $sub;
//END GIS Maps
//Visual console
$menu["visualc"]["text"] = __('Visual console');
$menu["visualc"]["sec2"] = "operation/visual_console/index";

View File

@ -65,6 +65,8 @@ if ($config["pure"] == 0) {
echo "</a>";
}
echo "&nbsp;";
if (give_acl ($config["id_user"], $id_group, "AW"))
echo '<a href="index.php?sec=gmap&amp;sec2=godmode/reporting/map_builder&amp;id_layout='.$id_layout.'">'.print_image ("images/setup.png", true, array ("title" => __('Setup'))).'</a>';