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
e3130cca1e
commit
e1013140e4
|
@ -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;
|
||||
|
|
|
@ -215,14 +215,14 @@ function mainModuleGroups() {
|
|||
else {
|
||||
|
||||
if ($fired) {
|
||||
$color = '#ffa300'; //Orange when the cell for this model group and agent has at least one alert fired.
|
||||
$color = '#ffa300'; //Orange when the cell for this model group and agent has at least one alert fired.
|
||||
}
|
||||
else if (array_key_exists(1,$states)) {
|
||||
$color = '#cc0000'; //Red when the cell for this model group and agent has at least one module in critical state and the rest in any state.
|
||||
$font_color = '#ffffff';
|
||||
$color = '#cc0000'; //Red when the cell for this model group and agent has at least one module in critical state and the rest in any state.
|
||||
$font_color = '#ffffff';
|
||||
}
|
||||
elseif (array_key_exists(2,$states)) {
|
||||
$color = '#fce94f'; //Yellow when the cell for this model group and agent has at least one in warning state and the rest in green state.
|
||||
$color = '#fce94f'; //Yellow when the cell for this model group and agent has at least one in warning state and the rest in green state.
|
||||
}
|
||||
elseif (array_key_exists(3,$states)) {
|
||||
$color = '#babdb6'; //Grey when the cell for this model group and agent has at least one module in unknown state and the rest in any state.
|
||||
|
|
|
@ -147,7 +147,7 @@ if ($get_metaconsole_hash_data) {
|
|||
|
||||
$server = enterprise_hook('metaconsole_get_connection', array($server_name));
|
||||
|
||||
$pwd = $server["auth_token"]; // Create HASH login info
|
||||
$pwd = $server["auth_token"]; // Create HASH login info
|
||||
$user = $config["id_user"];
|
||||
$hashdata = $user.$pwd;
|
||||
$hashdata = md5($hashdata);
|
||||
|
|
|
@ -812,7 +812,7 @@ function get_event_types () {
|
|||
|
||||
$types['critical'] = __('Monitor Critical');
|
||||
$types['warning'] = __('Monitor Warning');
|
||||
$types['normal'] = __('Monitor Normal');
|
||||
$types['normal'] = __('Monitor Normal');
|
||||
|
||||
$types['alert_fired'] = __('Alert fired');
|
||||
$types['alert_recovered'] = __('Alert recovered');
|
||||
|
|
|
@ -80,7 +80,8 @@ function config_update_config () {
|
|||
|
||||
if ($update_config) {
|
||||
db_pandora_audit("Setup", "Setup has changed");
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -231,7 +232,7 @@ function config_update_config () {
|
|||
|
||||
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'));
|
||||
$where = array("key" => 'customer_key');
|
||||
$update_manage_settings_result = db_process_sql_update('tupdate_settings', $values, $where);
|
||||
|
|
|
@ -657,14 +657,15 @@ function groups_get_group_row($id_group, $group_all, $group, &$printed_groups) {
|
|||
|
||||
// Group name
|
||||
echo "<td class='group_view_data' style='font-weight: bold; font-size: 12px;'> ";
|
||||
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 " <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 "</a>";
|
||||
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>";
|
||||
|
||||
|
@ -681,13 +682,13 @@ function groups_get_group_row($id_group, $group_all, $group, &$printed_groups) {
|
|||
|
||||
$data["total_agents"];
|
||||
|
||||
if($id_group != 0) {
|
||||
|
||||
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 {
|
||||
WHERE id_grupo = $id_group AND disabled = 0");
|
||||
}
|
||||
else {
|
||||
$data["total_agents"] = db_get_sql ("SELECT COUNT(id_agente) FROM tagente
|
||||
WHERE disabled = 0");
|
||||
WHERE disabled = 0");
|
||||
}
|
||||
|
||||
echo $data["total_agents"];
|
||||
|
|
|
@ -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;
|
||||
|
@ -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)
|
||||
$table->colspan[0][0] = 2;
|
||||
if ($content["description"] != ""){
|
||||
if ($content["description"] != "") {
|
||||
$data_desc = array();
|
||||
$data_desc[0] = $content["description"];
|
||||
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)
|
||||
$table->colspan[1][0] = 3;
|
||||
if ($content["description"] != ""){
|
||||
if ($content["description"] != "") {
|
||||
$data_desc = array();
|
||||
$data_desc[0] = $content["description"];
|
||||
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);
|
||||
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));
|
||||
|
@ -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)
|
||||
$table->colspan[1][0] = 3;
|
||||
if ($content["description"] != ""){
|
||||
if ($content["description"] != "") {
|
||||
$data_desc = array();
|
||||
$data_desc[0] = $content["description"];
|
||||
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)
|
||||
$table->colspan[1][0] = 3;
|
||||
if ($content["description"] != ""){
|
||||
if ($content["description"] != "") {
|
||||
$data_desc = array();
|
||||
$data_desc[0] = $content["description"];
|
||||
array_push ($table->data, $data_desc);
|
||||
|
@ -2933,10 +2933,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
$datelimit = $report["datetime"] - $content['period'];
|
||||
|
||||
$result = db_get_all_rows_sql('SELECT *
|
||||
FROM tagente_datos
|
||||
WHERE id_agente_modulo = ' . $content['id_agent_module'] . '
|
||||
AND utimestamp > ' . $datelimit . '
|
||||
AND utimestamp <= ' . $report["datetime"]);
|
||||
FROM tagente_datos
|
||||
WHERE id_agente_modulo = ' . $content['id_agent_module'] . '
|
||||
AND utimestamp > ' . $datelimit . '
|
||||
AND utimestamp <= ' . $report["datetime"]);
|
||||
|
||||
// Adds string data if there is no numeric data
|
||||
if ((count($result) < 0) or (!$result)){
|
||||
|
@ -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)
|
||||
$table->colspan[1][0] = 3;
|
||||
if ($content["description"] != ""){
|
||||
if ($content["description"] != "") {
|
||||
$data_desc = array();
|
||||
$data_desc[0] = $content["description"];
|
||||
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']);
|
||||
|
||||
$id_agent_module[$key] = $row['id_agent_module'];
|
||||
$agent_name[$key] = $ag_name;
|
||||
$module_name[$key] = $mod_name;
|
||||
|
|
|
@ -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" );
|
||||
|
||||
$truncateText = mb_strimwidth($text, 0, ($numChars - $half_length), $suffix, "UTF-8");
|
||||
$truncateText=$truncateText . $truncateText2;
|
||||
$truncateText = $truncateText . $truncateText2;
|
||||
|
||||
if ($showTextInTitle) {
|
||||
if ($style !== false){
|
||||
$truncateText = '<span style="' . $style . '" title="'.$text.'">'.$truncateText.'</span>';
|
||||
}
|
||||
else{
|
||||
else {
|
||||
$truncateText = '<span title="'.$text.'">'.$truncateText.'</span>';
|
||||
}
|
||||
}
|
||||
|
@ -73,21 +73,21 @@ function ui_print_truncate_text($text, $numChars = 25, $showTextInAToopTip = tru
|
|||
if ($style !== false){
|
||||
$truncateText = $truncateText . '<a href="#" class="tip"> <span style="' . $style . '">' . $text . '</span></a>';
|
||||
}
|
||||
else{
|
||||
else {
|
||||
$truncateText = $truncateText . '<a href="#" class="tip"> <span>' . $text . '</span></a>';
|
||||
}
|
||||
}
|
||||
else{
|
||||
if ($style !== false){
|
||||
else {
|
||||
if ($style !== false) {
|
||||
$truncateText = '<span style="' . $style . '">'.$truncateText.'</span>';
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($style !== false){
|
||||
if ($style !== false) {
|
||||
$truncateText = '<span style="' . $style . '">' . $text . '</span>';
|
||||
}
|
||||
else{
|
||||
else {
|
||||
$truncateText = $text;
|
||||
}
|
||||
}
|
||||
|
@ -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 />';
|
||||
|
@ -149,21 +149,21 @@ if ($config['activate_gis']) {
|
|||
$dataPositionAgent = gis_get_data_last_position_agent($agent['id_agente']);
|
||||
|
||||
echo '<tr><td class="datos2"><b>'.__('Position (Long, Lat)'). '</b></td>';
|
||||
echo '<td class="datos2" colspan="2">';
|
||||
echo '<td class="datos2" colspan="2">';
|
||||
|
||||
if ($dataPositionAgent === false) {
|
||||
echo __('There is no GIS data.');
|
||||
}
|
||||
else {
|
||||
echo '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=gis&id_agente='.$id_agente.'">';
|
||||
if ($dataPositionAgent['description'] != "")
|
||||
echo $dataPositionAgent['description'];
|
||||
else
|
||||
echo $dataPositionAgent['stored_longitude'].', '.$dataPositionAgent['stored_latitude'];
|
||||
echo "</a>";
|
||||
}
|
||||
if ($dataPositionAgent === false) {
|
||||
echo __('There is no GIS data.');
|
||||
}
|
||||
else {
|
||||
echo '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=gis&id_agente='.$id_agente.'">';
|
||||
if ($dataPositionAgent['description'] != "")
|
||||
echo $dataPositionAgent['description'];
|
||||
else
|
||||
echo $dataPositionAgent['stored_longitude'].', '.$dataPositionAgent['stored_latitude'];
|
||||
echo "</a>";
|
||||
}
|
||||
|
||||
echo '</td></tr>';
|
||||
echo '</td></tr>';
|
||||
}
|
||||
|
||||
// If the url description is setted
|
||||
|
|
|
@ -614,7 +614,7 @@ foreach ($result as $row) {
|
|||
|
||||
$data[6] = "";
|
||||
|
||||
if ($row['history_data'] == 1){
|
||||
if ($row['history_data'] == 1) {
|
||||
|
||||
$graph_type = return_graphtype ($row["module_type"]);
|
||||
|
||||
|
|
|
@ -414,7 +414,7 @@ if (is_ajax ()) {
|
|||
$ips = $ips[count($ips)-1];
|
||||
|
||||
$ips = explode(',', $ips);
|
||||
if(count($ips) == 1) {
|
||||
if (count($ips) == 1) {
|
||||
echo $ips[0];
|
||||
}
|
||||
else {
|
||||
|
@ -432,9 +432,9 @@ if (is_ajax ()) {
|
|||
$id_group = (int) get_parameter ('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 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> ';
|
||||
if($group['parent'] == 0) {
|
||||
if ($group['parent'] == 0) {
|
||||
echo __('None').'<br />';
|
||||
}
|
||||
else {
|
||||
|
@ -444,7 +444,7 @@ if (is_ajax ()) {
|
|||
}
|
||||
echo '<strong>'.__('Sons').':</strong> ';
|
||||
$groups_sons = db_get_all_fields_in_table ('tgrupo', 'parent', $group['id_grupo']);
|
||||
if($groups_sons === false){
|
||||
if ($groups_sons === false) {
|
||||
echo __('None').'<br />';
|
||||
}
|
||||
else {
|
||||
|
@ -759,7 +759,7 @@ switch($tab) {
|
|||
break;
|
||||
}
|
||||
|
||||
ui_print_page_header (__('Agent').' - '.ui_print_truncate_text(agents_get_name($id_agente),25, false) . $header_description, $icon, false, "", false, $onheader);
|
||||
ui_print_page_header(__('Agent') . ' - ' . ui_print_truncate_text(agents_get_name($id_agente),25, false) . $header_description, $icon, false, "", false, $onheader);
|
||||
|
||||
|
||||
switch ($tab) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -87,25 +87,25 @@ $table->colspan[3][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);
|
||||
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);
|
||||
}
|
||||
else {
|
||||
$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][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'];
|
||||
|
||||
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][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);
|
||||
}
|
||||
|
||||
if(is_array($result['descripcion'])) {
|
||||
if (is_array($result['descripcion'])) {
|
||||
$result['descripcion'] = "";
|
||||
}
|
||||
|
||||
|
|
|
@ -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