2008-04-09 Sancho Lerena <slerena@gmail.com>

* pandoradb.sql: New header.

	* pandoradb_data.sql: Removed /**/ comments, due problems with
	installer.

	* install.php: Updated installer for 2.0 version.

	* functions.php: Fix small problem in pandora_help() with icon.

	* estado_alertas.php: Do not show header "combined alert" if there
	is no complex alerts.

	* reporting_viewer.php: Round data for monitor SLA report.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@796 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
slerena 2008-04-06 22:18:33 +00:00
parent 32402b175f
commit 2f95662563
9 changed files with 103 additions and 31 deletions

View File

@ -1,3 +1,19 @@
2008-04-09 Sancho Lerena <slerena@gmail.com>
* pandoradb.sql: New header.
* pandoradb_data.sql: Removed /**/ comments, due problems with
installer.
* install.php: Updated installer for 2.0 version.
* functions.php: Fix small problem in pandora_help() with icon.
* estado_alertas.php: Do not show header "combined alert" if there
is no complex alerts.
* reporting_viewer.php: Round data for monitor SLA report.
2008-04-04 Jorge Gonzalez <jorge.gonzalez@artica.es> 2008-04-04 Jorge Gonzalez <jorge.gonzalez@artica.es>
* godmode/agentes/module_manager_editor_data.php, * godmode/agentes/module_manager_editor_data.php,

View File

@ -16,14 +16,16 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// Database configuration (default ones) // Database configuration (default ones)
$config["dbname"]="pandora"; // Default values
$config["dbuser"]="pandora";
$config["dbpass"]="pandora"; // $config["dbname"]="pandora";
$config["dbhost"]="localhost"; // $config["dbuser"]="pandora";
// $config["dbpass"]="pandora";
// $config["dbhost"]="localhost";
// This is used for reporting, please add "/" character at the end // This is used for reporting, please add "/" character at the end
$config["homedir"]="/var/www/pandora_console/"; // $config["homedir"]="/var/www/pandora_console/";
$config["homeurl"]="/pandora_console/"; // $config["homeurl"]="/pandora_console/";
// Do not display any ERROR // Do not display any ERROR
//error_reporting(0); // Need to use active console at this moment //error_reporting(0); // Need to use active console at this moment

View File

@ -1,4 +1,13 @@
<?php <?php
// Begin of automatic config file
$config["dbname"]="pandora"; // MySQL DataBase name
$config["dbuser"]="pandora"; // DB User
$config["dbpass"]="iysukzjq"; // DB Password
$config["dbhost"]="localhost"; // DB Host
$config["homedir"]="/var/www/pandora/"; // Config homedir
$config["homeurl"]="http://localhost/pandora"; // Base URL
// End of automatic config file
?><?php
// Pandora FMS - the Free Monitoring System // Pandora FMS - the Free Monitoring System
// ======================================== // ========================================
// Copyright (c) 2008 Artica Soluciones Tecnológicas, http://www.artica.es // Copyright (c) 2008 Artica Soluciones Tecnológicas, http://www.artica.es
@ -14,23 +23,24 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// Database configuration (default ones) // Database configuration (default ones)
$config["dbname"]="pandora"; // Default values
$config["dbuser"]="pandora";
$config["dbpass"]="pandora"; // $config["dbname"]="pandora";
$config["dbhost"]="localhost"; // $config["dbuser"]="pandora";
// $config["dbpass"]="pandora";
// $config["dbhost"]="localhost";
// This is used for reporting, please add "/" character at the end // This is used for reporting, please add "/" character at the end
$config["homedir"]="/var/www/pandora_console/"; // $config["homedir"]="/var/www/pandora_console/";
$config["homeurl"]="/pandora_console/"; // $config["homeurl"]="/pandora_console/";
// Do not display any ERROR // Do not display any ERROR
//error_reporting(0); // Need to use active console at this moment //error_reporting(0); // Need to use active console at this moment
// Display ALL errors // Display ALL errors
error_reporting(E_ALL); error_reporting(E_ERROR);
// This is directory where placed "/attachment" directory, to upload files stores. // This is directory where placed "/attachment" directory, to upload files stores.
// This MUST be writtable by http server user, and should be in pandora root. // This MUST be writtable by http server user, and should be in pandora root.
@ -39,7 +49,7 @@ error_reporting(E_ALL);
$config["attachment_store"]=$config["homedir"]; $config["attachment_store"]=$config["homedir"];
// Default font used for graphics (a Free TrueType font included with Pandora FMS) // Default font used for graphics (a Free TrueType font included with Pandora FMS)
$config["fontpath"] = $config["homedir"]."/include/FreeSans.ttf"; $config["fontpath"] = $config["homedir"]."/reporting/FreeSans.ttf";
// Style (pandora by default) // Style (pandora by default)
$config["style"] = "pandora"; $config["style"] = "pandora";

View File

@ -19,7 +19,7 @@
function pandora_help ($id, $return = false) { function pandora_help ($id, $return = false) {
global $config; global $config;
$output = '<img src="'.$config['homeurl'].'images/help.png" onClick="pandora_help(\''.$id.'\')">'; $output = '<img src="'.$config['homeurl'].'/images/help.png" onClick="pandora_help(\''.$id.'\')">';
if ($return) if ($return)
return $return; return $return;
echo $output; echo $output;

View File

@ -128,6 +128,7 @@ function parse_mysql_dump($url){
if(trim($sql_line) != "" && strpos($sql_line, "--") === false){ if(trim($sql_line) != "" && strpos($sql_line, "--") === false){
$query .= $sql_line; $query .= $sql_line;
if(preg_match("/;[\040]*\$/", $sql_line)){ if(preg_match("/;[\040]*\$/", $sql_line)){
// echo "DEBUG $query <br>";
if (!$result = mysql_query($query)) if (!$result = mysql_query($query))
return 0; return 0;
$query = ""; $query = "";
@ -153,7 +154,7 @@ function install_step1() {
<h1>Pandora FMS installation wizard. Step #1 of 4</h1> <h1>Pandora FMS installation wizard. Step #1 of 4</h1>
<div id='wizard' style='height: 380px;'> <div id='wizard' style='height: 380px;'>
<div id='install_box'> <div id='install_box'>
<h1>Welcome to Pandora FMS 1.3 installation Wizard</h1> <h1>Welcome to Pandora FMS 2.0 installation Wizard</h1>
<p>This wizard helps you to quick install Pandora FMS console in your system.</p> <p>This wizard helps you to quick install Pandora FMS console in your system.</p>
<p>In four steps checks all dependencies and make your configuration for a quick installation.</p> <p>In four steps checks all dependencies and make your configuration for a quick installation.</p>
<p>For more information, please refer to documentation.</p> <p>For more information, please refer to documentation.</p>
@ -163,7 +164,7 @@ function install_step1() {
echo "<div class='warn'><b>Warning:</b> You already have a config.php file. Configuration and database would be overwritten if you continued.</div>"; echo "<div class='warn'><b>Warning:</b> You already have a config.php file. Configuration and database would be overwritten if you continued.</div>";
} }
echo "<div class='warn'><b>Warning:</b> This installer will <b>overwrite and destroy</b> your existing Pandora FMS configuration and <b>Database</b>. Before continue, please <b>be sure that you have no valuable Pandora FMS data in your Database.</b><br></div>"; echo "<div class='warn'><b>Warning:</b> This installer will <b>overwrite and destroy</b> your existing Pandora FMS configuration and <b>Database</b>. Before continue, please <b>be sure that you have no valuable Pandora FMS data in your Database.</b><br></div>";
echo "<div class='info'>If you want to <b>upgrade</b> from Pandora FMS 1.2 to 1.3 version, echo "<div class='info'>If you want to <b>upgrade</b> from Pandora FMS 1.3.x to 2.0 version,
use the <a href='upgrade.php'>automated update wizard</a></div>"; use the <a href='upgrade.php'>automated update wizard</a></div>";
echo " echo "
</div> </div>
@ -345,15 +346,14 @@ function install_step4() {
$cfgin = fopen ("include/config.inc.php","r"); $cfgin = fopen ("include/config.inc.php","r");
$cfgout = fopen ($pandora_config,"w"); $cfgout = fopen ($pandora_config,"w");
$config_contents = fread ($cfgin, filesize("include/config.inc.php")); $config_contents = fread ($cfgin, filesize("include/config.inc.php"));
$config_new = '<?php $config_new = '<?php
// Begin of automatic config file // Begin of automatic config file
$dbname="'.$dbname.'"; // MySQL DataBase name $config["dbname"]="'.$dbname.'"; // MySQL DataBase name
$dbuser="pandora"; // DB User $config["dbuser"]="pandora"; // DB User
$dbpassword="'.$random_password.'"; // DB Password $config["dbpass"]="'.$random_password.'"; // DB Password
$dbhost="'.$dbhost.'"; // DB Host $config["dbhost"]="'.$dbhost.'"; // DB Host
$config_homedir="'.$path.'"; // Config homedir $config["homedir"]="'.$path.'"; // Config homedir
$BASE_URL="'.$url.'"; // Base URL $config["homeurl"]="'.$url.'"; // Base URL
// End of automatic config file // End of automatic config file
?>'; ?>';
$step7 = fputs ($cfgout, $config_new); $step7 = fputs ($cfgout, $config_new);

View File

@ -87,9 +87,11 @@ if (isset($_GET["id_agente"])){
show_alert_show_view ($data, $tdcolor, 0); show_alert_show_view ($data, $tdcolor, 0);
} }
echo "<tr><td colspan=11 class='datos3'><center>".lang_string("Combined alerts")."</center>";
// Show combined alerts for this agent // Show combined alerts for this agent
$result_com = mysql_query("SELECT * FROM talerta_agente_modulo WHERE id_agent = $id_agente"); $result_com = mysql_query("SELECT * FROM talerta_agente_modulo WHERE id_agent = $id_agente");
if (mysql_num_rows ($result_com)) {
echo "<tr><td colspan=11 class='datos3'><center>".lang_string("Combined alerts")."</center>";
}
while ($data_com=mysql_fetch_array($result_com)){ while ($data_com=mysql_fetch_array($result_com)){
if ($color == 1){ if ($color == 1){
$tdcolor = "datos"; $tdcolor = "datos";

View File

@ -209,7 +209,7 @@ if (($report_user == $id_user) OR (dame_admin($id_user)==1) OR ($report_private
echo "<p style='font: bold 3em Arial, Sans-serif; color: #000000;'>"; echo "<p style='font: bold 3em Arial, Sans-serif; color: #000000;'>";
echo $monitor_value." %"."<img src='images/b_green.png' height=32 width=32>"; echo $monitor_value." %"."<img src='images/b_green.png' height=32 width=32>";
echo "</p>"; echo "</p>";
$monitor_value2 = 100 - $monitor_value ; $monitor_value2 = format_numeric(100 - $monitor_value,2) ;
echo "<p style='font: bold 3em Arial, Sans-serif; color: #ff0000;'>"; echo "<p style='font: bold 3em Arial, Sans-serif; color: #ff0000;'>";
echo $monitor_value2." %"."<img src='images/b_red.png' height=32 width=32>"; echo $monitor_value2." %"."<img src='images/b_red.png' height=32 width=32>";
echo "</p>"; echo "</p>";

View File

@ -1,4 +1,22 @@
-- Pandora FMS - the Free Monitoring System
-- ========================================
-- Copyright (c) 2008 Artica Soluciones Tecnológicas, http://www.artica.es
-- Please see http://pandora.sourceforge.net for full contribution list
-- 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 for 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.
-- PLEASE NO NOT USE MULTILINE COMMENTS
-- Because Pandora Installer don't understand them
-- and fails creating database !!!
-------------------------------------------------------------- --------------------------------------------------------------
-- Pandora FMS official tables for 2.0 version -- -- Pandora FMS official tables for 2.0 version --
-------------------------------------------------------------- --------------------------------------------------------------

View File

@ -1,3 +1,27 @@
-- Pandora FMS - the Free Monitoring System
-- ========================================
-- Copyright (c) 2008 Artica Soluciones Tecnológicas, http://www.artica.es
-- Please see http://pandora.sourceforge.net for full contribution list
-- 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 for 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.
-- Database Data for Pandora FMS 2.0
-- PLEASE NO NOT USE MULTILINE COMMENTS
-- Because Pandora Installer don't understand them
-- and fails creating database !!!
-- --
-- Dumping data for table `talerta` -- Dumping data for table `talerta`
-- --
@ -62,10 +86,10 @@ UNLOCK TABLES;
/*!40000 ALTER TABLE `tlanguage` DISABLE KEYS */; /*!40000 ALTER TABLE `tlanguage` DISABLE KEYS */;
LOCK TABLES `tlanguage` WRITE; LOCK TABLES `tlanguage` WRITE;
INSERT INTO `tlanguage` VALUES ('en','English'); INSERT INTO `tlanguage` VALUES ('en','English');
/*INSERT INTO `tlanguage` VALUES ('es_es','Espa&ntilde;ol'); --INSERT INTO `tlanguage` VALUES ('es_es','Espa&ntilde;ol');
INSERT INTO `tlanguage` VALUES ('de','Deutch'); --INSERT INTO `tlanguage` VALUES ('de','Deutch');
INSERT INTO `tlanguage` VALUES ('fr','Fran&ccedil;ais'); --INSERT INTO `tlanguage` VALUES ('fr','Fran&ccedil;ais');
INSERT INTO `tlanguage` VALUES ('pt_br','Portugu&ecirc;s-Brasil'); */ --INSERT INTO `tlanguage` VALUES ('pt_br','Portugu&ecirc;s-Brasil');
UNLOCK TABLES; UNLOCK TABLES;
/*!40000 ALTER TABLE `tlanguage` ENABLE KEYS */; /*!40000 ALTER TABLE `tlanguage` ENABLE KEYS */;