From 97462ee285c2a032e152a16dd0f4ac94bb7b9ede Mon Sep 17 00:00:00 2001 From: pabloconcepcion Date: Tue, 6 Apr 2010 16:24:54 +0000 Subject: [PATCH] =?UTF-8?q?2010-04-06=20=20Pablo=20de=20la=20Concepci?= =?UTF-8?q?=C3=B3n=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * operation/menu.php, godmode/menu.php: Hooks to services pages (Enterprise) * images/box.png: Icon for services (Enterprise) * godmode/setup/gis_step_2.php, godmode/setup/gis.php: Links to help pages * include/help/en/help_service_elements_management.php, include/help/en/help_view_services_detail.php, include/help/en/help_view_services.php, include/help/en/help_services_management.php: first version of services help pages. * include/help/en/help_setup_gis_index.php, include/help/en/help_configure_gis_map.php, include/help/en/help_gis_setup_map_connection.php: GIS help pages updated * include/styles/pandora_forms.css, include/styles/menu.css: New styles for forms and style for service menu entry icons. * include/ajax/agent.php: New AJAX file to get info about agents. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2544 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 23 +++++++ pandora_console/godmode/menu.php | 4 ++ pandora_console/godmode/setup/gis.php | 2 +- pandora_console/godmode/setup/gis_step_2.php | 4 +- pandora_console/images/box.png | Bin 0 -> 555 bytes pandora_console/include/ajax/agent.php | 58 ++++++++++++++++++ .../help/en/help_configure_gis_map.php | 3 + .../help/en/help_gis_setup_map_connection.php | 36 +++++++++++ .../en/help_service_elements_management.php | 7 +++ .../help/en/help_services_management.php | 7 +++ .../include/help/en/help_setup_gis_index.php | 13 ++++ .../include/help/en/help_view_services.php | 8 +++ .../help/en/help_view_services_detail.php | 6 ++ pandora_console/include/styles/menu.css | 6 ++ .../include/styles/pandora_forms.css | 58 ++++++++++++++++++ pandora_console/operation/menu.php | 2 + 16 files changed, 234 insertions(+), 3 deletions(-) create mode 100644 pandora_console/images/box.png create mode 100644 pandora_console/include/ajax/agent.php create mode 100644 pandora_console/include/help/en/help_gis_setup_map_connection.php create mode 100644 pandora_console/include/help/en/help_service_elements_management.php create mode 100644 pandora_console/include/help/en/help_services_management.php create mode 100644 pandora_console/include/help/en/help_setup_gis_index.php create mode 100644 pandora_console/include/help/en/help_view_services.php create mode 100644 pandora_console/include/help/en/help_view_services_detail.php create mode 100644 pandora_console/include/styles/pandora_forms.css diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 88b07e1125..11dc3ef1c0 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,26 @@ +2010-04-06 Pablo de la Concepción + + * operation/menu.php, godmode/menu.php: Hooks to services pages (Enterprise) + + * images/box.png: Icon for services (Enterprise) + + * godmode/setup/gis_step_2.php, godmode/setup/gis.php: Links to help pages + + * include/help/en/help_service_elements_management.php, + include/help/en/help_view_services_detail.php, + include/help/en/help_view_services.php, + include/help/en/help_services_management.php: first version of services + help pages. + + * include/help/en/help_setup_gis_index.php, + include/help/en/help_configure_gis_map.php, + include/help/en/help_gis_setup_map_connection.php: GIS help pages updated + + * include/styles/pandora_forms.css, include/styles/menu.css: New styles for + forms and style for service menu entry icons. + + * include/ajax/agent.php: New AJAX file to get info about agents. + 2010-04-05 Miguel de Dios * include/functions_agents.php: added parameter $where for SQL in function diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index dfdf056308..099c309d85 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -43,6 +43,10 @@ if (give_acl ($config['id_user'], 0, "AW")) { $menu["gagente"]["sub"] = $sub; } +if (give_acl ($config['id_user'], 0, "AW")) { + enterprise_hook ('services_godmenu'); +} + if (give_acl ($config['id_user'], 0, "PM")) { $menu["gmodules"]["text"] = __('Manage modules'); $menu["gmodules"]["sec2"] = "godmode/modules/module_list"; diff --git a/pandora_console/godmode/setup/gis.php b/pandora_console/godmode/setup/gis.php index c7395b2486..4fd2c75540 100755 --- a/pandora_console/godmode/setup/gis.php +++ b/pandora_console/godmode/setup/gis.php @@ -29,7 +29,7 @@ require_once ('include/functions_gis.php'); require_javascript_file('openlayers.pandora'); // Header -print_page_header (__('Map conections GIS'), "", false, "", true); +print_page_header (__('Map conections GIS'), "", false, "setup_gis_index", true); $action = get_parameter('action'); diff --git a/pandora_console/godmode/setup/gis_step_2.php b/pandora_console/godmode/setup/gis_step_2.php index 260f095a7f..7e4a99e57b 100755 --- a/pandora_console/godmode/setup/gis_step_2.php +++ b/pandora_console/godmode/setup/gis_step_2.php @@ -36,7 +36,7 @@ echo '
diff --git a/pandora_console/include/help/en/help_configure_gis_map.php b/pandora_console/include/help/en/help_configure_gis_map.php index 72222335de..fa11f454c8 100644 --- a/pandora_console/include/help/en/help_configure_gis_map.php +++ b/pandora_console/include/help/en/help_configure_gis_map.php @@ -48,6 +48,9 @@ Once the selection of the connection (or connections) is done, there is a posibi

Each map has one or more layers1 to show the agents. Each layer can have show the agents of a group and/or a list of agents. This way it's easy to set up the agents that will be shown on each Layer.

+

+The layers can be set as visible or hidden, and select the group with the selector or add agents with the box. Once the layer is defined (it will not be completely saved until the whole map is saved) it will be moved to the left column of defined layers, where it is possible to order (move up icon and move down icon) them, delete (delete icon), or edited (edit icon) again. +


1 The default map can have 0 layers as is the one used in the agent GIS view and only uses one layer with the agent name. diff --git a/pandora_console/include/help/en/help_gis_setup_map_connection.php b/pandora_console/include/help/en/help_gis_setup_map_connection.php new file mode 100644 index 0000000000..f2aa87b087 --- /dev/null +++ b/pandora_console/include/help/en/help_gis_setup_map_connection.php @@ -0,0 +1,36 @@ + +

GIS Connection Configuration

+ +

+This page is the place where the admin can configure a connection to a GIS Map Servers. +

+ +

Connection types

+

+Currently Pandora FMS support 3 differet kinds of connections: OpenStreetMap, Google Maps and Static Image. +

+

Open Street Maps

+

+To use the Open Street maps connection you can setup your own server (see http://wiki.openstreetmap.org/wiki/Main_Page to start and http://wiki.openstreetmap.org/wiki/Mapnik as an example of how to render your own tiles.) also you can access the open street map tile server:
+

+http://tile.openstreetmap.org/${z}/${x}/${y}.png
+
+Using their Licence +

+

+

Google MAPS

+

+First, you need to register and get a free API KEY. Read about this at:
+http://code.google.com/intl/en/apis/maps/signup.html

+

A Google API Key is something like:

+
+ABQIAAAAZuJY-VSG4gOH73b6mcUw1hTfSvFQRXGUGjHx8f036YCF-UKjgxT9lUhqOJx7KDHSnFnt46qnj89SOQ
+
+

Static Image

+

+It's also possible to use a static image (a PNG for example) as the only source of the map. To use it, theurl, the positional information of the image and the height and width must be filled. +

diff --git a/pandora_console/include/help/en/help_service_elements_management.php b/pandora_console/include/help/en/help_service_elements_management.php new file mode 100644 index 0000000000..5fe431a211 --- /dev/null +++ b/pandora_console/include/help/en/help_service_elements_management.php @@ -0,0 +1,7 @@ + +

Manage Service Elements

+ diff --git a/pandora_console/include/help/en/help_services_management.php b/pandora_console/include/help/en/help_services_management.php new file mode 100644 index 0000000000..7107d71b32 --- /dev/null +++ b/pandora_console/include/help/en/help_services_management.php @@ -0,0 +1,7 @@ + +

Manage Services

+ diff --git a/pandora_console/include/help/en/help_setup_gis_index.php b/pandora_console/include/help/en/help_setup_gis_index.php new file mode 100644 index 0000000000..83ed2e9ece --- /dev/null +++ b/pandora_console/include/help/en/help_setup_gis_index.php @@ -0,0 +1,13 @@ + +

GIS Connection Configurations

+ +

+This page is the place where the admin can configure connections to GIS Map Servers. +

+

+Here it is possible to see the list of defined connections, edit any one of them by clicking on their name, delete any connection by clicking on the delete icon (delete icon) or create new connections using the create button. +

diff --git a/pandora_console/include/help/en/help_view_services.php b/pandora_console/include/help/en/help_view_services.php new file mode 100644 index 0000000000..262beed05b --- /dev/null +++ b/pandora_console/include/help/en/help_view_services.php @@ -0,0 +1,8 @@ + +

View Services

+

This is the view of the list of the services with their status

+ diff --git a/pandora_console/include/help/en/help_view_services_detail.php b/pandora_console/include/help/en/help_view_services_detail.php new file mode 100644 index 0000000000..423c4de71e --- /dev/null +++ b/pandora_console/include/help/en/help_view_services_detail.php @@ -0,0 +1,6 @@ + +

View Service Detail

diff --git a/pandora_console/include/styles/menu.css b/pandora_console/include/styles/menu.css index 2319ec710a..edf464f29d 100644 --- a/pandora_console/include/styles/menu.css +++ b/pandora_console/include/styles/menu.css @@ -97,6 +97,9 @@ #icon_oper-agents { background-image: url(../../images/bricks.png); } +#icon_oper-services { + background-image: url(../../images/box.png); +} #icon_oper-servers { background-image: url(../../images/server.png); } @@ -137,6 +140,9 @@ #icon_god-agents { background-image: url(../../images/god1.png); } +#icon_god-services { + background-image: url(../../images/box.png); +} #icon_god-modules { background-image: url(../../images/brick.png); } diff --git a/pandora_console/include/styles/pandora_forms.css b/pandora_console/include/styles/pandora_forms.css new file mode 100644 index 0000000000..7983b50bce --- /dev/null +++ b/pandora_console/include/styles/pandora_forms.css @@ -0,0 +1,58 @@ +/* + +Author: The Pandora FMS team +Name: Forms +Description: Forms based on fieldset and labels to improve accesibility + +// Pandora FMS - the Flexible Monitoring System +// Copyright (c) 2004-2010 Artica Soluciones Tecnológicas S.L + +// 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; 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. +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +fieldset { + background-color:#fafafa; + border: 1px solid #f2f2f2; + padding:0.5em; + margin-top:0.5em; + margin-bottom:1em; + position:relative; +} +fieldset legend { + font-size:1.3em; + font-weight:bold; + color:#3f4e2f; + top:-2em; +} +fieldset label { + font-weight: bold; + display:block; + margin-right:1em; + margin-left:1em; + margin-bottom:1em; + width:25%; + float:left; +} +fieldset select, fieldset input { + position:relative; + right:1em; + margin-bottom:0.5em; +} +fieldset br { + clear:left; +} + +.pandora_form input.sub { + position:relative; + left:80%; +} diff --git a/pandora_console/operation/menu.php b/pandora_console/operation/menu.php index 457887161d..5888846ef2 100644 --- a/pandora_console/operation/menu.php +++ b/pandora_console/operation/menu.php @@ -32,6 +32,8 @@ if (give_acl ($config['id_user'], 0, "AR")) { enterprise_hook ('dashboard_menu'); + enterprise_hook ('services_menu'); + //View agents $menu["estado"]["text"] = __('View agents'); $menu["estado"]["sec2"] = "operation/agentes/tactical";