diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index a4642c8907..2519a4a64e 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2014-05-05 Vanessa Gil + + * operation/agentes/estado_generalagente.php: Add incident view + in agent detail. + 2014-05-04 Junichi Satoh * godmode/agentes/planned_downtime.list.php: Fixed unexpected agent diff --git a/pandora_console/operation/agentes/estado_generalagente.php b/pandora_console/operation/agentes/estado_generalagente.php index 55c3be6b96..4b89a8e15a 100644 --- a/pandora_console/operation/agentes/estado_generalagente.php +++ b/pandora_console/operation/agentes/estado_generalagente.php @@ -23,7 +23,7 @@ require_once ("include/functions_agents.php"); require_once ($config["homedir"] . '/include/functions_graph.php'); include_graphs_dependencies(); require_once ($config['homedir'] . '/include/functions_groups.php'); - +require_once ($config['homedir'] .'/include/functions_incidents.php'); check_login (); @@ -311,6 +311,49 @@ foreach ($fields as $field) { // END: TABLE DATA BUILD +// START: TABLE INCIDENTS + +$last_incident = db_get_row_sql("SELECT * FROM tincidencia + WHERE estado IN (0,1) + AND id_agent=$id_agente + ORDER BY actualizacion DESC"); + +if ($last_incident != false) { + + $table_incident->id = 'agent_incident_main'; + $table_incident->width = '100%'; + $table_incident->cellspacing = 4; + $table_incident->cellpadding = 4; + $table_incident->class = 'databox'; + $table_incident->style[0] = 'width: 30%;'; + $table_incident->style[1] = 'width: 70%;'; + + $table_incident->head[0] = ' ' . '' .__('Active incident on this agent') .''. ''; + $table_incident->head_colspan[0] = 2; + + $data = array(); + $data[0] = '' . __('Author') . ''; + $data[1] = $last_incident["id_creator"]; + $table_incident->data[] = $data; + + $data = array(); + $data[0] = '' . __('Title') . ''; + $data[1] = '' .$last_incident["titulo"].''; + $table_incident->data[] = $data; + + $data = array(); + $data[0] = '' . __('Timestamp') . ''; + $data[1] = $last_incident["inicio"]; + $table_incident->data[] = $data; + + $data = array(); + $data[0] = '' . __('Priority') . ''; + $data[1] = incidents_print_priority_img ($last_incident["prioridad"], true); + $table_incident->data[] = $data; + +} +// END: TABLE INCIDENTS + // START: TABLE INTERFACES $columns = array( @@ -441,6 +484,7 @@ if ($config["agentaccess"]) { $data[1] = html_print_table($table_contact, true); $data[1] .= empty($table_data->data) ? '' : '
' . html_print_table($table_data, true); +$data[1] .= !isset($table_incident) ? '' : '
' . html_print_table($table_incident, true); $data[1] .= !isset($table_interface) ? '' : '
' . html_print_table($table_interface, true); $table->rowspan[0][1] = 2;