Fixed the style for the agents with a hudge list of ips

This commit is contained in:
mdtrooper 2014-10-24 11:03:45 +02:00
parent c025f0ee83
commit edf25fe620
1 changed files with 30 additions and 20 deletions

View File

@ -236,7 +236,11 @@ $table_data->data[] = $data;
if (!empty($addresses)) { if (!empty($addresses)) {
$data = array(); $data = array();
$data[0] = '<b>' . __('Other IP addresses') . '</b>'; $data[0] = '<b>' . __('Other IP addresses') . '</b>';
$data[1] = implode('<br>',$addresses); $data[1] = '<div style="max-height: 150px; overflow-y: auto;">' .
implode('<br>',$addresses) .
'</div>';
//~ $table_data->data[] = '<div style="max-height: 200px; overflow: hidden;>' .
//~ $data . '</div>';
$table_data->data[] = $data; $table_data->data[] = $data;
} }
@ -253,7 +257,7 @@ $table_data->data[] = $data;
$has_remote_conf = enterprise_hook('config_agents_has_remote_configuration',array($agent["id_agente"])); $has_remote_conf = enterprise_hook('config_agents_has_remote_configuration',array($agent["id_agente"]));
if(enterprise_installed()) { if (enterprise_installed()) {
$data = array(); $data = array();
$data[0] = '<b>' . __('Remote configuration') . '</b>'; $data[0] = '<b>' . __('Remote configuration') . '</b>';
if (!$has_remote_conf) { if (!$has_remote_conf) {
@ -270,7 +274,8 @@ if ($config['activate_gis'] || $agent['url_address'] != '') {
$data = array(); $data = array();
// Position Information // Position Information
if ($config['activate_gis']) { if ($config['activate_gis']) {
$dataPositionAgent = gis_get_data_last_position_agent($agent['id_agente']); $dataPositionAgent =
gis_get_data_last_position_agent($agent['id_agente']);
$data[0] = '<b>' . __('Position (Long, Lat)') . '</b>'; $data[0] = '<b>' . __('Position (Long, Lat)') . '</b>';
@ -306,15 +311,20 @@ if ($agent['timezone_offset'] != 0) {
} }
// Custom fields // Custom fields
$fields = db_get_all_rows_filter('tagent_custom_fields', array('display_on_front' => 1)); $fields = db_get_all_rows_filter(
'tagent_custom_fields',
array('display_on_front' => 1));
if ($fields === false) { if ($fields === false) {
$fields = array (); $fields = array ();
} }
foreach ($fields as $field) { foreach ($fields as $field) {
$data = array(); $data = array();
$data[0] = '<b>' . $field['name'] . ui_print_help_tip (__('Custom field'), true) . '</b>'; $data[0] = '<b>' . $field['name'] .
$custom_value = db_get_value_filter('description', 'tagent_custom_data', array('id_field' => $field['id_field'], 'id_agent' => $id_agente)); ui_print_help_tip (__('Custom field'), true) . '</b>';
$custom_value = db_get_value_filter(
'description', 'tagent_custom_data',
array('id_field' => $field['id_field'], 'id_agent' => $id_agente));
if ($custom_value === false || $custom_value == '') { if ($custom_value === false || $custom_value == '') {
$custom_value = '<i>'.__('N/A').'</i>'; $custom_value = '<i>'.__('N/A').'</i>';
} }
@ -326,9 +336,10 @@ foreach ($fields as $field) {
// START: TABLE INCIDENTS // START: TABLE INCIDENTS
$last_incident = db_get_row_sql("SELECT * FROM tincidencia $last_incident = db_get_row_sql("
SELECT * FROM tincidencia
WHERE estado IN (0,1) WHERE estado IN (0,1)
AND id_agent=$id_agente AND id_agent = $id_agente
ORDER BY actualizacion DESC"); ORDER BY actualizacion DESC");
if ($last_incident != false) { if ($last_incident != false) {
@ -414,8 +425,7 @@ if (!empty($modules)) {
$table_interface->head = array(); $table_interface->head = array();
$options = array( $options = array(
"class" => "closed", "class" => "closed",
"style" => "vertical-align:middle; cursor:pointer;" "style" => "vertical-align:middle; cursor:pointer;");
);
$table_interface->head[0] = html_print_image("images/go.png", true, $options) . "&nbsp;&nbsp;"; $table_interface->head[0] = html_print_image("images/go.png", true, $options) . "&nbsp;&nbsp;";
$table_interface->head[0] .= '<span style="vertical-align: middle;">' . __('Interface information') .' (SNMP)</span>'; $table_interface->head[0] .= '<span style="vertical-align: middle;">' . __('Interface information') .' (SNMP)</span>';
$table_interface->head_colspan = array(); $table_interface->head_colspan = array();