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:
mdtrooper 2012-06-13 15:29:00 +00:00
parent e3130cca1e
commit e1013140e4
20 changed files with 174 additions and 143 deletions

View File

@ -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> 2012-06-13 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* godmode/agentes/module_manager_editor.php: Fixed strings of link * godmode/agentes/module_manager_editor.php: Fixed strings of link

View File

@ -220,7 +220,10 @@ function mainAgentsModules() {
echo "<tr style='height: 25px;'>"; 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']); $agent_modules = agents_get_modules($agent['id_agente']);
$nmodules = 0; $nmodules = 0;

View File

@ -80,7 +80,8 @@ function config_update_config () {
if ($update_config) { if ($update_config) {
db_pandora_audit("Setup", "Setup has changed"); db_pandora_audit("Setup", "Setup has changed");
} else { }
else {
return false; return false;
} }
@ -231,7 +232,7 @@ function config_update_config () {
if ($update_manager_installed == 1) { if ($update_manager_installed == 1) {
if (isset($_POST['license_info_key'])){ if (isset($_POST['license_info_key'])) {
$values = array("value" => get_parameter('license_info_key')); $values = array("value" => get_parameter('license_info_key'));
$where = array("key" => 'customer_key'); $where = array("key" => 'customer_key');
$update_manage_settings_result = db_process_sql_update('tupdate_settings', $values, $where); $update_manage_settings_result = db_process_sql_update('tupdate_settings', $values, $where);

View File

@ -657,14 +657,15 @@ function groups_get_group_row($id_group, $group_all, $group, &$printed_groups) {
// Group name // Group name
echo "<td class='group_view_data' style='font-weight: bold; font-size: 12px;'>&nbsp;&nbsp;"; echo "<td class='group_view_data' style='font-weight: bold; font-size: 12px;'>&nbsp;&nbsp;";
echo $group['prefix'].ui_print_group_icon ($id_group, true, "groups_small", 'font-size: 7.5pt'); echo $group['prefix'] . ui_print_group_icon ($id_group, true, "groups_small", 'font-size: 7.5pt');
echo "&nbsp;<a class='group_view_data' href='index.php?sec=estado&sec2=operation/agentes/estado_agente&group_id=$id_group'>"; echo "&nbsp;<a class='group_view_data' href='index.php?sec=estado&sec2=operation/agentes/estado_agente&group_id=$id_group'>";
echo ui_print_truncate_text($group['name'], 35); echo ui_print_truncate_text($group['name'], 35);
echo "</a>"; echo "</a>";
echo "</td>"; echo "</td>";
echo "<td class='group_view_data' style='text-align: center; vertica-align: middle;'>"; echo "<td class='group_view_data' style='text-align: center; vertica-align: middle;'>";
if (check_acl ($config['id_user'], $id_group, "AW")) { 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>"; echo "</td>";
@ -681,11 +682,11 @@ function groups_get_group_row($id_group, $group_all, $group, &$printed_groups) {
$data["total_agents"]; $data["total_agents"];
if($id_group != 0) { if ($id_group != 0) {
$data["total_agents"] = db_get_sql ("SELECT COUNT(id_agente) FROM tagente $data["total_agents"] = db_get_sql ("SELECT COUNT(id_agente) FROM tagente
WHERE id_grupo = $id_group AND disabled = 0"); WHERE id_grupo = $id_group AND disabled = 0");
} else { }
else {
$data["total_agents"] = db_get_sql ("SELECT COUNT(id_agente) FROM tagente $data["total_agents"] = db_get_sql ("SELECT COUNT(id_agente) FROM tagente
WHERE disabled = 0"); WHERE disabled = 0");
} }

View File

@ -2116,7 +2116,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
case 1: case 1:
case 'simple_graph': case 'simple_graph':
reporting_header_content($mini, $content, $report, $table, __('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 //RUNNING
$table->colspan[1][0] = 4; $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); $report["datetime"], '', 0, 0, true, true);
array_push ($table->data, $data); array_push ($table->data, $data);
break; break;
case 'projection_graph': case 'projection_graph':
reporting_header_content($mini, $content, $report, $table, __('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; break;
case 'prediction_date': case 'prediction_date':
reporting_header_content($mini, $content, $report, $table, __('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 //RUNNING
$table->colspan[1][0] = 4; $table->colspan[1][0] = 4;
@ -2664,7 +2665,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
// Put description at the end of the module (if exists) // Put description at the end of the module (if exists)
$table->colspan[0][0] = 2; $table->colspan[0][0] = 2;
if ($content["description"] != ""){ if ($content["description"] != "") {
$data_desc = array(); $data_desc = array();
$data_desc[0] = $content["description"]; $data_desc[0] = $content["description"];
array_push ($table->data, $data_desc); array_push ($table->data, $data_desc);
@ -2695,7 +2696,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
// Put description at the end of the module (if exists) // Put description at the end of the module (if exists)
$table->colspan[1][0] = 3; $table->colspan[1][0] = 3;
if ($content["description"] != ""){ if ($content["description"] != "") {
$data_desc = array(); $data_desc = array();
$data_desc[0] = $content["description"]; $data_desc[0] = $content["description"];
array_push ($table->data, $data_desc); array_push ($table->data, $data_desc);
@ -2816,7 +2817,6 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
array_push($table->data, $data); array_push($table->data, $data);
break; break;
case 'event_report_group': case 'event_report_group':
reporting_header_content($mini, $content, $report, $table, __('Group detailed event'), reporting_header_content($mini, $content, $report, $table, __('Group detailed event'),
ui_print_truncate_text(groups_get_name($content['id_group'], true), 60, false)); 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 (); $data = array ();
$table->colspan[2][0] = 3; $table->colspan[2][0] = 3;
$data[0] = reporting_get_group_detailed_event($content['id_group'], $content['period'], $report["datetime"], true); $data[0] = reporting_get_group_detailed_event($content['id_group'], $content['period'], $report["datetime"], true);
array_push ($table->data, $data); array_push ($table->data, $data);
break; break;
case 'event_report_module': case 'event_report_module':
reporting_header_content($mini, $content, $report, $table, __('Module detailed event'), 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)); ui_print_truncate_text($agent_name, 70, false).' <br> ' . ui_print_truncate_text($module_name, 70, false));
@ -2875,7 +2875,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
// Put description at the end of the module (if exists) // Put description at the end of the module (if exists)
$table->colspan[1][0] = 3; $table->colspan[1][0] = 3;
if ($content["description"] != ""){ if ($content["description"] != "") {
$data_desc = array(); $data_desc = array();
$data_desc[0] = $content["description"]; $data_desc[0] = $content["description"];
array_push ($table->data, $data_desc); array_push ($table->data, $data_desc);
@ -2914,7 +2914,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
// Put description at the end of the module (if exists) // Put description at the end of the module (if exists)
$table->colspan[1][0] = 3; $table->colspan[1][0] = 3;
if ($content["description"] != ""){ if ($content["description"] != "") {
$data_desc = array(); $data_desc = array();
$data_desc[0] = $content["description"]; $data_desc[0] = $content["description"];
array_push ($table->data, $data_desc); array_push ($table->data, $data_desc);
@ -3024,7 +3024,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
// Put description at the end of the module (if exists) // Put description at the end of the module (if exists)
$table->colspan[1][0] = 3; $table->colspan[1][0] = 3;
if ($content["description"] != ""){ if ($content["description"] != "") {
$data_desc = array(); $data_desc = array();
$data_desc[0] = $content["description"]; $data_desc[0] = $content["description"];
array_push ($table->data, $data_desc); array_push ($table->data, $data_desc);
@ -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']); $unit = db_get_value('unit', 'tagente_modulo', 'id_agente_modulo', $row ['id_agent_module']);
$id_agent_module[$key] = $row['id_agent_module']; $id_agent_module[$key] = $row['id_agent_module'];
$agent_name[$key] = $ag_name; $agent_name[$key] = $ag_name;
$module_name[$key] = $mod_name; $module_name[$key] = $mod_name;

View File

@ -59,13 +59,13 @@ function ui_print_truncate_text($text, $numChars = 25, $showTextInAToopTip = tru
$truncateText2 = mb_strimwidth($text, (mb_strlen($text, "UTF-8") - $half_length), strlen($text), "", "UTF-8" ); $truncateText2 = mb_strimwidth($text, (mb_strlen($text, "UTF-8") - $half_length), strlen($text), "", "UTF-8" );
$truncateText = mb_strimwidth($text, 0, ($numChars - $half_length), $suffix, "UTF-8"); $truncateText = mb_strimwidth($text, 0, ($numChars - $half_length), $suffix, "UTF-8");
$truncateText=$truncateText . $truncateText2; $truncateText = $truncateText . $truncateText2;
if ($showTextInTitle) { if ($showTextInTitle) {
if ($style !== false){ if ($style !== false){
$truncateText = '<span style="' . $style . '" title="'.$text.'">'.$truncateText.'</span>'; $truncateText = '<span style="' . $style . '" title="'.$text.'">'.$truncateText.'</span>';
} }
else{ else {
$truncateText = '<span title="'.$text.'">'.$truncateText.'</span>'; $truncateText = '<span title="'.$text.'">'.$truncateText.'</span>';
} }
} }
@ -73,21 +73,21 @@ function ui_print_truncate_text($text, $numChars = 25, $showTextInAToopTip = tru
if ($style !== false){ if ($style !== false){
$truncateText = $truncateText . '<a href="#" class="tip">&nbsp;<span style="' . $style . '">' . $text . '</span></a>'; $truncateText = $truncateText . '<a href="#" class="tip">&nbsp;<span style="' . $style . '">' . $text . '</span></a>';
} }
else{ else {
$truncateText = $truncateText . '<a href="#" class="tip">&nbsp;<span>' . $text . '</span></a>'; $truncateText = $truncateText . '<a href="#" class="tip">&nbsp;<span>' . $text . '</span></a>';
} }
} }
else{ else {
if ($style !== false){ if ($style !== false) {
$truncateText = '<span style="' . $style . '">'.$truncateText.'</span>'; $truncateText = '<span style="' . $style . '">'.$truncateText.'</span>';
} }
} }
} }
else { else {
if ($style !== false){ if ($style !== false) {
$truncateText = '<span style="' . $style . '">' . $text . '</span>'; $truncateText = '<span style="' . $style . '">' . $text . '</span>';
} }
else{ else {
$truncateText = $text; $truncateText = $text;
} }
} }
@ -687,7 +687,8 @@ function ui_format_alert_row ($alert, $compound = false, $agent = true, $url = '
} }
} }
elseif ($agent == 0) { elseif ($agent == 0) {
$data[$index['module_name']] .= ui_print_truncate_text(modules_get_agentmodule_name ($alert["id_agent_module"]), 30, false, true, true, '[&hellip;]', 'font-size: 7.2pt'); $data[$index['module_name']] .=
ui_print_truncate_text(modules_get_agentmodule_name ($alert["id_agent_module"]), 30, false, true, true, '[&hellip;]', 'font-size: 7.2pt');
} }
else { else {
if ($agent_style !== false) { if ($agent_style !== false) {
@ -696,7 +697,8 @@ function ui_format_alert_row ($alert, $compound = false, $agent = true, $url = '
else { else {
$data[$index['agent_name']] .= ui_print_agent_name (modules_get_agentmodule_agent ($alert["id_agent_module"]), true, 20, $styleDisabled); $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, '[&hellip;]', 'font-size: 7.2pt'); $data[$index['module_name']] =
ui_print_truncate_text (modules_get_agentmodule_name ($alert["id_agent_module"]), 30, false, true, true, '[&hellip;]', 'font-size: 7.2pt');
} }
$data[$index['agent_name']] .= $disabledHtmlEnd; $data[$index['agent_name']] .= $disabledHtmlEnd;
@ -711,7 +713,7 @@ function ui_format_alert_row ($alert, $compound = false, $agent = true, $url = '
else { else {
$actionDefault = db_get_value_sql("SELECT id_alert_action FROM talert_compound_actions WHERE id_alert_compound = " . $alert['id']); $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, '[&hellip;]', 'font-size: 7.1pt') . $disabledHtmlEnd; $data[$index['description']] .= $disabledHtmlStart . ui_print_truncate_text (io_safe_output($description), 35, false, true, true, '[&hellip;]', 'font-size: 7.1pt') . $disabledHtmlEnd;
$actions = alerts_get_alert_agent_module_actions ($alert['id'], false, $compound); $actions = alerts_get_alert_agent_module_actions ($alert['id'], false, $compound);

View File

@ -73,7 +73,6 @@ function visual_map_print_button_editor($idDiv, $label, $float = 'left', $disabl
echo $label; echo $label;
echo '</span>'; echo '</span>';
echo '</div>'; echo '</div>';
} }
function visual_map_print_item($layoutData) { function visual_map_print_item($layoutData) {

View File

@ -55,7 +55,7 @@ if (! check_acl ($config["id_user"], $agent["id_grupo"], "AR") && !$is_extra) {
echo '<div style="height: 10px">&nbsp;</div>'; echo '<div style="height: 10px">&nbsp;</div>';
//Floating 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"]){ if ($config["agentaccess"]){
echo '<b>'.__('Agent access rate (24h)').'</b><br />'; echo '<b>'.__('Agent access rate (24h)').'</b><br />';

View File

@ -614,7 +614,7 @@ foreach ($result as $row) {
$data[6] = ""; $data[6] = "";
if ($row['history_data'] == 1){ if ($row['history_data'] == 1) {
$graph_type = return_graphtype ($row["module_type"]); $graph_type = return_graphtype ($row["module_type"]);

View File

@ -414,7 +414,7 @@ if (is_ajax ()) {
$ips = $ips[count($ips)-1]; $ips = $ips[count($ips)-1];
$ips = explode(',', $ips); $ips = explode(',', $ips);
if(count($ips) == 1) { if (count($ips) == 1) {
echo $ips[0]; echo $ips[0];
} }
else { else {
@ -432,9 +432,9 @@ if (is_ajax ()) {
$id_group = (int) get_parameter ('id_group'); $id_group = (int) get_parameter ('id_group');
$group = db_get_row ('tgrupo', 'id_grupo', $id_group); $group = db_get_row ('tgrupo', 'id_grupo', $id_group);
echo '<h3>' . html_print_image("images/groups_small/" . groups_get_icon ($group['id_grupo']) . ".png", true); echo '<h3>' . html_print_image("images/groups_small/" . groups_get_icon ($group['id_grupo']) . ".png", true);
echo ui_print_truncate_text($group['nombre'],25,false,true,false).'</h3>'; echo ui_print_truncate_text($group['nombre'], 25, false, true, false) . '</h3>';
echo '<strong>'.__('Parent').':</strong> '; echo '<strong>'.__('Parent').':</strong> ';
if($group['parent'] == 0) { if ($group['parent'] == 0) {
echo __('None').'<br />'; echo __('None').'<br />';
} }
else { else {
@ -444,7 +444,7 @@ if (is_ajax ()) {
} }
echo '<strong>'.__('Sons').':</strong> '; echo '<strong>'.__('Sons').':</strong> ';
$groups_sons = db_get_all_fields_in_table ('tgrupo', 'parent', $group['id_grupo']); $groups_sons = db_get_all_fields_in_table ('tgrupo', 'parent', $group['id_grupo']);
if($groups_sons === false){ if ($groups_sons === false) {
echo __('None').'<br />'; echo __('None').'<br />';
} }
else { else {
@ -759,7 +759,7 @@ switch($tab) {
break; break;
} }
ui_print_page_header (__('Agent').'&nbsp;-&nbsp;'.ui_print_truncate_text(agents_get_name($id_agente),25, false) . $header_description, $icon, false, "", false, $onheader); ui_print_page_header(__('Agent') . '&nbsp;-&nbsp;' . ui_print_truncate_text(agents_get_name($id_agente),25, false) . $header_description, $icon, false, "", false, $onheader);
switch ($tab) { switch ($tab) {

View File

@ -332,7 +332,8 @@ if ($count < 1) {
$data[0] .= '&nbsp;&nbsp;'.html_print_image ("images/attachment.png", true, array ("style" => "align:middle;")); $data[0] .= '&nbsp;&nbsp;'.html_print_image ("images/attachment.png", true, array ("style" => "align:middle;"));
$data[1] = incidents_print_status_img ($row["estado"], true); $data[1] = incidents_print_status_img ($row["estado"], true);
$data[2] = '<a href="index.php?sec=workspace&amp;sec2=operation/incidents/incident_detail&amp;id='.$row["id_incidencia"].'">'.ui_print_truncate_text(io_safe_output($row["titulo"]),45).'</a>'; $data[2] = '<a href="index.php?sec=workspace&amp;sec2=operation/incidents/incident_detail&amp;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[3] = incidents_print_priority_img ($row["prioridad"], true);
$data[4] = ui_print_group_icon ($row["id_grupo"], true); $data[4] = ui_print_group_icon ($row["id_grupo"], true);
$data[5] = ui_print_timestamp ($row["actualizacion"], true); $data[5] = ui_print_timestamp ($row["actualizacion"], true);

View File

@ -87,25 +87,25 @@ $table->colspan[3][0] = 3;
$table->colspan[4][0] = 3; $table->colspan[4][0] = 3;
$table->data[0][0] = "<b>".__('Title')."</b><br/>".html_print_input_text("title", $result['titulo'], '', 80, 255, true); $table->data[0][0] = "<b>".__('Title')."</b><br/>".html_print_input_text("title", $result['titulo'], '', 80, 255, true);
if(isset($result['id_incidencia'])) { if (isset($result['id_incidencia'])) {
$table->data[1][2] = "<b>".__('Assigned user')."</b><br/>".html_print_select ($users, 'id_user', $result['id_usuario'], '', '', 0, true, false, false); $table->data[1][2] = "<b>".__('Assigned user')."</b><br/>".html_print_select ($users, 'id_user', $result['id_usuario'], '', '', 0, true, false, false);
} }
else { else {
$table->data[1][2] = ""; $table->data[1][2] = "";
} }
if (isset($groups)){ if (isset($groups)) {
$table->data[1][0] = "<b>".__('Group')."</b><br/>".html_print_select ($groups, 'group', $result['id_grupo'], '', '', 0, true, false, false); $table->data[1][0] = "<b>".__('Group')."</b><br/>".html_print_select ($groups, 'group', $result['id_grupo'], '', '', 0, true, false, false);
} }
$table->data[1][1] = "<b>".__('Priority')."</b><br/>".html_print_select (incidents_get_priorities (), 'priority', $result['prioridad'], '', '', 0, true, false, false); $table->data[1][1] = "<b>".__('Priority')."</b><br/>".html_print_select (incidents_get_priorities (), 'priority', $result['prioridad'], '', '', 0, true, false, false);
$table->data[1][2] = "<b>".__('Creator')."</b><br/>".$result['id_creator']; $table->data[1][2] = "<b>".__('Creator')."</b><br/>".$result['id_creator'];
if(isset($result['id_incidencia'])) { if (isset($result['id_incidencia'])) {
$table->data[2][0] = "<b>".__('Source')."</b><br/>".html_print_select ($sources, 'source', $result['origen'], '', '', 0, true, false, false); $table->data[2][0] = "<b>".__('Source')."</b><br/>".html_print_select ($sources, 'source', $result['origen'], '', '', 0, true, false, false);
$table->data[2][1] = "<b>".__('Resolution')."</b><br/>".html_print_select ($resolutions, 'resolution', $result['resolution'], '', '', 0, true, false, false); $table->data[2][1] = "<b>".__('Resolution')."</b><br/>".html_print_select ($resolutions, 'resolution', $result['resolution'], '', '', 0, true, false, false);
$table->data[2][2] = "<b>".__('Status')."</b><br/>".html_print_select ($status, 'status', $result['estado'], '', '', 0, true, false, false); $table->data[2][2] = "<b>".__('Status')."</b><br/>".html_print_select ($status, 'status', $result['estado'], '', '', 0, true, false, false);
} }
if(is_array($result['descripcion'])) { if (is_array($result['descripcion'])) {
$result['descripcion'] = ""; $result['descripcion'] = "";
} }

View File

@ -463,7 +463,8 @@ if ($traps !== false) {
//OID //OID
if (empty ($trap["oid"])) { if (empty ($trap["oid"])) {
$data[2] = __('N/A'); $data[2] = __('N/A');
} else { }
else {
$data[2] = enterprise_hook ('editor_link', array ($trap)); $data[2] = enterprise_hook ('editor_link', array ($trap));
if ($data[2] === ENTERPRISE_NOT_HOOK) { if ($data[2] === ENTERPRISE_NOT_HOOK) {
$data[2] = $trap["oid"]; $data[2] = $trap["oid"];
@ -473,14 +474,16 @@ if ($traps !== false) {
//Value //Value
if (empty ($trap["value"])) { if (empty ($trap["value"])) {
$data[3] = __('N/A'); $data[3] = __('N/A');
} else { }
else {
$data[3] = ui_print_truncate_text($trap["value"], 15, false); $data[3] = ui_print_truncate_text($trap["value"], 15, false);
} }
//Custom //Custom
if (empty ($trap["oid_custom"])) { if (empty ($trap["oid_custom"])) {
$data[4] = __('N/A'); $data[4] = __('N/A');
} else { }
else {
$data[4] = ui_print_truncate_text($trap["oid_custom"], 25, false); $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>'; $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"])) if (!empty($trap["id_usuario"]))
$data[5] .= ui_print_help_tip(get_user_fullname($trap["id_usuario"]), true); $data[5] .= ui_print_help_tip(get_user_fullname($trap["id_usuario"]), true);
} else { }
else {
$data[5] = '--'; $data[5] = '--';
} }
@ -501,7 +505,8 @@ if ($traps !== false) {
// Use alert severity if fired // Use alert severity if fired
if (!empty ($trap["alerted"])) { if (!empty ($trap["alerted"])) {
$data[7] = html_print_image("images/pixel_yellow.png", true, array("width" => "20", "height" => "20", "border" => "0", "title" => __('Alert fired'))); $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'))); $data[7] = html_print_image("images/pixel_gray.png", true, array("width" => "20", "height" => "20", "border" => "0", "title" => __('Alert not fired')));
} }