2008-06-18 Esteban Sanchez <estebans@artica.es>
* include/functions_db.php: Added documentation to all the functions using javadoc style. Deleted unused and useless functions. Style correction. User pandora database functions in functions that getss simples values. Replace lang_label with lang_string(). * include/functions_reporting_pdf.php, operation/reporting/reporting_viewer_pdf.php, operation/visual_console/render_view.php, include/functions_reporting.php: Replaced deprecated functions with equivalents. * godmode/agentes/agent_manager.php: Fixed a bug with parent dropdown select. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@882 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
f42b3c6003
commit
897f5f3ece
|
@ -1,3 +1,19 @@
|
|||
2008-06-18 Esteban Sanchez <estebans@artica.es>
|
||||
|
||||
* include/functions_db.php: Added documentation to all the functions
|
||||
using javadoc style. Deleted unused and useless functions. Style
|
||||
correction. User pandora database functions in functions that getss
|
||||
simples values. Replace lang_label with lang_string().
|
||||
|
||||
* include/functions_reporting_pdf.php,
|
||||
operation/reporting/reporting_viewer_pdf.php,
|
||||
operation/visual_console/render_view.php,
|
||||
include/functions_reporting.php: Replaced deprecated functions with
|
||||
equivalents.
|
||||
|
||||
* godmode/agentes/agent_manager.php: Fixed a bug with parent dropdown
|
||||
select.
|
||||
|
||||
2008-06-18 Esteban Sanchez <estebans@artica.es>
|
||||
|
||||
* functions.php: Added documentation to all the functions in JavaDoc
|
||||
|
|
|
@ -105,17 +105,11 @@ if ($create_agent != 1) {
|
|||
echo "</td>";
|
||||
}
|
||||
|
||||
|
||||
|
||||
echo '<tr><td class="datos"><b>'.lang_string ("Parent").'</b>';
|
||||
echo '<td class="datos">';
|
||||
if ($create_agent != 1) {
|
||||
print_select_from_sql ('SELECT id_agente, nombre FROM tagente',
|
||||
'id_parent', $id_agente, '', '', '');
|
||||
} else {
|
||||
print_select_from_sql ('SELECT id_agente, nombre FROM tagente',
|
||||
'id_parent', 0, '', 'None', '0');
|
||||
}
|
||||
'id_parent', $id_parent, '', 'None', '0');
|
||||
|
||||
|
||||
echo '<tr><td class="datos"><b>'.$lang_label["group"].'</b>';
|
||||
echo '<td class="datos"><select name="grupo" class="w130">';
|
||||
|
@ -167,6 +161,7 @@ echo '</b></td><td class="datos">';
|
|||
echo '<select name="plugin_server" class="w130">';
|
||||
echo "<option value='".$id_plugin_server."'>".give_server_name($id_plugin_server);
|
||||
$sql1 = 'SELECT id_server, name FROM tserver where plugin_server = 1 ORDER BY name';
|
||||
echo $sql1;
|
||||
$result=mysql_query($sql1);
|
||||
while ($row=mysql_fetch_array($result)){
|
||||
echo "<option value='".$row["id_server"]."'>".$row["name"]."</option>";
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -21,7 +21,7 @@ function return_module_SLA ($id_agent_module, $period, $min_value, $max_value, $
|
|||
if (! $date)
|
||||
$date = time ();
|
||||
$datelimit = $date - $period; // limit date
|
||||
$id_agent = give_db_value ('id_agente', 'tagente_modulo', 'id_agente_modulo', $id_agent_module);
|
||||
$id_agent = get_db_value ('id_agente', 'tagente_modulo', 'id_agente_modulo', $id_agent_module);
|
||||
/* Get all the data in the interval */
|
||||
$sql = sprintf ('SELECT * FROM tagente_datos
|
||||
WHERE id_agente = %d AND id_agente_modulo = %d
|
||||
|
@ -418,7 +418,7 @@ function monitor_health_reporting ($id_group, $period = 0, $date = 0, $return =
|
|||
*/
|
||||
function general_group_reporting ($id_group, $return = false) {
|
||||
$output = '';
|
||||
$agents = give_db_value ('COUNT(*)', 'tagente', 'id_grupo', $id_group);
|
||||
$agents = get_db_value ('COUNT(*)', 'tagente', 'id_grupo', $id_group);
|
||||
$output .= '<strong>'.lang_string ('agents_in_group').': '.$agents.'</strong><br />';
|
||||
|
||||
if (!$return)
|
||||
|
@ -436,7 +436,7 @@ function general_group_reporting ($id_group, $return = false) {
|
|||
*/
|
||||
function agents_detailed_reporting ($id_group, $period = 0, $date = 0, $return = false) {
|
||||
$output = '';
|
||||
$agents = give_db_value ('COUNT(*)', 'tagente', 'id_grupo', $id_group);
|
||||
$agents = get_db_value ('COUNT(*)', 'tagente', 'id_grupo', $id_group);
|
||||
|
||||
$table_modules->width = '750px';
|
||||
$table_alerts->width = '750px';
|
||||
|
|
|
@ -161,11 +161,11 @@ function general_report ($id_report){
|
|||
require ($config["homedir"]."/include/functions_reporting.php");
|
||||
$session_id = session_id();
|
||||
|
||||
$report_name = html_entity_decode(give_db_value ("name", "treport", "id_report", $id_report), ENT_COMPAT, "iso-8859-15");
|
||||
$report_description = html_entity_decode (give_db_value ("description", "treport", "id_report", $id_report), ENT_COMPAT, "iso-8859-15");
|
||||
$report_name = html_entity_decode(get_db_value ("name", "treport", "id_report", $id_report), ENT_COMPAT, "iso-8859-15");
|
||||
$report_description = html_entity_decode (get_db_value ("description", "treport", "id_report", $id_report), ENT_COMPAT, "iso-8859-15");
|
||||
|
||||
$report_private= html_entity_decode( give_db_value ("private", "treport", "id_report", $id_report), ENT_COMPAT, "iso-8859-15");
|
||||
$report_user = html_entity_decode( give_db_value ("id_user", "treport", "id_report", $id_report), ENT_COMPAT, "iso-8859-15");
|
||||
$report_private= html_entity_decode( get_db_value ("private", "treport", "id_report", $id_report), ENT_COMPAT, "iso-8859-15");
|
||||
$report_user = html_entity_decode( get_db_value ("id_user", "treport", "id_report", $id_report), ENT_COMPAT, "iso-8859-15");
|
||||
|
||||
|
||||
$date_today = date("Y/m/d H:i:s");
|
||||
|
@ -299,7 +299,7 @@ function general_report ($id_report){
|
|||
$pdf->ezText ("\n",8);
|
||||
break;
|
||||
case 4: // Alert report
|
||||
$module_name = give_db_value ("nombre", "tagente_modulo", "id_agente_modulo", $id_agent_module);
|
||||
$module_name = get_db_value ("nombre", "tagente_modulo", "id_agente_modulo", $id_agent_module);
|
||||
$agent_name = dame_nombre_agente_agentemodulo ($id_agent_module);
|
||||
$table_data = array();
|
||||
$table_label[0] = $lang_label["status"];
|
||||
|
|
|
@ -58,8 +58,8 @@ if ($id_report == ""){
|
|||
exit;
|
||||
}
|
||||
|
||||
$report_private= give_db_value ("private", "treport", "id_report", $id_report);
|
||||
$report_user = give_db_value ("id_user", "treport", "id_report", $id_report);
|
||||
$report_private= get_db_value ("private", "treport", "id_report", $id_report);
|
||||
$report_user = get_db_value ("id_user", "treport", "id_report", $id_report);
|
||||
|
||||
if (($report_user == $id_user) OR (dame_admin($id_user)==1) OR ($report_private == 0)) {
|
||||
// Without report type parameter: ABORT
|
||||
|
|
|
@ -99,8 +99,8 @@ while ($row = mysql_fetch_array($res)){
|
|||
if (($link_layout != 0) && ($id_agentmodule == 0)) {
|
||||
$status = return_status_layout ($link_layout);
|
||||
} else {
|
||||
$id_agent = give_db_value ("id_agente", "tagente_estado", "id_agente_modulo", $id_agentmodule);
|
||||
$id_agent_module_parent = give_db_value ("id_agente_modulo", "tlayout_data", "id", $parent_item);
|
||||
$id_agent = get_db_value ("id_agente", "tagente_estado", "id_agente_modulo", $id_agentmodule);
|
||||
$id_agent_module_parent = get_db_value ("id_agente_modulo", "tlayout_data", "id", $parent_item);
|
||||
// Item value
|
||||
$status = return_status_agent_module ($id_agentmodule);
|
||||
if ($no_link_color == 1)
|
||||
|
|
Loading…
Reference in New Issue