new report histogram

This commit is contained in:
daniel 2021-03-11 14:22:28 +00:00 committed by Daniel Rodriguez
parent 74fb084ba5
commit 54fc2e89d3
5 changed files with 46 additions and 5 deletions

View File

@ -343,6 +343,7 @@ switch ($action) {
$failover_type = $item['failover_type'];
break;
case 'histogram_data':
case 'module_histogram_graph':
$description = $item['description'];
$period = $item['period'];
@ -550,9 +551,18 @@ switch ($action) {
$show_summary_group = $style['show_summary_group'];
$filter_event_severity = json_decode($style['filter_event_severity'], true);
$filter_event_status = json_decode($style['filter_event_status'], true);
$filter_event_type = json_decode($style['filter_event_type'], true);
$filter_event_severity = json_decode(
$style['filter_event_severity'],
true
);
$filter_event_status = json_decode(
$style['filter_event_status'],
true
);
$filter_event_type = json_decode(
$style['filter_event_type'],
true
);
$event_graph_by_user_validator = $style['event_graph_by_user_validator'];
$event_graph_by_criticity = $style['event_graph_by_criticity'];
@ -561,7 +571,6 @@ switch ($action) {
$filter_search = $style['event_filter_search'];
$filter_exclude = $style['event_filter_exclude'];
break;
case 'event_report_group':
@ -799,6 +808,7 @@ switch ($action) {
case 'database_serialized':
case 'last_value':
case 'monitor_report':
case 'histogram_data':
case 'min_value':
case 'max_value':
case 'avg_value':
@ -4136,6 +4146,7 @@ $(document).ready (function () {
case 'max_value':
case 'min_value':
case 'monitor_report':
case 'histogram_data':
case 'database_serialized':
case 'last_value':
case 'sumatory':
@ -4189,6 +4200,7 @@ $(document).ready (function () {
case 'prediction_date':
case 'projection_graph':
case 'monitor_report':
case 'histogram_data':
case 'module_histogram_graph':
case 'avg_value':
case 'max_value':
@ -4274,6 +4286,7 @@ $(document).ready (function () {
case 'max_value':
case 'min_value':
case 'monitor_report':
case 'histogram_data':
case 'database_serialized':
case 'last_value':
case 'sumatory':
@ -4322,6 +4335,7 @@ $(document).ready (function () {
case 'prediction_date':
case 'projection_graph':
case 'monitor_report':
case 'histogram_data':
case 'module_histogram_graph':
case 'avg_value':
case 'max_value':
@ -5337,6 +5351,7 @@ function chooseType() {
$("#row_summary").show();
break;
case 'histogram_data':
case 'module_histogram_graph':
$("#row_description").show();
$("#row_period").show();

View File

@ -2061,6 +2061,7 @@ switch ($action) {
break;
case 'module_histogram_graph':
case 'histogram_data':
case 'agent_configuration':
case 'alert_report_agent':
case 'alert_report_module':
@ -2694,6 +2695,7 @@ switch ($action) {
break;
case 'module_histogram_graph':
case 'histogram_data':
case 'agent_configuration':
case 'alert_report_agent':
case 'alert_report_module':

View File

@ -842,6 +842,7 @@ function reporting_make_reporting_data(
);
break;
case 'histogram_data':
case 'module_histogram_graph':
$report['contents'][] = reporting_module_histogram_graph(
$report,
@ -13624,7 +13625,7 @@ function reporting_module_histogram_graph($report, $content, $pdf=0)
$urlImage = ui_get_full_url(false, true, false, false);
$return['type'] = 'module_histogram_graph';
$return['type'] = $content['type'];
$ttl = 1;
if ($pdf) {

View File

@ -43,6 +43,21 @@ require_once $config['homedir'].'/include/functions_ui.php';
require_once $config['homedir'].'/include/functions_netflow.php';
/**
* Header function.
*
* @param object $table Table.
* @param boolean $mini Mini.
* @param string $title Title.
* @param string $subtitle Subtitle.
* @param integer $period Period.
* @param string $date Date.
* @param string $from From.
* @param string $to To.
* @param string $label Label.
*
* @return void
*/
function reporting_html_header(
&$table,
$mini,
@ -411,6 +426,10 @@ function reporting_html_print_report($report, $mini=false, $report_info=1)
$mini
);
break;
case 'histogram_data':
reporting_enterprise_html_histogram_data($table, $item, $mini);
break;
}
if ($item['type'] == 'agent_module') {

View File

@ -754,6 +754,10 @@ function reports_get_report_types($template=false, $not_editor=false)
'optgroup' => __('Modules'),
'name' => __('Last value'),
];
$types['histogram_data'] = [
'optgroup' => __('Modules'),
'name' => __('Histogram'),
];
$types['general'] = [
'optgroup' => __('Grouped'),