diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index f77bd04b29..6a47706ecc 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,12 @@ +2010-01-18 Miguel de Dios + + * 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 * include/javascript/OpenLayers/*: include the OpenLayers library into the diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index 506e862c17..0a5f3b72ae 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -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'); diff --git a/pandora_console/godmode/setup/gis.php b/pandora_console/godmode/setup/gis.php new file mode 100755 index 0000000000..aed02109c6 --- /dev/null +++ b/pandora_console/godmode/setup/gis.php @@ -0,0 +1,47 @@ + '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 "

".__('Pandora Setup')." » "; +echo __('Map GIS')."

"; + +$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] = "
"; + +print_table ($table); +?> +prueba punto \ No newline at end of file diff --git a/pandora_console/images/gis_map/icons/icon.png b/pandora_console/images/gis_map/icons/icon.png new file mode 100755 index 0000000000..04e90c063b Binary files /dev/null and b/pandora_console/images/gis_map/icons/icon.png differ diff --git a/pandora_console/images/gis_map/icons/icon_bad.png b/pandora_console/images/gis_map/icons/icon_bad.png new file mode 100755 index 0000000000..452e757d75 Binary files /dev/null and b/pandora_console/images/gis_map/icons/icon_bad.png differ diff --git a/pandora_console/images/gis_map/icons/icon_ok.png b/pandora_console/images/gis_map/icons/icon_ok.png new file mode 100755 index 0000000000..f0b4d64acd Binary files /dev/null and b/pandora_console/images/gis_map/icons/icon_ok.png differ diff --git a/pandora_console/images/gis_map/icons/icon_warning.png b/pandora_console/images/gis_map/icons/icon_warning.png new file mode 100755 index 0000000000..a706306eae Binary files /dev/null and b/pandora_console/images/gis_map/icons/icon_warning.png differ diff --git a/pandora_console/include/styles/menu.css b/pandora_console/include/styles/menu.css index f15235301a..757f6d607f 100644 --- a/pandora_console/include/styles/menu.css +++ b/pandora_console/include/styles/menu.css @@ -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); } diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 42169ae9d4..24257e76f1 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -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; diff --git a/pandora_console/operation/menu.php b/pandora_console/operation/menu.php index b59a7d2e6e..7f20729f1d 100644 --- a/pandora_console/operation/menu.php +++ b/pandora_console/operation/menu.php @@ -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&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; + //END GIS Maps + //Visual console $menu["visualc"]["text"] = __('Visual console'); $menu["visualc"]["sec2"] = "operation/visual_console/index"; diff --git a/pandora_console/operation/visual_console/render_view.php b/pandora_console/operation/visual_console/render_view.php index 9288d749fe..95971cf02c 100644 --- a/pandora_console/operation/visual_console/render_view.php +++ b/pandora_console/operation/visual_console/render_view.php @@ -65,6 +65,8 @@ if ($config["pure"] == 0) { echo ""; } +echo " "; + if (give_acl ($config["id_user"], $id_group, "AW")) echo ''.print_image ("images/setup.png", true, array ("title" => __('Setup'))).'';