2010-04-06 Pablo de la Concepción <pablo.concepcion@artica.es>

* 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
This commit is contained in:
pabloconcepcion 2010-04-06 16:24:54 +00:00
parent 071d9f5a2f
commit 97462ee285
16 changed files with 234 additions and 3 deletions

View File

@ -1,3 +1,26 @@
2010-04-06 Pablo de la Concepción <pablo.concepcion@artica.es>
* 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 <miguel.dedios@artica.es>
* include/functions_agents.php: added parameter $where for SQL in function

View File

@ -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";

View File

@ -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');

View File

@ -36,7 +36,7 @@ echo '<form action="index.php?sec=gsetup&sec2=godmode/setup/gis_step_2" method="
switch ($action) {
case 'create_connection_map':
// Header
print_page_header (__('Create new map connection'), "", false, "", true);
print_page_header (__('Create new map connection'), "", false, "gis_setup_map_connection", true);
$mapConnection_name = '';
$mapConnection_group = '';
@ -55,7 +55,7 @@ switch ($action) {
break;
case 'edit_connection_map':
// Header
print_page_header (__('Edit map connection'), "", false, "", true);
print_page_header (__('Edit map connection'), "", false, "gis_setup_map_connection", true);
$idConnectionMap = get_parameter('id_connection_map');
$mapConnection = get_db_row_sql('SELECT * FROM tgis_map_connection WHERE id_tmap_connection = ' . $idConnectionMap);

Binary file not shown.

After

Width:  |  Height:  |  Size: 555 B

View File

@ -0,0 +1,58 @@
<?php
//Pandora FMS- http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser 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.
// Get list of agent + ip
// Params:
// * search_agents 1
// * id_agent
// * q
// * id_group
$search_agents = (bool) get_parameter ('search_agents');
if ($search_agents) {
require_once ('include/functions_agents.php');
$id_agent = (int) get_parameter ('id_agent');
$string = (string) get_parameter ('q'); /* q is what autocomplete plugin gives */
$id_group = (int) get_parameter('id_group');
$addedItems = html_entity_decode((string) get_parameter('add'));
$addedItems = json_decode($addedItems);
if ($addedItems != null) {
foreach ($addedItems as $item) {
echo $item . "|\n";
}
}
$filter = array ();
$filter[] = '(nombre COLLATE utf8_general_ci LIKE "%'.$string.'%" OR direccion LIKE "%'.$string.'%" OR comentarios LIKE "%'.$string.'%")';
$filter['id_grupo'] = $id_group;
$agents = get_agents ($filter, array ('id_agente','nombre', 'direccion'));
if ($agents === false)
return;
foreach ($agents as $agent) {
echo $agent['id_agente']."|".$agent['nombre']."|".$agent['direccion']."\n";
}
return;
}
?>

View File

@ -48,6 +48,9 @@ Once the selection of the connection (or connections) is done, there is a posibi
<p>
Each map has one or more layers<sup><span style="font-size:75%">1</span></sup> to show the agents. Each layer can have show the agents of a <strong>group</strong> and/or a <strong>list of agents</strong>. This way it's easy to set up the agents that will be shown on each Layer.
</p>
<p>
The layers can be set as <strong>visible</strong> or <strong>hidden</strong>, and select the <strong>group</strong> with the selector or add <strong>agents</strong> 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 <strong>order</strong> (<img src="../images/up.png" alt="move up icon"/> and <img src="../images/down.png" alt="move down icon" />) them, <strong>delete</strong> (<img src="../images/cross.png" alt="delete icon"/>), or <strong>edited</strong> (<img src="../images/config.png" alt="edit icon" />) again.
</p>
<hr/>
<sup><span style="font-size:75%;">1</span></sup> <span style="font-size:85%;">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.</span>

View File

@ -0,0 +1,36 @@
<?php
/**
* @package Include/help/en
*/
?>
<h1>GIS Connection Configuration</h1>
<p>
This page is the place where the admin can configure <strong>a connection to a GIS Map Servers</strong>.
</p>
<h2>Connection types</h2>
<p>
Currently Pandora FMS support 3 differet kinds of connections: OpenStreetMap, Google Maps and Static Image.
</p>
<h3>Open Street Maps</h3>
<p>
To use the Open Street maps connection you can setup your own server (see <a href="http://wiki.openstreetmap.org/wiki/Main_Page">http://wiki.openstreetmap.org/wiki/Main_Page</a> to start and <a href="http://wiki.openstreetmap.org/wiki/Mapnik">http://wiki.openstreetmap.org/wiki/Mapnik</a> as an example of how to render your own tiles.) also you can access the open street map tile server:</br>
<pre>
http://tile.openstreetmap.org/${z}/${x}/${y}.png
</pre>
Using their <a href="http://wiki.openstreetmap.org/wiki/Licence">Licence</a>
</p>
</p>
<h3>Google MAPS</h3>
<p>
First, you need to register and get a free API KEY. Read about this at:<br/>
<a href="http://code.google.com/intl/en/apis/maps/signup.html">http://code.google.com/intl/en/apis/maps/signup.html</a></p>
<p>A Google API Key is something like:</p>
<pre>
ABQIAAAAZuJY-VSG4gOH73b6mcUw1hTfSvFQRXGUGjHx8f036YCF-UKjgxT9lUhqOJx7KDHSnFnt46qnj89SOQ
</pre>
<h3>Static Image</h3>
<p>
It's also possible to use a static image (a PNG for example) as the only source of the map. To use it, the<strong>url</strong>, the <strong>positional information</strong> of the image and the <strong>height</strong> and <strong>width</strong> must be filled.
</p>

View File

@ -0,0 +1,7 @@
<?php
/**
* @package Include/help/en
*/
?>
<h1>Manage Service Elements</h1>

View File

@ -0,0 +1,7 @@
<?php
/**
* @package Include/help/en
*/
?>
<h1>Manage Services</h1>

View File

@ -0,0 +1,13 @@
<?php
/**
* @package Include/help/en
*/
?>
<h1>GIS Connection Configurations</h1>
<p>
This page is the place where the admin can configure <strong>connections to GIS Map Servers</strong>.
</p>
<p>
Here it is possible to see the list of defined connections, <strong>edit</strong> any one of them by clicking on their name, <strong>delete</strong> any connection by clicking on the delete icon (<img src="../images/cross.png" alt="delete icon" />) or <strong>create</strong> new connections using the create button.
</p>

View File

@ -0,0 +1,8 @@
<?php
/**
* @package Include/help/en
*/
?>
<h1>View Services</h1>
<p>This is the view of the list of the services with their status</p>

View File

@ -0,0 +1,6 @@
<?php
/**
* @package Include/help/en
*/
?>
<h1>View Service Detail</h1>

View File

@ -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);
}

View File

@ -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%;
}

View File

@ -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";