mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 00:34:46 +02:00
#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'];
|
$recursion = $item['recursion'];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'evolution':
|
||||||
|
$group = $item['id_group'];
|
||||||
|
$recursion = $item['recursion'];
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// It's not possible.
|
// It's not possible.
|
||||||
break;
|
break;
|
||||||
@ -7547,6 +7552,10 @@ function chooseType() {
|
|||||||
case 'scoring':
|
case 'scoring':
|
||||||
$("#row_group").show();
|
$("#row_group").show();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'evolution':
|
||||||
|
$("#row_group").show();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
@ -2027,6 +2027,11 @@ switch ($action) {
|
|||||||
$good_format = true;
|
$good_format = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'evolution':
|
||||||
|
$values['id_group'] = get_parameter('combo_group');
|
||||||
|
$good_format = true;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$values['period'] = get_parameter('period');
|
$values['period'] = get_parameter('period');
|
||||||
$values['top_n'] = get_parameter(
|
$values['top_n'] = get_parameter(
|
||||||
@ -2940,6 +2945,11 @@ switch ($action) {
|
|||||||
$good_format = true;
|
$good_format = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'evolution':
|
||||||
|
$values['id_group'] = get_parameter('combo_group');
|
||||||
|
$good_format = true;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$values['period'] = get_parameter('period');
|
$values['period'] = get_parameter('period');
|
||||||
$values['top_n'] = get_parameter(
|
$values['top_n'] = get_parameter(
|
||||||
|
@ -977,6 +977,13 @@ function reporting_make_reporting_data(
|
|||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'evolution':
|
||||||
|
$report['contents'][] = reporting_evolution_hardening(
|
||||||
|
$report,
|
||||||
|
$content
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// Default.
|
// Default.
|
||||||
break;
|
break;
|
||||||
|
@ -487,6 +487,10 @@ function reporting_html_print_report($report, $mini=false, $report_info=1)
|
|||||||
case 'scoring':
|
case 'scoring':
|
||||||
reporting_html_scoring($table, $item);
|
reporting_html_scoring($table, $item);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'evolution':
|
||||||
|
reporting_evolution_graph($table, $item);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($item['type'] == 'agent_module') {
|
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.
|
* Function to print the agents scoring.
|
||||||
*
|
*
|
||||||
|
@ -991,7 +991,12 @@ function reports_get_report_types($template=false, $not_editor=false)
|
|||||||
|
|
||||||
$types['scoring'] = [
|
$types['scoring'] = [
|
||||||
'optgroup' => __('Security hardening'),
|
'optgroup' => __('Security hardening'),
|
||||||
'name' => __('Scoring'),
|
'name' => __('Scoring by date'),
|
||||||
|
];
|
||||||
|
|
||||||
|
$types['evolution'] = [
|
||||||
|
'optgroup' => __('Security hardening'),
|
||||||
|
'name' => __('Evolution'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user