Added new fields to log report. Ticket #337
This commit is contained in:
parent
7b9ad0cb62
commit
7ffe4988f0
|
@ -63,6 +63,7 @@ $order_uptodown = 0;
|
||||||
$show_resume = 0;
|
$show_resume = 0;
|
||||||
$show_address_agent = 0;
|
$show_address_agent = 0;
|
||||||
$top_n = 0;
|
$top_n = 0;
|
||||||
|
$source = 0;
|
||||||
$top_n_value = 10;
|
$top_n_value = 10;
|
||||||
$exception_condition = REPORT_EXCEPTION_CONDITION_EVERYTHING;
|
$exception_condition = REPORT_EXCEPTION_CONDITION_EVERYTHING;
|
||||||
$exception_condition_value = 10;
|
$exception_condition_value = 10;
|
||||||
|
@ -199,13 +200,7 @@ switch ($action) {
|
||||||
$description = $item['description'];
|
$description = $item['description'];
|
||||||
$es = json_decode($item['external_source'], true);
|
$es = json_decode($item['external_source'], true);
|
||||||
$id_agents = $es['id_agents'];
|
$id_agents = $es['id_agents'];
|
||||||
if ((count($es['module']) == 1) && ($es['module'][0] == 0)) {
|
$source = $es['source'];
|
||||||
$module = "";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$module = $es['module'];
|
|
||||||
}
|
|
||||||
$idAgentModule = $module;
|
|
||||||
break;
|
break;
|
||||||
case 'simple_graph':
|
case 'simple_graph':
|
||||||
$only_avg = isset($style['only_avg']) ? (bool) $style['only_avg'] : true;
|
$only_avg = isset($style['only_avg']) ? (bool) $style['only_avg'] : true;
|
||||||
|
@ -882,6 +877,34 @@ You can of course remove the warnings, that's why we include the source and do n
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr id="row_source" style="" class="datos">
|
||||||
|
<td style="font-weight:bold;"><?php echo __('Source');?></td>
|
||||||
|
<td style="">
|
||||||
|
<?php
|
||||||
|
$agents = agents_get_group_agents($group);
|
||||||
|
if ((empty($agents)) || $agents == -1) $agents = array();
|
||||||
|
|
||||||
|
$sql = 'SELECT source
|
||||||
|
FROM tagente,tagent_module_log
|
||||||
|
WHERE tagente.id_agente = tagent_module_log.id_agent ';
|
||||||
|
|
||||||
|
if (!empty($agents)) {
|
||||||
|
$index = 0;
|
||||||
|
foreach ($agents as $key => $a) {
|
||||||
|
if ($index == 0) {
|
||||||
|
$sql .= ' AND (id_agente = ' . $key;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$sql .= ' OR id_agente = ' . $key;
|
||||||
|
}
|
||||||
|
$index++;
|
||||||
|
}
|
||||||
|
$sql .= ")";
|
||||||
|
}
|
||||||
|
html_print_select_from_sql ($sql, 'source', $source, '', __('All'), '', false, false, false);
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr id="row_module_group" style="" class="datos">
|
<tr id="row_module_group" style="" class="datos">
|
||||||
<td style="font-weight:bold;"><?php echo __('Module group');?></td>
|
<td style="font-weight:bold;"><?php echo __('Module group');?></td>
|
||||||
<td style="">
|
<td style="">
|
||||||
|
@ -2575,6 +2598,7 @@ function chooseType() {
|
||||||
$("#row_event_severity").hide();
|
$("#row_event_severity").hide();
|
||||||
$("#row_event_type").hide();
|
$("#row_event_type").hide();
|
||||||
$("#row_event_status").hide();
|
$("#row_event_status").hide();
|
||||||
|
$("#row_source").hide();
|
||||||
|
|
||||||
// SLA list default state
|
// SLA list default state
|
||||||
$("#sla_list").hide();
|
$("#sla_list").hide();
|
||||||
|
@ -2612,7 +2636,7 @@ function chooseType() {
|
||||||
$("#row_description").show();
|
$("#row_description").show();
|
||||||
$("#row_period").show();
|
$("#row_period").show();
|
||||||
$("#agents_row").show();
|
$("#agents_row").show();
|
||||||
$("#modules_row").show();
|
$("#row_source").show();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'simple_graph':
|
case 'simple_graph':
|
||||||
|
|
|
@ -924,9 +924,9 @@ switch ($action) {
|
||||||
break;
|
break;
|
||||||
case 'event_report_log':
|
case 'event_report_log':
|
||||||
$agents_to_report = get_parameter('id_agents2');
|
$agents_to_report = get_parameter('id_agents2');
|
||||||
$modules_to_report = get_parameter('module', "");
|
$source = get_parameter('source', "");
|
||||||
|
|
||||||
$es['module'] = get_same_modules($agents_to_report, $modules_to_report);
|
$es['source'] = $source;
|
||||||
$es['id_agents'] = $agents_to_report;
|
$es['id_agents'] = $agents_to_report;
|
||||||
|
|
||||||
$values['external_source'] = json_encode($es);
|
$values['external_source'] = json_encode($es);
|
||||||
|
@ -1278,9 +1278,9 @@ switch ($action) {
|
||||||
break;
|
break;
|
||||||
case 'event_report_log':
|
case 'event_report_log':
|
||||||
$agents_to_report = get_parameter('id_agents2');
|
$agents_to_report = get_parameter('id_agents2');
|
||||||
$modules_to_report = get_parameter('module', "");
|
$source = get_parameter('source', "");
|
||||||
|
|
||||||
$es['module'] = get_same_modules($agents_to_report, $modules_to_report);
|
$es['source'] = $source;
|
||||||
$es['id_agents'] = $agents_to_report;
|
$es['id_agents'] = $agents_to_report;
|
||||||
|
|
||||||
$values['external_source'] = json_encode($es);
|
$values['external_source'] = json_encode($es);
|
||||||
|
|
Loading…
Reference in New Issue