2012-04-09 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* godmode/reporting/reporting_builder.list_items.php godmode/reporting/reporting_builder.item_editor.php: Fixed display of grouped reports in metaconsole. Fixes: #3514539 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5918 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
1c347d2941
commit
65d32498af
|
@ -1,3 +1,11 @@
|
|||
2012-04-09 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
|
||||
* godmode/reporting/reporting_builder.list_items.php
|
||||
godmode/reporting/reporting_builder.item_editor.php: Fixed display
|
||||
of grouped reports in metaconsole.
|
||||
|
||||
Fixes: #3514539
|
||||
|
||||
2012-04-09 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_ui.php: cleaned source code style.
|
||||
|
|
|
@ -264,7 +264,7 @@ switch ($action) {
|
|||
break;
|
||||
case 'alert_report_agent':
|
||||
$description = $item['description'];
|
||||
$idAgent = $item['id_agent'];
|
||||
$idAgent = db_get_value_filter('id_agente', 'tagente_modulo', array('id_agente' => $item['id_agent']));
|
||||
$period = $item['period'];
|
||||
break;
|
||||
case 'event_report_agent':
|
||||
|
@ -469,8 +469,21 @@ html_print_input_hidden('id_item', $idItem);
|
|||
<td style="vertical-align: top;"><?php echo __('Agent'); ?></td>
|
||||
<td style="">
|
||||
<?php
|
||||
if ($config['metaconsole'] == 1) {
|
||||
$connection = metaconsole_get_connection($server_name);
|
||||
$agent_name = '';
|
||||
|
||||
if (metaconsole_load_external_db($connection))
|
||||
$agent_name = db_get_value_filter('nombre', 'tagente', array('id_agente' => $idAgent));
|
||||
|
||||
//Restore db connection
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
else {
|
||||
$agent_name = agents_get_name ($idAgent);
|
||||
}
|
||||
html_print_input_hidden('id_agent', $idAgent) .
|
||||
html_print_input_text_extended ('agent', agents_get_name ($idAgent),
|
||||
html_print_input_text_extended ('agent', $agent_name,
|
||||
'text-agent', '', 30, 100, false, '',
|
||||
array('style' => 'background: url(images/lightning.png) no-repeat right;'))
|
||||
. ui_print_help_tip(__("Type at least two characters to search"), false);
|
||||
|
|
|
@ -270,14 +270,18 @@ foreach ($items as $item) {
|
|||
$connection = metaconsole_get_connection($server_name);
|
||||
if (!metaconsole_load_external_db($connection)) {
|
||||
//ui_print_error_message ("Error connecting to ".$server_name);
|
||||
// Don't skip SLA or top N or general report items
|
||||
if (($item['type'] != 'SLA') and ($item['type'] != 'top_n') and ($item['type'] != 'general')
|
||||
and ($item['type'] != 'exception') and ($item['type'] != 'group_report'))
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if ($item['id_agent'] == 0) {
|
||||
if ($item['id_agent_module'] == '') {
|
||||
$row[2] = '-';
|
||||
$row[3] = '-';
|
||||
// Due to SLA or top N or general report items
|
||||
if (($item['id_agent_module'] == '') or ($item['id_agent_module'] == 0)) {
|
||||
$row[2] = '';
|
||||
$row[3] = '';
|
||||
}
|
||||
else {
|
||||
$row[2] = ui_print_truncate_text(agents_get_name(agents_get_module_id($item['id_agent_module'])), 35);
|
||||
|
@ -288,7 +292,7 @@ foreach ($items as $item) {
|
|||
$row[2] = ui_print_truncate_text(agents_get_name($item['id_agent']), 35);
|
||||
|
||||
if ($item['id_agent_module'] == '') {
|
||||
$row [3] = '-';
|
||||
$row [3] = '';
|
||||
}
|
||||
else {
|
||||
$row[3] = ui_print_truncate_text(db_get_value_filter('nombre', 'tagente_modulo', array('id_agente_modulo' => $item['id_agent_module'])),35);
|
||||
|
|
Loading…
Reference in New Issue