2010-03-21 Sancho Lerena <slerena@gmail.com>
* include/help/en/check_other_languages.sh: Moved from include/help and rewritten to be more usable. This is a script to check if there are missing help files for each language (taken as parameter). * operation/agentes/datos_agente.php: Cannot detete data from here. Removed old support for individual data delete due the new table schema. * extras/check_other_languages.sh: Moved from include/help * godmode/agentes/modificar_agente.php: Admin can see everything even if agent has a invalid group (group which not exist). This was important because agents with invalid group was "Invisible" until now. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2519 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
1ca75746c4
commit
e201958939
|
@ -1,11 +1,31 @@
|
|||
2010-03-21 Sancho Lerena <slerena@gmail.com>
|
||||
|
||||
* include/help/en/check_other_languages.sh: Moved from include/help
|
||||
and rewritten to be more usable. This is a script to check if there
|
||||
are missing help files for each language (taken as parameter).
|
||||
|
||||
* operation/agentes/datos_agente.php: Cannot detete data from here.
|
||||
Removed old support for individual data delete due the new table
|
||||
schema.
|
||||
|
||||
* extras/check_other_languages.sh: Moved from include/help
|
||||
|
||||
* godmode/agentes/modificar_agente.php: Admin can see everything
|
||||
even if agent has a invalid group (group which not exist). This
|
||||
was important because agents with invalid group was "Invisible"
|
||||
until now.
|
||||
|
||||
2010-03-19 Eric Ross <eric.ross.c@gmail.com>
|
||||
|
||||
* operation/agentes/estado_ultimopaquete.php: Fixing color to show WARN messages in orange
|
||||
* operation/agentes/stat_win.php: Now when showing a log4x chart, we don't show the max/min/avg information
|
||||
|
||||
2010-03-19 Eric Ross <eric.ross.c@gmail.com>
|
||||
|
||||
* include/config_process.php: Fixing warning when no timezone is defined for the user
|
||||
|
||||
2010-03-19 Eric Ross <eric.ross.c@gmail.com>
|
||||
|
||||
Adding support to show and purge data from the log4x table
|
||||
|
||||
* include/fgraph.php
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
# This script check for currently implemented ENGLISH help files and detect missing help files in other languages (passed as command line parameter)
|
||||
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo "Check missing help files. Needed language code for search"
|
||||
echo "For example: es "
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ ! -d "include/help/en" ]
|
||||
then
|
||||
echo "I need to run in Pandora FMS Console root directory"
|
||||
exit
|
||||
fi
|
||||
|
||||
mkdir "/tmp/$1" >> /dev/null 2> /dev/null
|
||||
for a in `ls include/help/en`
|
||||
do
|
||||
ESTA=`find include/help/$1 $a 2> /dev/null | wc -l`
|
||||
if [ $ESTA == 0 ]
|
||||
then
|
||||
echo "Missing $a, and copying to /tmp/$1"
|
||||
cp include/help/en/$a "/tmp/$1"
|
||||
fi
|
||||
done
|
||||
|
|
@ -130,21 +130,30 @@ if ($ag_group > 1) {
|
|||
ORDER BY nombre LIMIT %d, %d',
|
||||
$ag_group, $search_sql, $offset, $config["block_size"]);
|
||||
} else {
|
||||
$sql = sprintf ('SELECT COUNT(*)
|
||||
FROM tagente
|
||||
WHERE id_grupo IN (%s)
|
||||
%s',
|
||||
implode (',', array_keys (get_user_groups ())),
|
||||
$search_sql);
|
||||
$total_agents = get_db_sql ($sql);
|
||||
|
||||
// Admin user get ANY group, even if they doesnt exist
|
||||
if (check_acl ($config['id_user'], 0, "PM")){
|
||||
$sql = sprintf ('SELECT COUNT(*) FROM tagente WHERE 1=1 %s', $search_sql);
|
||||
$total_agents = get_db_sql ($sql);
|
||||
$sql = sprintf ('SELECT * FROM tagente WHERE 1=1 %s ORDER BY nombre LIMIT %d, %d', $search_sql, $offset, $config["block_size"]);
|
||||
} else {
|
||||
|
||||
$sql = sprintf ('SELECT COUNT(*)
|
||||
FROM tagente
|
||||
WHERE id_grupo IN (%s)
|
||||
%s',
|
||||
implode (',', array_keys (get_user_groups ())),
|
||||
$search_sql);
|
||||
$total_agents = get_db_sql ($sql);
|
||||
|
||||
$sql = sprintf ('SELECT *
|
||||
FROM tagente
|
||||
WHERE id_grupo IN (%s)
|
||||
%s
|
||||
ORDER BY nombre LIMIT %d, %d',
|
||||
implode (',', array_keys (get_user_groups ())),
|
||||
$search_sql, $offset, $config["block_size"]);
|
||||
$sql = sprintf ('SELECT *
|
||||
FROM tagente
|
||||
WHERE id_grupo IN (%s)
|
||||
%s
|
||||
ORDER BY nombre LIMIT %d, %d',
|
||||
implode (',', array_keys (get_user_groups ())),
|
||||
$search_sql, $offset, $config["block_size"]);
|
||||
}
|
||||
}
|
||||
|
||||
$agents = get_db_all_rows_sql ($sql);
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
for a in `ls`; do ESTA=`find ../es/$a 2> /dev/null | wc -l`; if [ $ESTA == 0 ]; then cp $a /tmp; fi ; done
|
||||
|
|
@ -31,20 +31,6 @@ if (! give_acl ($config['id_user'], $group, "AR") || $module_id == 0) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (isset ($_GET["delete"])) {
|
||||
$delete = get_parameter_get ("delete", 0);
|
||||
$sql = sprintf ("DELETE FROM tagente_datos WHERE id_agente_datos = %d", $delete);
|
||||
process_sql ($sql);
|
||||
} elseif (isset($_GET["delete_log4x"])) {
|
||||
$delete = get_parameter_get ("delete_log4x", 0);
|
||||
$sql = sprintf ("DELETE FROM tagente_datos_log4x WHERE id_tagente_datos_log4x = %d", $delete);
|
||||
process_sql ($sql);
|
||||
} elseif (isset($_GET["delete_string"])) {
|
||||
$delete = get_parameter_get ("delete_string", 0);
|
||||
$sql = sprintf ("DELETE FROM tagente_datos_string WHERE id_tagente_datos_string = %d", $delete);
|
||||
process_sql ($sql);
|
||||
}
|
||||
|
||||
$table->cellpadding = 3;
|
||||
$table->cellspacing = 3;
|
||||
$table->width = 600;
|
||||
|
@ -89,7 +75,6 @@ if ($moduletype_name == "log4x") {
|
|||
$sql_body = sprintf (" FROM tagente_datos_string WHERE id_agente_modulo = %d AND utimestamp > %d ORDER BY utimestamp DESC", $module_id, get_system_time () - $period);
|
||||
|
||||
$columns = array(
|
||||
"Delete" => array("id_agente_datos", "format_delete_string", "align" => "center"),
|
||||
"Timestamp" => array("utimestamp", "format_timestamp", "align" => "center"),
|
||||
"Data" => array("datos", "format_data", "align" => "center"),
|
||||
"Time" => array("utimestamp", "format_time", "align" => "center")
|
||||
|
@ -98,7 +83,6 @@ if ($moduletype_name == "log4x") {
|
|||
$sql_body = sprintf (" FROM tagente_datos WHERE id_agente_modulo = %d AND utimestamp > %d ORDER BY utimestamp DESC", $module_id, get_system_time () - $period);
|
||||
|
||||
$columns = array(
|
||||
"Delete" => array("id_agente_datos", "format_delete", "align" => "center"),
|
||||
"Timestamp" => array("utimestamp", "format_timestamp", "align" => "center"),
|
||||
"Data" => array("datos", "format_data", "align" => "center"),
|
||||
"Time" => array("utimestamp", "format_time", "align" => "center")
|
||||
|
|
Loading…
Reference in New Issue