2010-03-04 Sancho Lerena <slerena@gmail.com>

* pandoradb_data.sql: Added news, default timezone and other 
        minor changes. GIS is disabled by default now.

        * include/config_process.php: Force a timezone if not defined.

        * operation/gis_maps/index.php,
        operation/agentes/gis_view.php: Config.php and header stuff 

        * operation/servers/view_server_detail.php
        operation/menu.php: Recon operation detail is now shown in the left
        menu.

        * admin_access_logs.php,
        db/db_audit.php
        db/db_info.php
        db/db_event.php
        agentes/configurar_agente.php
        gis_maps/configure_gis_map.php
        gis_maps/index.php: More headers and config.php include stuff.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2469 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
slerena 2010-03-04 16:22:25 +00:00
parent f52a60ce8c
commit 6763128c05
14 changed files with 86 additions and 44 deletions

View File

@ -1,3 +1,25 @@
2010-03-04 Sancho Lerena <slerena@gmail.com>
* pandoradb_data.sql: Added news, default timezone and other
minor changes. GIS is disabled by default now.
* include/config_process.php: Force a timezone if not defined.
* operation/gis_maps/index.php,
operation/agentes/gis_view.php: Config.php and header stuff
* operation/servers/view_server_detail.php
operation/menu.php: Recon operation detail is now shown in the left
menu.
* admin_access_logs.php,
db/db_audit.php
db/db_info.php
db/db_event.php
agentes/configurar_agente.php
gis_maps/configure_gis_map.php
gis_maps/index.php: More headers and config.php include stuff.
2010-03-04 Raúl Mateos <raulofpandora@gmail.com>
* (lot of files): Updated year and headers.

View File

@ -29,13 +29,14 @@ if (! give_acl ($config['id_user'], 0, "PM")) {
exit;
}
echo "<h2>" . __('Pandora audit') . " &raquo; " .__('Review Logs') . "</h2>";
print_page_header (__('Pandora audit')." &raquo; ".__('Review Logs'), "", false, "", true );
$offset = get_parameter ("offset", 0);
$tipo_log = get_parameter ("tipo_log", 'all');
echo '<table width=100% border=0>';
echo "<tr><td colspan=2>";
echo '<h3>'.__('Filter').'</h3>';
echo '<b>'.__('Filter').'</b>';
echo "<td rowspan=2>";
if ($config['flash_charts']) {
echo graphic_user_activity (300, 140);

View File

@ -247,6 +247,12 @@ if ($id_agente) {
// IE might not always show an empty div, added space
echo '<div style="height: 25px;">&nbsp;</div>';
}
// Create agent
else {
print_page_header (__('Agent manager'), "images/bricks.png", false, "", true);
}
$delete_conf_file = (bool) get_parameter('delete_conf_file');

View File

@ -16,6 +16,8 @@
// Load global vars
global $config;
print_page_header (__('Database audit purge'), "", false, "", true);
check_login ();
if (! give_acl ($config['id_user'], 0, "DM")) {
@ -66,9 +68,6 @@ if (isset($_POST["purgedb"])){ # Fixed 2005-1-13, nil
}
# End of get parameters block
echo "<h2>".__('Database maintenance')." &raquo; ";
echo __('Database audit purge')."</h2>";
echo "<table cellpadding='4' cellspacing='4' class='databox'>";
echo "<tr><td class='datos'>";
$result = get_db_row_sql ("SELECT COUNT(*) AS total, MIN(fecha) AS first_date, MAX(fecha) AS latest_date FROM tsesion");

View File

@ -18,6 +18,8 @@ global $config;
check_login ();
print_page_header (__('Event database cleanup'), "", false, "", true);
if (! give_acl ($config['id_user'], 0, "DM")) {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", "Trying to access Database Management Event");
require ("general/noaccess.php");
@ -39,8 +41,6 @@ if (isset ($_POST["date_purge"])){
}
# End of get parameters block
echo "<h2>".__('Database maintenance')." &raquo; ".__('Event database cleanup')."</h2>";
$row = get_db_row_sql ("SELECT COUNT(*) AS total, MIN(timestamp) AS first_date, MAX(timestamp) AS latest_date FROM tevento");
$table->data = array ();

View File

@ -22,6 +22,8 @@ if ($config['flash_charts']) {
require('include/fgraph.php');
}
print_page_header (__('Database information'), "", false, "", true);
check_login ();
if (! give_acl ($config['id_user'], 0, "DM")) {
@ -40,8 +42,6 @@ if (! give_acl ($config['id_user'], 0, "DM")) {
- A more powerful selection (by Agent, by Module, etc).
*/
echo "<h2>".__('Database maintenance')." &raquo; ";
echo __('Database information')."</h2>";
if ($config['flash_charts']) {
$width=600;

View File

@ -17,6 +17,9 @@ global $config;
check_login ();
print_page_header (__('GIS Maps builder'), "images/server_web.png", false, "gis_map_builder", true);
require_once ('include/functions_gis.php');
require_javascript_file('openlayers.pandora');

View File

@ -53,7 +53,7 @@ switch ($action) {
break;
}
print_page_header (__('GIS Maps builder'), "images/server_web.png", false, "gis_map_builder", true);
print_page_header (__('GIS Maps builder'), "images/server_web.png", false, "", true);
$table->width = '500px';
$table->head[0] = __('Map name');

View File

@ -22,7 +22,7 @@
/**
* Pandora build version and version
*/
$build_version = 'PC100301'; // Remember is YYMMDD
$build_version = 'PC100303'; // Remember is YYMMDD
$pandora_version = 'v3.1-dev';
/* Help to debug problems. Override global PHP configuration */
@ -76,6 +76,10 @@ $config["remote_addr"] = $_SERVER['REMOTE_ADDR'];
$config['user_language'] = $config["language"];
// Set a the system timezone default
if ((!isset($config["timezone"])) OR ($config["timezone"] == "")){
$config["timezone"] = "Europe/Berlin";
}
date_default_timezone_set($config["timezone"]);
// Set user language if provided, overriding System language

View File

@ -35,11 +35,10 @@ $agentId = get_parameter('id_agente');
$agent_name = get_agent_name($agentId);
$agentData = getDataLastPositionAgent($id_agente);
echo "<h2>".__('Received data from')." ". $agent_name . " </h2>";
echo "<h3>" . __("Map with the last position/s") . " " . human_time_description ($period) ."</h3>";
/* Map with the current position */
echo "<div id=\"".$agent_name."_agent_map\" style=\"border:1px solid black; width:98%; height: 30em;\"></div>";
echo "<div id=\"".$agent_name."_agent_map\" style=\"border:1px solid black; width:98%; height: 39em;\"></div>";
if (!getAgentMap($agentId, "500px", "98%", true, true, $period)) {
echo "<br /><div class='nf'>" . __("There is no default map.") . "</div>";
}

View File

@ -14,7 +14,7 @@
*/
// Load global vars
require_once ("include/config.php");
global $config;
// Login check
check_login ();
@ -23,7 +23,7 @@ require_once ('include/functions_gis.php');
require_javascript_file('openlayers.pandora');
print_page_header(__('GIS Maps')." &raquo; ".__('Summary'), "images/server_web.png", false, "gis_map_summary");
print_page_header(__('GIS Maps')." &raquo; ".__('Summary'), "images/server_web.png", false, "");
$maps = getMaps();

View File

@ -118,6 +118,22 @@ if (give_acl ($config['id_user'], 0, "AR")) {
$menu["estado_server"]["text"] = __('Pandora servers');
$menu["estado_server"]["sec2"] = "operation/servers/view_server";
$menu["estado_server"]["id"] = "oper-servers";
$sub = array ();
// Show all recon servers, and generate menu for details
$servers = get_db_all_rows_sql ('SELECT * FROM tserver WHERE server_type = 3');
if ($servers === false) {
$servers = array ();
}
foreach ($servers as $serverItem) {
$sub["operation/servers/view_server_detail&server_id=".$serverItem["id_server"]]["text"] = $serverItem["name"];
}
$menu["estado_server"]["sub"] = $sub;
//End of server view
//End of server view
}

View File

@ -19,6 +19,13 @@ global $config;
check_login ();
$id_server = (int) get_parameter ("server_id", -1);
$options = "<li><a href='index.php?sec=estado_server&sec2=operation/servers/view_server_detail&server_id=$id_server'><img src='images/refresh.png'></a></li>";
print_page_header (__('Pandora servers'), "images/server.png", false, "", false, $options);
if (! give_acl ($config['id_user'], 0, "AR")) {
audit_db ($config["id_user"], $REMOTE_ADDR, "ACL Violation",
"Trying to access recon task viewer");
@ -42,21 +49,9 @@ if (give_acl ($config['id_user'], 0, "PM")) {
}
}
$id_server = (int) get_parameter ("server_id", -1);
$server_name = get_server_name ($id_server);
$recon_tasks = get_db_all_rows_field_filter ("trecon_task", "id_recon_server", $id_server);
echo "<h2>".__('Pandora servers')." &raquo; ";
echo __('Configuration detail') . " - ".safe_input ($server_name);
echo '&nbsp;<a href="index.php?sec=estado_server&amp;sec2=operation/servers/view_server_detail&amp;server_id='.$id_server.'">';
print_image ("images/refresh.png");
echo "</a>&nbsp;";
if (check_acl ($config["id_user"],0,"PW")){
echo "<a href='index.php?sec=gservers&sec2=godmode/servers/manage_recontask'><img src='images/setup.png'></a>";
}
echo "</h2>";
// Show network tasks for Recon Server
if ($recon_tasks === false) {
$recon_tasks = array ();

View File

@ -47,7 +47,7 @@ INSERT INTO `tconfig` VALUES
(6,'graph_res','5'),
(7,'step_compact','1'),
(8,'db_scheme_version','3.1-dev'),
(9,'db_scheme_build','PD100209'),
(9,'db_scheme_build','PD100302'),
(13,'show_unknown','0'),
(14,'show_lastalerts','1'),
(15,'style','pandora'),
@ -64,8 +64,10 @@ INSERT INTO `tconfig` VALUES
(26, 'prominent_time', 0),
(27, 'timesource', 'system'),
(28, 'realtimestats', '1'),
(29, 'stats_interval', '300'),
(30, 'activate_gis', '1');
(29, 'stats_interval', '60'),
(30, 'activate_gis', '0'),
(31, 'timezone', 'Europe/Berlin');
UNLOCK TABLES;
@ -160,11 +162,10 @@ UNLOCK TABLES;
LOCK TABLES `tlink` WRITE;
INSERT INTO `tlink` VALUES
(1,'Pandora FMS Manual','https://openideas.info/wiki/index.php?title=Pandora_3.x:Documentation'),
(2,'ArticaST','http://www.artica.es'),
(3,'Pandora FMS','http://pandora.sourceforge.net'),
(4,'Babel Enterprise','http://babel.sourceforge.net'),
(5,'Openideas','http://www.openideas.info'),
(6,'Google','http://www.google.com');
(2,'Pandora FMS','http://pandorafms.org'),
(3,'Report a bug','https://sourceforge.net/tracker/?func=add&group_id=155200&atid=794852'),
(4,'Suggest new feature','http://sourceforge.net/tracker/?group_id=155200&atid=794855'),
(5,'Module library','http://pandorafms.org/?sec=community&sec2=repository&lng=es');
UNLOCK TABLES;
--
@ -218,19 +219,14 @@ INSERT INTO `ttipo_modulo` VALUES
(16,'remote_snmp_inc',3,'Remote SNMP network agent, incremental data','mod_snmp_inc.png'),
(17,'remote_snmp_string',5,'Remote SNMP network agent, alphanumeric data','mod_snmp_string.png'),
(18,'remote_snmp_proc',4,'Remote SNMP network agent, boolean data','mod_snmp_proc.png'),
(21,'async_proc', 7, 'Asyncronous proc data', 'mod_async_proc.png'),
(22,'async_data', 6, 'Asyncronous numeric data', 'mod_async_data.png'),
(23,'async_string', 8, 'Asyncronous string data', 'mod_async_string.png'),
(30,'log4x',0,'Log4x','mod_log4x.png'),
(100,'keep_alive',-1,'KeepAlive','mod_keepalive.png');
-- Not yet implemented
-- (19,'image_jpg',9,'Image JPG data', 'mod_image_jpg.png'),
-- (20,'image_png',9,'Image PNG data', 'mod_image_png.png');
-- Categoria field is used to segregate several types (plugin, agents, network) on their data
-- Categoria field is used to segregate several types
-- (plugin, agents, network) on their data
-- types, could be used or could be avoided and use directly primary key (id_tipo)
--
@ -251,7 +247,8 @@ INSERT INTO `tusuario_perfil` VALUES (1,'admin',5,1,'admin');
INSERT INTO `tperfil` VALUES (1,'Operator (Read)',0,1,0,1,0,0,0,0,0,0),(2,'Operator (Write)',1,1,0,1,0,0,0,0,0,0),(3,'Chief Operator',1,1,1,1,0,0,0,0,0,0),(4,'Group coordinator',1,1,1,1,1,1,1,0,0,0),(5,'Pandora Administrator',1,1,1,1,1,1,1,1,1,1);
INSERT INTO `tnews` VALUES (1,'admin','Welcome to Pandora FMS 3.0!','This is the new Pandora FMS Console. A lot of new features have been added since last version. Please read the documentation about it, and feel free to test any option.\r\n\r\nThe Pandora FMS Team.',NOW());
INSERT INTO `tnews` VALUES (1,'admin','Welcome to Pandora FMS 3.1!','This is the new Pandora FMS Console. A lot of new features have been added since last version. Please read the documentation about it, and feel free to test any option.\r\n\r\nThe Pandora FMS Team.',NOW()),
(2,'admin','New GIS Feature','Try our new GIS representation, activate GIS in Setup to see new available options.',NOW());
INSERT INTO tmodule VALUES (1,'Agent module');
INSERT INTO tmodule VALUES (2,'Network module');