From 92f28d4b594cc1301a9e728b89bd8b70f77a31c8 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Mon, 18 Jan 2010 14:23:30 +0000 Subject: [PATCH] 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. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2279 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 9 ++++ pandora_console/godmode/menu.php | 1 + pandora_console/godmode/setup/gis.php | 47 ++++++++++++++++++ pandora_console/images/gis_map/icons/icon.png | Bin 0 -> 824 bytes .../images/gis_map/icons/icon_bad.png | Bin 0 -> 849 bytes .../images/gis_map/icons/icon_ok.png | Bin 0 -> 859 bytes .../images/gis_map/icons/icon_warning.png | Bin 0 -> 779 bytes pandora_console/include/styles/menu.css | 3 ++ pandora_console/include/styles/pandora.css | 3 ++ pandora_console/operation/menu.php | 25 ++++++++++ .../operation/visual_console/render_view.php | 2 + 11 files changed, 90 insertions(+) create mode 100755 pandora_console/godmode/setup/gis.php create mode 100755 pandora_console/images/gis_map/icons/icon.png create mode 100755 pandora_console/images/gis_map/icons/icon_bad.png create mode 100755 pandora_console/images/gis_map/icons/icon_ok.png create mode 100755 pandora_console/images/gis_map/icons/icon_warning.png 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 0000000000000000000000000000000000000000..04e90c063b9f96d85f908c1a32e4c1895b2e22fb GIT binary patch literal 824 zcmV-81IPS{P)Px#24YJ`L;(B%=>ShO*Rc%%000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iXM< z4KohP(ZpZ?001>~MObu0Z*6U5Zgc=BV<{jqFfcSAN?~htVjxp=Wod3@ataDVa%Ew3 zWn>_CX>@2HRA^-&M@dakklBlG0007aNklTU07JC0*LoKfgYKioqd?eWUd;9QKyuC)HIC(AinPtLWpR!T9&41@O}T(=;-K~ zN~Q7&0F=F32)UK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*xhQ!C~lJ1Eczve5%tMKjrH698-8B0Xl1d=yP4 zV}&>_o+R0avz&z;HxLd|GCoW~;x|MR{WG$5MNL0TrD>b(yek~+Mm%JV!9S-8k zdk5pgxPhVL?MLl6&Vg15k^!{{i9ROY&1anzTt3v!y}W|olT=$-CSwNsBB}cYng%u- z9Im|-&sZF6YGsN4#p~_Z-9{Q_rp5X{hLw^7O literal 0 HcmV?d00001 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'))).'';