13675-Hide items in Templates reports

This commit is contained in:
Pablo Aragon 2024-05-03 09:18:32 +02:00
parent 70fe2c8e8a
commit ca05b6d81f
2 changed files with 66 additions and 70 deletions

View File

@ -965,88 +965,88 @@ function reports_get_report_types($template=false, $not_editor=false)
'optgroup' => __('Permissions report'), 'optgroup' => __('Permissions report'),
'name' => __('Permissions report'), 'name' => __('Permissions report'),
]; ];
}
$types['ncm_backups'] = [ $types['ncm_backups'] = [
'optgroup' => __('NCM'), 'optgroup' => __('NCM'),
'name' => __('NCM configuration changes'), 'name' => __('NCM configuration changes'),
];
$types['ncm'] = [
'optgroup' => __('NCM'),
'name' => __('NCM devices list'),
];
if (enterprise_installed() === true) {
$types['top_n_agents_sh'] = [
'optgroup' => __('Security hardening'),
'name' => __('Top-N agents with the worst score'),
]; ];
$types['top_n_checks_failed'] = [ $types['ncm'] = [
'optgroup' => __('Security hardening'), 'optgroup' => __('NCM'),
'name' => __('Top-N most frequent failed checks'), 'name' => __('NCM devices list'),
]; ];
$types['top_n_categories_checks'] = [ if (enterprise_installed() === true) {
'optgroup' => __('Security hardening'), $types['top_n_agents_sh'] = [
'name' => __('Top-N checks failed by category'), 'optgroup' => __('Security hardening'),
]; 'name' => __('Top-N agents with the worst score'),
];
$types['vul_by_cat'] = [ $types['top_n_checks_failed'] = [
'optgroup' => __('Security hardening'), 'optgroup' => __('Security hardening'),
'name' => __('Vulnerabilities by category'), 'name' => __('Top-N most frequent failed checks'),
]; ];
$types['list_checks'] = [ $types['top_n_categories_checks'] = [
'optgroup' => __('Security hardening'), 'optgroup' => __('Security hardening'),
'name' => __('List of checks'), 'name' => __('Top-N checks failed by category'),
]; ];
$types['scoring'] = [ $types['vul_by_cat'] = [
'optgroup' => __('Security hardening'), 'optgroup' => __('Security hardening'),
'name' => __('Scoring by date'), 'name' => __('Vulnerabilities by category'),
]; ];
$types['evolution'] = [ $types['list_checks'] = [
'optgroup' => __('Security hardening'), 'optgroup' => __('Security hardening'),
'name' => __('Evolution'), 'name' => __('List of checks'),
]; ];
$types['vuls_severity_graph'] = [ $types['scoring'] = [
'optgroup' => __('Vulnerabilities'), 'optgroup' => __('Security hardening'),
'name' => __('Severity graph bar'), 'name' => __('Scoring by date'),
]; ];
$types['vuls_attack_complexity'] = [ $types['evolution'] = [
'optgroup' => __('Vulnerabilities'), 'optgroup' => __('Security hardening'),
'name' => __('Attack complexity doughnut chart'), 'name' => __('Evolution'),
]; ];
$types['vuls_by_packages'] = [ $types['vuls_severity_graph'] = [
'optgroup' => __('Vulnerabilities'), 'optgroup' => __('Vulnerabilities'),
'name' => __('By packages in pie chart'), 'name' => __('Severity graph bar'),
]; ];
$types['vuls_by_agent'] = [ $types['vuls_attack_complexity'] = [
'optgroup' => __('Vulnerabilities'), 'optgroup' => __('Vulnerabilities'),
'name' => __('Detailed security report'), 'name' => __('Attack complexity doughnut chart'),
]; ];
$types['vuls_info_agent'] = [ $types['vuls_by_packages'] = [
'optgroup' => __('Vulnerabilities'), 'optgroup' => __('Vulnerabilities'),
'name' => __('Vulnerabilities of agent'), 'name' => __('By packages in pie chart'),
]; ];
$types['top_n_agents_vuls'] = [ $types['vuls_by_agent'] = [
'optgroup' => __('Vulnerabilities'), 'optgroup' => __('Vulnerabilities'),
'name' => __('Top-N agents with more risk'), 'name' => __('Detailed security report'),
]; ];
$types['top_n_vuls_count'] = [ $types['vuls_info_agent'] = [
'optgroup' => __('Vulnerabilities'), 'optgroup' => __('Vulnerabilities'),
'name' => __('Top-N common vulnerabilities'), 'name' => __('Vulnerabilities of agent'),
]; ];
$types['top_n_agents_vuls'] = [
'optgroup' => __('Vulnerabilities'),
'name' => __('Top-N agents with more risk'),
];
$types['top_n_vuls_count'] = [
'optgroup' => __('Vulnerabilities'),
'name' => __('Top-N common vulnerabilities'),
];
}
} }
return $types; return $types;

View File

@ -170,10 +170,6 @@ class JavaScript extends Renderer
if (chart.config.options.title !== undefined ) { if (chart.config.options.title !== undefined ) {
chart.config.options.title.fontColor = "#ffffff"; chart.config.options.title.fontColor = "#ffffff";
} }
if (chart.config.options.plugins.legend.labels.font !== undefined ) {
chart.config.options.plugins.legend.labels.font.color = "#ffffff";
}
'; ';
} }
} }