mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Fixed the lost checkbox to show graphs in the event items in the report (Merge from the commit 5572b885745a3cd7522c3e39961044e5d92b1451).
This commit is contained in:
parent
6b13110b5b
commit
3578687aad
@ -498,7 +498,8 @@ switch ($action) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$urlForm = $config['homeurl'] . 'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=item_editor&action=' . $actionParameter . '&id_report=' . $idReport;
|
$urlForm = $config['homeurl'] .
|
||||||
|
'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=item_editor&action=' . $actionParameter . '&id_report=' . $idReport;
|
||||||
|
|
||||||
echo '<form action="' . $urlForm . '" method="post">';
|
echo '<form action="' . $urlForm . '" method="post">';
|
||||||
html_print_input_hidden('id_item', $idItem);
|
html_print_input_hidden('id_item', $idItem);
|
||||||
@ -552,8 +553,8 @@ else
|
|||||||
</tr>
|
</tr>
|
||||||
<tr id="row_netflow_filter" style="" class="datos">
|
<tr id="row_netflow_filter" style="" class="datos">
|
||||||
<td><?php echo __('Filter');?></td>
|
<td><?php echo __('Filter');?></td>
|
||||||
<td><?php
|
<td>
|
||||||
|
<?php
|
||||||
$own_info = get_user_info ($config['id_user']);
|
$own_info = get_user_info ($config['id_user']);
|
||||||
|
|
||||||
// Get group list that user has access
|
// Get group list that user has access
|
||||||
@ -1082,7 +1083,12 @@ else
|
|||||||
</tr>
|
</tr>
|
||||||
<tr id="row_show_resume" style="" class="datos">
|
<tr id="row_show_resume" style="" class="datos">
|
||||||
<td><?php echo __('Show resume') . ui_print_help_tip(__('Show a resume table with max, min, average of total modules on the report bottom'), true);?></td>
|
<td><?php echo __('Show resume') . ui_print_help_tip(__('Show a resume table with max, min, average of total modules on the report bottom'), true);?></td>
|
||||||
<td><?php html_print_checkbox('checkbox_show_resume', 1, $show_resume);?></td>
|
<td>
|
||||||
|
<?php
|
||||||
|
html_print_checkbox('checkbox_show_resume', 1,
|
||||||
|
$show_resume);
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="row_event_filter" style="" class="datos">
|
<tr id="row_event_filter" style="" class="datos">
|
||||||
<td><?php echo __('Event filter'); ?></td>
|
<td><?php echo __('Event filter'); ?></td>
|
||||||
@ -1109,14 +1115,24 @@ else
|
|||||||
html_print_checkbox ('event_graph_by_agent', true, $event_graph_by_agent);
|
html_print_checkbox ('event_graph_by_agent', true, $event_graph_by_agent);
|
||||||
?>
|
?>
|
||||||
</span>
|
</span>
|
||||||
<?
|
<span id="row_event_graph_by_user">
|
||||||
|
<?php
|
||||||
echo __('By user validator');
|
echo __('By user validator');
|
||||||
html_print_checkbox ('event_graph_by_user_validator', true, $event_graph_by_user_validator);
|
html_print_checkbox ('event_graph_by_user_validator', true, $event_graph_by_user_validator);
|
||||||
|
?>
|
||||||
|
</span>
|
||||||
|
<span id="row_event_graph_by_criticity">
|
||||||
|
<?php
|
||||||
echo __('By criticity');
|
echo __('By criticity');
|
||||||
html_print_checkbox ('event_graph_by_criticity', true, $event_graph_by_criticity);
|
html_print_checkbox ('event_graph_by_criticity', true, $event_graph_by_criticity);
|
||||||
|
?>
|
||||||
|
</span>
|
||||||
|
<span id="row_event_graph_by_validated">
|
||||||
|
<?php
|
||||||
echo __('Validated vs unvalidated');
|
echo __('Validated vs unvalidated');
|
||||||
html_print_checkbox ('event_graph_validated_vs_unvalidated', true, $event_graph_validated_vs_unvalidated);
|
html_print_checkbox ('event_graph_validated_vs_unvalidated', true, $event_graph_validated_vs_unvalidated);
|
||||||
?>
|
?>
|
||||||
|
</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="row_show_in_two_columns" style="" class="datos">
|
<tr id="row_show_in_two_columns" style="" class="datos">
|
||||||
@ -1170,7 +1186,8 @@ function print_SLA_list($width, $action, $idItem = null) {
|
|||||||
global $config;
|
global $config;
|
||||||
global $meta;
|
global $meta;
|
||||||
|
|
||||||
$report_item_type = db_get_value ('type', 'treport_content', 'id_rc', $idItem);
|
$report_item_type = db_get_value('type', 'treport_content', 'id_rc',
|
||||||
|
$idItem);
|
||||||
?>
|
?>
|
||||||
<table class="databox" id="sla_list" border="0" cellpadding="4" cellspacing="4" width="100%">
|
<table class="databox" id="sla_list" border="0" cellpadding="4" cellspacing="4" width="100%">
|
||||||
<thead>
|
<thead>
|
||||||
@ -1325,6 +1342,7 @@ function print_SLA_list($width, $action, $idItem = null) {
|
|||||||
function print_General_list($width, $action, $idItem = null) {
|
function print_General_list($width, $action, $idItem = null) {
|
||||||
global $config;
|
global $config;
|
||||||
global $meta;
|
global $meta;
|
||||||
|
|
||||||
if (!isset($meta))
|
if (!isset($meta))
|
||||||
$meta = false;
|
$meta = false;
|
||||||
|
|
||||||
@ -1359,10 +1377,13 @@ function print_General_list($width, $action, $idItem = null) {
|
|||||||
case 'update':
|
case 'update':
|
||||||
case 'edit':
|
case 'edit':
|
||||||
echo '<tbody id="list_general">';
|
echo '<tbody id="list_general">';
|
||||||
$itemsGeneral = db_get_all_rows_filter('treport_content_item', array('id_report_content' => $idItem));
|
$itemsGeneral = db_get_all_rows_filter(
|
||||||
|
'treport_content_item',
|
||||||
|
array('id_report_content' => $idItem));
|
||||||
if ($itemsGeneral === false) {
|
if ($itemsGeneral === false) {
|
||||||
$itemsGeneral = array();
|
$itemsGeneral = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($itemsGeneral as $item) {
|
foreach ($itemsGeneral as $item) {
|
||||||
$server_name = $item ['server_name'];
|
$server_name = $item ['server_name'];
|
||||||
// Metaconsole db connection
|
// Metaconsole db connection
|
||||||
@ -1373,7 +1394,10 @@ function print_General_list($width, $action, $idItem = null) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$idAgent = db_get_value_filter('id_agente', 'tagente_modulo', array('id_agente_modulo' => $item['id_agent_module']));
|
$idAgent = db_get_value_filter(
|
||||||
|
'id_agente', 'tagente_modulo',
|
||||||
|
array('id_agente_modulo' => $item['id_agent_module']));
|
||||||
|
|
||||||
$nameAgent = agents_get_name ($idAgent);
|
$nameAgent = agents_get_name ($idAgent);
|
||||||
$nameModule = db_get_value_filter('nombre', 'tagente_modulo', array('id_agente_modulo' => $item['id_agent_module']));
|
$nameModule = db_get_value_filter('nombre', 'tagente_modulo', array('id_agente_modulo' => $item['id_agent_module']));
|
||||||
|
|
||||||
@ -1381,6 +1405,7 @@ function print_General_list($width, $action, $idItem = null) {
|
|||||||
if ($meta && $server_name != '')
|
if ($meta && $server_name != '')
|
||||||
$server_name_element .= ' (' . $server_name . ')';
|
$server_name_element .= ' (' . $server_name . ')';
|
||||||
|
|
||||||
|
|
||||||
echo '<tr id="general_' . $item['id'] . '" style="" class="datos">
|
echo '<tr id="general_' . $item['id'] . '" style="" class="datos">
|
||||||
<td>' . printSmallFont($nameAgent) . $server_name_element . '</td>
|
<td>' . printSmallFont($nameAgent) . $server_name_element . '</td>
|
||||||
<td>' . printSmallFont($nameModule) . '</td>
|
<td>' . printSmallFont($nameModule) . '</td>
|
||||||
@ -1389,6 +1414,8 @@ function print_General_list($width, $action, $idItem = null) {
|
|||||||
<a href="javascript: deleteGeneralRow(' . $item['id'] . ');">' . html_print_image("images/cross.png", true) . '</a>
|
<a href="javascript: deleteGeneralRow(' . $item['id'] . ');">' . html_print_image("images/cross.png", true) . '</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>';
|
</tr>';
|
||||||
|
|
||||||
|
|
||||||
if ($meta) {
|
if ($meta) {
|
||||||
//Restore db connection
|
//Restore db connection
|
||||||
metaconsole_restore_db();
|
metaconsole_restore_db();
|
||||||
@ -1427,8 +1454,19 @@ function print_General_list($width, $action, $idItem = null) {
|
|||||||
ui_print_agent_autocomplete_input($params);
|
ui_print_agent_autocomplete_input($params);
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td><select id="id_agent_module_general" name="id_agente_modulo_general" disabled="disabled" style="max-width: 180px"><option value="0"><?php echo __('Select an Agent first'); ?></option></select></td>
|
<td>
|
||||||
<td><?php html_print_select ($operation, 'id_operation_module_general', 0, false, '', '', false, false, true, 'width: 200px', false); ?></td>
|
<select id="id_agent_module_general" name="id_agente_modulo_general" disabled="disabled" style="max-width: 180px">
|
||||||
|
<option value="0"><?php echo __('Select an Agent first'); ?></option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
html_print_select($operation,
|
||||||
|
'id_operation_module_general', 0,
|
||||||
|
false, '', '', false, false, true,
|
||||||
|
'width: 200px', false);
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
<td style="text-align: center;"><a href="javascript: addGeneralRow();"><?php html_print_image("images/disk.png", false); ?></a></td>
|
<td style="text-align: center;"><a href="javascript: addGeneralRow();"><?php html_print_image("images/disk.png", false); ?></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -1460,7 +1498,8 @@ $(document).ready (function () {
|
|||||||
minuteText: '<?php echo __('Minute');?>',
|
minuteText: '<?php echo __('Minute');?>',
|
||||||
secondText: '<?php echo __('Second');?>',
|
secondText: '<?php echo __('Second');?>',
|
||||||
currentText: '<?php echo __('Now');?>',
|
currentText: '<?php echo __('Now');?>',
|
||||||
closeText: '<?php echo __('Close');?>'});
|
closeText: '<?php echo __('Close');?>'
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function create_custom_graph() {
|
function create_custom_graph() {
|
||||||
@ -1835,6 +1874,7 @@ function addGeneralRow() {
|
|||||||
nameModule = data;
|
nameModule = data;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//Truncate nameOperation
|
//Truncate nameOperation
|
||||||
var params = [];
|
var params = [];
|
||||||
params.push("truncate_text=1");
|
params.push("truncate_text=1");
|
||||||
@ -1850,6 +1890,7 @@ function addGeneralRow() {
|
|||||||
nameOperation = data;
|
nameOperation = data;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var params = [];
|
var params = [];
|
||||||
params.push("add_general=1");
|
params.push("add_general=1");
|
||||||
params.push("id=" + $("input[name=id_item]").val());
|
params.push("id=" + $("input[name=id_item]").val());
|
||||||
@ -1935,7 +1976,10 @@ function chooseType() {
|
|||||||
$("#row_module_multi").hide();
|
$("#row_module_multi").hide();
|
||||||
$("#row_event_filter").hide();
|
$("#row_event_filter").hide();
|
||||||
$("#row_event_graphs").hide();
|
$("#row_event_graphs").hide();
|
||||||
$("#row_event_graph_by_agent").show();
|
$("#row_event_graph_by_agent").hide();
|
||||||
|
$("#row_event_graph_by_user").hide();
|
||||||
|
$("#row_event_graph_by_criticity").hide();
|
||||||
|
$("#row_event_graph_by_validated").hide();
|
||||||
$("#row_netflow_filter").hide();
|
$("#row_netflow_filter").hide();
|
||||||
$("#row_max_values").hide();
|
$("#row_max_values").hide();
|
||||||
$("#row_resolution").hide();
|
$("#row_resolution").hide();
|
||||||
@ -1963,6 +2007,11 @@ function chooseType() {
|
|||||||
$("#row_show_in_two_columns").show();
|
$("#row_show_in_two_columns").show();
|
||||||
$("#row_event_filter").show();
|
$("#row_event_filter").show();
|
||||||
$("#row_event_graphs").show();
|
$("#row_event_graphs").show();
|
||||||
|
|
||||||
|
$("#row_event_graph_by_agent").show();
|
||||||
|
$("#row_event_graph_by_user").show();
|
||||||
|
$("#row_event_graph_by_criticity").show();
|
||||||
|
$("#row_event_graph_by_validated").show();
|
||||||
break;
|
break;
|
||||||
case 'simple_graph':
|
case 'simple_graph':
|
||||||
$("#row_only_avg").show();
|
$("#row_only_avg").show();
|
||||||
@ -2177,7 +2226,10 @@ function chooseType() {
|
|||||||
$("#row_show_in_two_columns").show();
|
$("#row_show_in_two_columns").show();
|
||||||
$("#row_event_filter").show();
|
$("#row_event_filter").show();
|
||||||
$("#row_event_graphs").show();
|
$("#row_event_graphs").show();
|
||||||
$("#row_event_graph_by_agent").hide();
|
|
||||||
|
$("#row_event_graph_by_user").show();
|
||||||
|
$("#row_event_graph_by_criticity").show();
|
||||||
|
$("#row_event_graph_by_validated").show();
|
||||||
|
|
||||||
$('#agent_autocomplete').hide();
|
$('#agent_autocomplete').hide();
|
||||||
$('#agent_autocomplete_events').show();
|
$('#agent_autocomplete_events').show();
|
||||||
@ -2189,6 +2241,11 @@ function chooseType() {
|
|||||||
$("#row_period").show();
|
$("#row_period").show();
|
||||||
$("#row_show_in_two_columns").show();
|
$("#row_show_in_two_columns").show();
|
||||||
|
|
||||||
|
$("#row_event_graph_by_agent").show();
|
||||||
|
$("#row_event_graph_by_user").show();
|
||||||
|
$("#row_event_graph_by_criticity").show();
|
||||||
|
$("#row_event_graph_by_validated").show();
|
||||||
|
|
||||||
$('#agent_autocomplete').hide();
|
$('#agent_autocomplete').hide();
|
||||||
$('#agent_autocomplete_events').show();
|
$('#agent_autocomplete_events').show();
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user