2012-06-13 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php, include/functions_reporting.php, include/functions_groups.php, include/functions_visual_map.php, include/ajax/reporting.ajax.php, include/functions_config.php, include/functions_ui.php, include/functions.php, extensions/agents_modules.php, extensions/module_groups.php, operation/incidents/incident.php, operation/incidents/incident_detail.php, operation/agentes/status_monitor.php, operation/agentes/estado_generalagente.php, operation/agentes/estado_agente.php, operation/agentes/ver_agente.php, operation/snmpconsole/snmp_view.php, operation/integria_incidents/incident.incident.php, operation/integria_incidents/incident.php: a lot of fixes in relation with entities and clean source code style. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6537 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
51975ddeb9
commit
a84e7f6267
|
@ -1,3 +1,21 @@
|
|||
2012-06-13 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_html.php, include/functions_reporting.php,
|
||||
include/functions_groups.php, include/functions_visual_map.php,
|
||||
include/ajax/reporting.ajax.php, include/functions_config.php,
|
||||
include/functions_ui.php, include/functions.php,
|
||||
extensions/agents_modules.php, extensions/module_groups.php,
|
||||
operation/incidents/incident.php,
|
||||
operation/incidents/incident_detail.php,
|
||||
operation/agentes/status_monitor.php,
|
||||
operation/agentes/estado_generalagente.php,
|
||||
operation/agentes/estado_agente.php,
|
||||
operation/agentes/ver_agente.php,
|
||||
operation/snmpconsole/snmp_view.php,
|
||||
operation/integria_incidents/incident.incident.php,
|
||||
operation/integria_incidents/incident.php: a lot of fixes in
|
||||
relation with entities and clean source code style.
|
||||
|
||||
2012-06-13 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
|
||||
* godmode/agentes/module_manager_editor.php: Fixed strings of link
|
||||
|
|
|
@ -220,7 +220,10 @@ function mainAgentsModules() {
|
|||
|
||||
echo "<tr style='height: 25px;'>";
|
||||
|
||||
echo "<td class='$rowcolor'><a class='$rowcolor' href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=".$agent['id_agente']."'>" . ui_print_truncate_text(io_safe_output($agent['nombre']), 35, true, true, true, '...', 'font-size:10px; font-weight: bold;') . "</a></td>";
|
||||
echo "<td class='$rowcolor'>
|
||||
<a class='$rowcolor' href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=".$agent['id_agente']."'>" .
|
||||
ui_print_truncate_text(io_safe_output($agent['nombre']), 35, true, true, true, '...', 'font-size:10px; font-weight: bold;') .
|
||||
"</a></td>";
|
||||
$agent_modules = agents_get_modules($agent['id_agente']);
|
||||
|
||||
$nmodules = 0;
|
||||
|
|
|
@ -80,7 +80,8 @@ function config_update_config () {
|
|||
|
||||
if ($update_config) {
|
||||
db_pandora_audit("Setup", "Setup has changed");
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -664,7 +664,8 @@ function groups_get_group_row($id_group, $group_all, $group, &$printed_groups) {
|
|||
echo "</td>";
|
||||
echo "<td class='group_view_data' style='text-align: center; vertica-align: middle;'>";
|
||||
if (check_acl ($config['id_user'], $id_group, "AW")) {
|
||||
echo '<a href="index.php?sec=estado&sec2=operation/agentes/group_view&update_netgroup='.$id_group.'">' . html_print_image("images/target.png", true, array("border" => '0', "alt" => __('Force'))) . '</a>';
|
||||
echo '<a href="index.php?sec=estado&sec2=operation/agentes/group_view&update_netgroup='.$id_group.'">' .
|
||||
html_print_image("images/target.png", true, array("border" => '0', "alt" => __('Force'))) . '</a>';
|
||||
}
|
||||
echo "</td>";
|
||||
|
||||
|
@ -682,10 +683,10 @@ function groups_get_group_row($id_group, $group_all, $group, &$printed_groups) {
|
|||
$data["total_agents"];
|
||||
|
||||
if ($id_group != 0) {
|
||||
|
||||
$data["total_agents"] = db_get_sql ("SELECT COUNT(id_agente) FROM tagente
|
||||
WHERE id_grupo = $id_group AND disabled = 0");
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$data["total_agents"] = db_get_sql ("SELECT COUNT(id_agente) FROM tagente
|
||||
WHERE disabled = 0");
|
||||
}
|
||||
|
|
|
@ -2116,7 +2116,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
case 1:
|
||||
case 'simple_graph':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Simple graph'),
|
||||
ui_print_truncate_text($agent_name, 75, false).' <br> ' . ui_print_truncate_text($module_name, 75, false));
|
||||
ui_print_truncate_text($agent_name, 75, false).' <br> ' .
|
||||
ui_print_truncate_text($module_name, 75, false));
|
||||
|
||||
//RUNNING
|
||||
$table->colspan[1][0] = 4;
|
||||
|
@ -2136,7 +2137,6 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
$report["datetime"], '', 0, 0, true, true);
|
||||
|
||||
array_push ($table->data, $data);
|
||||
|
||||
break;
|
||||
case 'projection_graph':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Projection graph'),
|
||||
|
@ -2189,7 +2189,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
break;
|
||||
case 'prediction_date':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Prediction date'),
|
||||
ui_print_truncate_text($agent_name, 75, false).' <br> ' . ui_print_truncate_text($module_name, 75, false));
|
||||
ui_print_truncate_text($agent_name, 75, false).' <br> ' .
|
||||
ui_print_truncate_text($module_name, 75, false));
|
||||
|
||||
//RUNNING
|
||||
$table->colspan[1][0] = 4;
|
||||
|
@ -2816,7 +2817,6 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
|
||||
array_push($table->data, $data);
|
||||
break;
|
||||
|
||||
case 'event_report_group':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Group detailed event'),
|
||||
ui_print_truncate_text(groups_get_name($content['id_group'], true), 60, false));
|
||||
|
@ -2831,10 +2831,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
|
||||
$data = array ();
|
||||
$table->colspan[2][0] = 3;
|
||||
|
||||
$data[0] = reporting_get_group_detailed_event($content['id_group'], $content['period'], $report["datetime"], true);
|
||||
array_push ($table->data, $data);
|
||||
break;
|
||||
|
||||
case 'event_report_module':
|
||||
reporting_header_content($mini, $content, $report, $table, __('Module detailed event'),
|
||||
ui_print_truncate_text($agent_name, 70, false).' <br> ' . ui_print_truncate_text($module_name, 70, false));
|
||||
|
@ -3222,6 +3222,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
}
|
||||
|
||||
$unit = db_get_value('unit', 'tagente_modulo', 'id_agente_modulo', $row ['id_agent_module']);
|
||||
|
||||
$id_agent_module[$key] = $row['id_agent_module'];
|
||||
$agent_name[$key] = $ag_name;
|
||||
$module_name[$key] = $mod_name;
|
||||
|
|
|
@ -687,7 +687,8 @@ function ui_format_alert_row ($alert, $compound = false, $agent = true, $url = '
|
|||
}
|
||||
}
|
||||
elseif ($agent == 0) {
|
||||
$data[$index['module_name']] .= ui_print_truncate_text(modules_get_agentmodule_name ($alert["id_agent_module"]), 30, false, true, true, '[…]', 'font-size: 7.2pt');
|
||||
$data[$index['module_name']] .=
|
||||
ui_print_truncate_text(modules_get_agentmodule_name ($alert["id_agent_module"]), 30, false, true, true, '[…]', 'font-size: 7.2pt');
|
||||
}
|
||||
else {
|
||||
if ($agent_style !== false) {
|
||||
|
@ -696,7 +697,8 @@ function ui_format_alert_row ($alert, $compound = false, $agent = true, $url = '
|
|||
else {
|
||||
$data[$index['agent_name']] .= ui_print_agent_name (modules_get_agentmodule_agent ($alert["id_agent_module"]), true, 20, $styleDisabled);
|
||||
}
|
||||
$data[$index['module_name']] = ui_print_truncate_text (modules_get_agentmodule_name ($alert["id_agent_module"]), 30, false, true, true, '[…]', 'font-size: 7.2pt');
|
||||
$data[$index['module_name']] =
|
||||
ui_print_truncate_text (modules_get_agentmodule_name ($alert["id_agent_module"]), 30, false, true, true, '[…]', 'font-size: 7.2pt');
|
||||
}
|
||||
$data[$index['agent_name']] .= $disabledHtmlEnd;
|
||||
|
||||
|
@ -711,7 +713,7 @@ function ui_format_alert_row ($alert, $compound = false, $agent = true, $url = '
|
|||
else {
|
||||
$actionDefault = db_get_value_sql("SELECT id_alert_action FROM talert_compound_actions WHERE id_alert_compound = " . $alert['id']);
|
||||
}
|
||||
$data[$index['description']] .= $disabledHtmlStart . ui_print_truncate_text (io_safe_input ($description), 35, false, true, true, '[…]', 'font-size: 7.1pt') . $disabledHtmlEnd;
|
||||
$data[$index['description']] .= $disabledHtmlStart . ui_print_truncate_text (io_safe_output($description), 35, false, true, true, '[…]', 'font-size: 7.1pt') . $disabledHtmlEnd;
|
||||
|
||||
$actions = alerts_get_alert_agent_module_actions ($alert['id'], false, $compound);
|
||||
|
||||
|
|
|
@ -73,7 +73,6 @@ function visual_map_print_button_editor($idDiv, $label, $float = 'left', $disabl
|
|||
echo $label;
|
||||
echo '</span>';
|
||||
echo '</div>';
|
||||
|
||||
}
|
||||
|
||||
function visual_map_print_item($layoutData) {
|
||||
|
|
|
@ -55,7 +55,7 @@ if (! check_acl ($config["id_user"], $agent["id_grupo"], "AR") && !$is_extra) {
|
|||
echo '<div style="height: 10px"> </div>';
|
||||
|
||||
//Floating div
|
||||
echo '<div id="agent_access" style="float:right; width:320px; padding-top:11px;">';
|
||||
echo '<div id="agent_access" style="float:right; width:320px; padding-top:10px;">';
|
||||
|
||||
if ($config["agentaccess"]){
|
||||
echo '<b>'.__('Agent access rate (24h)').'</b><br />';
|
||||
|
|
|
@ -332,7 +332,8 @@ if ($count < 1) {
|
|||
$data[0] .= ' '.html_print_image ("images/attachment.png", true, array ("style" => "align:middle;"));
|
||||
|
||||
$data[1] = incidents_print_status_img ($row["estado"], true);
|
||||
$data[2] = '<a href="index.php?sec=workspace&sec2=operation/incidents/incident_detail&id='.$row["id_incidencia"].'">'.ui_print_truncate_text(io_safe_output($row["titulo"]),45).'</a>';
|
||||
$data[2] = '<a href="index.php?sec=workspace&sec2=operation/incidents/incident_detail&id='.$row["id_incidencia"].'">' .
|
||||
ui_print_truncate_text(io_safe_output($row["titulo"]),45).'</a>';
|
||||
$data[3] = incidents_print_priority_img ($row["prioridad"], true);
|
||||
$data[4] = ui_print_group_icon ($row["id_grupo"], true);
|
||||
$data[5] = ui_print_timestamp ($row["actualizacion"], true);
|
||||
|
|
|
@ -463,7 +463,8 @@ if ($traps !== false) {
|
|||
//OID
|
||||
if (empty ($trap["oid"])) {
|
||||
$data[2] = __('N/A');
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$data[2] = enterprise_hook ('editor_link', array ($trap));
|
||||
if ($data[2] === ENTERPRISE_NOT_HOOK) {
|
||||
$data[2] = $trap["oid"];
|
||||
|
@ -473,14 +474,16 @@ if ($traps !== false) {
|
|||
//Value
|
||||
if (empty ($trap["value"])) {
|
||||
$data[3] = __('N/A');
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$data[3] = ui_print_truncate_text($trap["value"], 15, false);
|
||||
}
|
||||
|
||||
//Custom
|
||||
if (empty ($trap["oid_custom"])) {
|
||||
$data[4] = __('N/A');
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$data[4] = ui_print_truncate_text($trap["oid_custom"], 25, false);
|
||||
}
|
||||
|
||||
|
@ -489,7 +492,8 @@ if ($traps !== false) {
|
|||
$data[5] = '<a href="index.php?sec=usuarios&sec2=operation/users/user_edit&ver='.$trap["id_usuario"].'">'.substr ($trap["id_usuario"], 0, 8).'</a>';
|
||||
if (!empty($trap["id_usuario"]))
|
||||
$data[5] .= ui_print_help_tip(get_user_fullname($trap["id_usuario"]), true);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$data[5] = '--';
|
||||
}
|
||||
|
||||
|
@ -501,7 +505,8 @@ if ($traps !== false) {
|
|||
// Use alert severity if fired
|
||||
if (!empty ($trap["alerted"])) {
|
||||
$data[7] = html_print_image("images/pixel_yellow.png", true, array("width" => "20", "height" => "20", "border" => "0", "title" => __('Alert fired')));
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$data[7] = html_print_image("images/pixel_gray.png", true, array("width" => "20", "height" => "20", "border" => "0", "title" => __('Alert not fired')));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue