2009-01-24 Raul Mateos <raulofpandora@gmail.com>
* install.php: Added code to show current console URL in step 3. Updated header. Spaces changed to tabs. * include/functions_reporting.php: Give default value to several vars that caused two notice errors. Updated header. * include/functions_db.php: Solved notice error in search page that caused not to show the user. It uses get_users() function from mysql.php. ldap.php and dev.php define the same function, and uses different value, so they could give an error in the search page, NOT TESTED. Updated header. * /extensions/update_manager/sql/update_manager.sql: Changed default text value for description column, it was giving a SQL error. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1396 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
14b7204946
commit
ae932eb7b7
|
@ -1,3 +1,19 @@
|
|||
2009-01-24 Raul Mateos <raulofpandora@gmail.com>
|
||||
|
||||
* install.php: Added code to show current console URL in step 3.
|
||||
Updated header. Spaces changed to tabs.
|
||||
|
||||
* include/functions_reporting.php: Give default value to several vars that
|
||||
caused two notice errors. Updated header.
|
||||
|
||||
* include/functions_db.php: Solved notice error in search page that caused
|
||||
not to show the user. It uses get_users() function from mysql.php.
|
||||
ldap.php and dev.php define the same function, and uses different value, so
|
||||
they could give an error in the search page, NOT TESTED. Updated header.
|
||||
|
||||
* /extensions/update_manager/sql/update_manager.sql: Changed default text
|
||||
value for description column, it was giving a SQL error.
|
||||
|
||||
2009-01-23 Esteban Sanchez <estebans@artica.es>
|
||||
|
||||
* godmode/reporting/map_builder.php: Fixed an error when getting
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
CREATE TABLE `tupdate_settings` ( `key` varchar(255) default '', `value` varchar(255) default '', PRIMARY KEY (`key`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
INSERT INTO `tupdate_settings` VALUES ('current_update', '0'), ('customer_key', 'PANDORA-FREE'), ('keygen_path', '/usr/share/pandora/util/keygen'), ('update_server_host', 'www.artica.es'), ('update_server_port', '80'), ('update_server_path', '/pandoraupdate/server.php'), ('updating_binary_path', 'Path where the updated binary files will be stored'), ('updating_code_path', 'Path where the updated code is stored'), ('dbname', ''), ('dbhost', ''), ('dbpass', ''), ('dbuser', ''), ('proxy', ''), ('proxy_port', ''), ('proxy_user', ''), ('proxy_pass', '');
|
||||
CREATE TABLE `tupdate_package` ( id int(11) unsigned NOT NULL auto_increment, timestamp datetime NOT NULL, description mediumtext NOT NULL default '', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
CREATE TABLE `tupdate_package` ( id int(11) unsigned NOT NULL auto_increment, timestamp datetime NOT NULL, description varchar(255) default '', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
CREATE TABLE `tupdate` ( id int(11) unsigned NOT NULL auto_increment, type enum('code', 'db_data', 'db_schema', 'binary'), id_update_package int(11) unsigned NOT NULL default 0, filename varchar(250) default '', checksum varchar(250) default '', previous_checksum varchar(250) default '', svn_version int(4) unsigned NOT NULL default 0, data LONGTEXT default '', data_rollback LONGTEXT default '', description TEXT default '', db_table_name varchar(140) default '', db_field_name varchar(140) default '', db_field_value varchar(1024) default '', PRIMARY KEY (`id`), FOREIGN KEY (`id_update_package`) REFERENCES tupdate_package(`id`) ON UPDATE CASCADE ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
CREATE TABLE `tupdate_journal` ( id int(11) unsigned NOT NULL auto_increment, id_update int(11) unsigned NOT NULL default 0, PRIMARY KEY (`id`), FOREIGN KEY (`id_update`) REFERENCES tupdate(`id`) ON UPDATE CASCADE ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// Pandora FMS - the Flexible Monitoring System
|
||||
// ============================================
|
||||
// Copyright (c) 2008 Artica Soluciones Tecnologicas, http://www.artica.es
|
||||
// Copyright (c) 2009 Artica Soluciones Tecnologicas, 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
|
||||
|
@ -11,11 +11,11 @@
|
|||
//
|
||||
// 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
|
||||
// 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.
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
/**
|
||||
* Check if login session variables are set.
|
||||
|
@ -600,7 +600,7 @@ function get_monitor_last_down_timestamp_in_period ($id_agent_module, $period, $
|
|||
*/
|
||||
function get_monitors_in_group ($id_group) {
|
||||
if ($id_group <= 1) {
|
||||
//We select all groups the user has access to if it's 0, -1 or 1
|
||||
//We select all groups the user has access to if it's 0, -1 or 1
|
||||
global $config;
|
||||
$id_group = array_keys (get_user_groups ($config['id_user']));
|
||||
}
|
||||
|
@ -1022,7 +1022,7 @@ function list_group ($id_user, $show_all = 1){
|
|||
return $mis_grupos;
|
||||
foreach ($result as $row) {
|
||||
if (($row["id_grupo"] != 1 || $show_all == 1) && $row["id_grupo"] != 0 && give_acl($id_user,$row["id_grupo"], "AR") == 1) {
|
||||
//Put in an array all the groups the user belongs to
|
||||
//Put in an array all the groups the user belongs to
|
||||
array_push ($mis_grupos, $row["id_grupo"]);
|
||||
echo '<option value="'.$row["id_grupo"].'">'.$row["nombre"].'</option>';
|
||||
}
|
||||
|
@ -1061,7 +1061,7 @@ function list_group2 ($id_user) {
|
|||
*
|
||||
* @return array An array of users
|
||||
*/
|
||||
function get_users_info ($order = "nombre_real", $info = "nombre_real") {
|
||||
function get_users_info ($order = "fullname", $info = "fullname") {
|
||||
$users = get_users ($order);
|
||||
$ret = array ();
|
||||
foreach ($users as $user_id => $user_info) {
|
||||
|
@ -1121,7 +1121,7 @@ function show_icon_type ($id_type) {
|
|||
*
|
||||
* @param int Server type id
|
||||
*
|
||||
* @return string Fully formatted IMG HTML tag with icon
|
||||
* @return string Fully formatted IMG HTML tag with icon
|
||||
*/
|
||||
function show_server_type ($id) {
|
||||
global $config;
|
||||
|
@ -1322,7 +1322,7 @@ $sql_cache = array ('saved' => 0);
|
|||
* @param string Condition the field must have
|
||||
*
|
||||
* @return mixed Value of first column of the first row. False if there were no row.
|
||||
*/
|
||||
*/
|
||||
function get_db_value ($field, $table, $field_search = 1, $condition = 1) {
|
||||
if (is_int ($condition)) {
|
||||
$sql = sprintf ("SELECT %s FROM %s WHERE %s = %d LIMIT 1",
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// Pandora FMS - the Flexible Monitoring System
|
||||
// ============================================
|
||||
// Copyright (c) 2008 Artica Soluciones Tecnologicas, http://www.artica.es
|
||||
// Copyright (c) 2009 Artica Soluciones Tecnologicas, 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
|
||||
|
@ -11,11 +11,11 @@
|
|||
//
|
||||
// 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
|
||||
// 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.
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require_once ("include/functions_agents.php");
|
||||
|
||||
|
@ -129,7 +129,8 @@ function get_group_stats ($id_group) {
|
|||
$data["monitor_alerts"] = 0;
|
||||
$data["monitor_alerts_fired"] = 0;
|
||||
$data["monitor_alerts_fire_count"] = 0;
|
||||
|
||||
$data["total_checks"] = 0;
|
||||
$data["total_alerts"] = 0;
|
||||
$data["total_agents"] = 0;
|
||||
$data["monitor_health"] = 100;
|
||||
$data["alert_level"] = 100;
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<?php
|
||||
|
||||
// Pandora FMS - the Flexible Monitoring System
|
||||
// ============================================
|
||||
// Copyright (c) 2008 Artica Soluciones Tecnologicas, http://www.artica.es
|
||||
// Copyright (c) 2009 Artica Soluciones Tecnologicas, 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
|
||||
|
@ -9,11 +10,11 @@
|
|||
// 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
|
||||
// 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.
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
@ -116,7 +117,6 @@ function check_writable ( $fullpath, $label ){
|
|||
|
||||
}
|
||||
|
||||
|
||||
function check_variable ( $var, $value, $label, $mode ){
|
||||
echo "<tr><td>";
|
||||
echo "<span class='arr'> $label </span>";
|
||||
|
@ -141,15 +141,15 @@ function check_variable ( $var, $value, $label, $mode ){
|
|||
|
||||
function parse_mysql_dump($url){
|
||||
if (file_exists($url)){
|
||||
$file_content = file($url);
|
||||
$query = "";
|
||||
foreach($file_content as $sql_line){
|
||||
$file_content = file($url);
|
||||
$query = "";
|
||||
foreach($file_content as $sql_line){
|
||||
if(trim($sql_line) != "" && strpos($sql_line, "--") === false){
|
||||
$query .= $sql_line;
|
||||
if(preg_match("/;[\040]*\$/", $sql_line)){
|
||||
//echo "DEBUG $query <br>"; //Uncomment for debug
|
||||
// echo "DEBUG $query <br>"; //Uncomment for debug
|
||||
if (!$result = mysql_query($query)) {
|
||||
// echo mysql_errno() . ": " . mysql_error(); //Uncomment for debug
|
||||
// echo mysql_errno() . ": " . mysql_error(); //Uncomment for debug
|
||||
return 0;
|
||||
}
|
||||
$query = "";
|
||||
|
@ -324,7 +324,7 @@ function install_step3() {
|
|||
<span class='f9b'>For example '/pandora_console'</span>
|
||||
</div>
|
||||
<input class='login' type='text' name='url' style='width: 250px;'
|
||||
value='/pandora_console'>
|
||||
value='".dirname ($_SERVER["SCRIPT_NAME"])."'>
|
||||
|
||||
<div align='right'>
|
||||
<input type='image' src='images/arrow_next.png' value='Step #4' id='step4'>
|
||||
|
|
Loading…
Reference in New Issue