#11807 fixed bugs and added new report evolution hardening
This commit is contained in:
parent
ae288e3dd4
commit
aa39c4295e
|
@ -1063,6 +1063,11 @@ switch ($action) {
|
|||
$recursion = $item['recursion'];
|
||||
break;
|
||||
|
||||
case 'evolution':
|
||||
$group = $item['id_group'];
|
||||
$recursion = $item['recursion'];
|
||||
break;
|
||||
|
||||
default:
|
||||
// It's not possible.
|
||||
break;
|
||||
|
@ -7547,6 +7552,10 @@ function chooseType() {
|
|||
case 'scoring':
|
||||
$("#row_group").show();
|
||||
break;
|
||||
|
||||
case 'evolution':
|
||||
$("#row_group").show();
|
||||
break;
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
|
|
|
@ -2027,6 +2027,11 @@ switch ($action) {
|
|||
$good_format = true;
|
||||
break;
|
||||
|
||||
case 'evolution':
|
||||
$values['id_group'] = get_parameter('combo_group');
|
||||
$good_format = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
$values['period'] = get_parameter('period');
|
||||
$values['top_n'] = get_parameter(
|
||||
|
@ -2940,6 +2945,11 @@ switch ($action) {
|
|||
$good_format = true;
|
||||
break;
|
||||
|
||||
case 'evolution':
|
||||
$values['id_group'] = get_parameter('combo_group');
|
||||
$good_format = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
$values['period'] = get_parameter('period');
|
||||
$values['top_n'] = get_parameter(
|
||||
|
|
|
@ -977,6 +977,13 @@ function reporting_make_reporting_data(
|
|||
);
|
||||
break;
|
||||
|
||||
case 'evolution':
|
||||
$report['contents'][] = reporting_evolution_hardening(
|
||||
$report,
|
||||
$content
|
||||
);
|
||||
break;
|
||||
|
||||
default:
|
||||
// Default.
|
||||
break;
|
||||
|
|
|
@ -487,6 +487,10 @@ function reporting_html_print_report($report, $mini=false, $report_info=1)
|
|||
case 'scoring':
|
||||
reporting_html_scoring($table, $item);
|
||||
break;
|
||||
|
||||
case 'evolution':
|
||||
reporting_evolution_graph($table, $item);
|
||||
break;
|
||||
}
|
||||
|
||||
if ($item['type'] == 'agent_module') {
|
||||
|
@ -502,6 +506,23 @@ function reporting_html_print_report($report, $mini=false, $report_info=1)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function to print the security hardening evolution.
|
||||
*
|
||||
* @param object $table Head table or false if it comes from pdf.
|
||||
* @param array $item Items data.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function reporting_evolution_graph($table, $item)
|
||||
{
|
||||
$table->rowclass[0] = '';
|
||||
$table->colspan['chart']['cell'] = 3;
|
||||
$table->cellstyle['chart']['cell'] = 'text-align: center;';
|
||||
$table->data['chart']['cell'] = $item['chart'];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function to print the agents scoring.
|
||||
*
|
||||
|
|
|
@ -991,7 +991,12 @@ function reports_get_report_types($template=false, $not_editor=false)
|
|||
|
||||
$types['scoring'] = [
|
||||
'optgroup' => __('Security hardening'),
|
||||
'name' => __('Scoring'),
|
||||
'name' => __('Scoring by date'),
|
||||
];
|
||||
|
||||
$types['evolution'] = [
|
||||
'optgroup' => __('Security hardening'),
|
||||
'name' => __('Evolution'),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue