mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Merge branch '145-nuevo-item-de-informes-y-dashboard-module-histogram-histograma-de-modulo' into 'develop'
add new report graph module histogram See merge request !140
This commit is contained in:
commit
c9b4b3be5c
@ -239,7 +239,7 @@ switch ($action) {
|
|||||||
case 'SLA_weekly':
|
case 'SLA_weekly':
|
||||||
case 'SLA_monthly':
|
case 'SLA_monthly':
|
||||||
case 'SLA_hourly':
|
case 'SLA_hourly':
|
||||||
case 'availability_graph';
|
case 'availability_graph':
|
||||||
$description = $item['description'];
|
$description = $item['description'];
|
||||||
$only_display_wrong = $item['only_display_wrong'];
|
$only_display_wrong = $item['only_display_wrong'];
|
||||||
$monday = $item['monday'];
|
$monday = $item['monday'];
|
||||||
@ -257,6 +257,13 @@ switch ($action) {
|
|||||||
$period = $item['period'];
|
$period = $item['period'];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'module_histogram_graph':
|
||||||
|
$description = $item['description'];
|
||||||
|
$period = $item['period'];
|
||||||
|
$idAgentModule = $item['id_agent_module'];
|
||||||
|
$idAgent = db_get_value_filter('id_agente', 'tagente_modulo', array('id_agente_modulo' => $idAgentModule));
|
||||||
|
break;
|
||||||
|
|
||||||
case 'SLA_services':
|
case 'SLA_services':
|
||||||
$description = $item['description'];
|
$description = $item['description'];
|
||||||
$period = $item['period'];
|
$period = $item['period'];
|
||||||
@ -1988,7 +1995,6 @@ $(document).ready (function () {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$("#submit-create_item").click(function () {
|
$("#submit-create_item").click(function () {
|
||||||
var type = $('#type').val();
|
var type = $('#type').val();
|
||||||
switch (type){
|
switch (type){
|
||||||
@ -1998,7 +2004,7 @@ $(document).ready (function () {
|
|||||||
case 'MTBF': case 'MTTR': case 'prediction_date': case 'projection_graph':
|
case 'MTBF': case 'MTTR': case 'prediction_date': case 'projection_graph':
|
||||||
case 'avg_value': case 'max_value': case 'min_value': case 'monitor_report':
|
case 'avg_value': case 'max_value': case 'min_value': case 'monitor_report':
|
||||||
case 'database_serialized': case 'sumatory': case 'historical_data':
|
case 'database_serialized': case 'sumatory': case 'historical_data':
|
||||||
case 'agent_configuration':
|
case 'agent_configuration': case 'module_histogram_graph':
|
||||||
if ($("#hidden-id_agent").val() == 0) {
|
if ($("#hidden-id_agent").val() == 0) {
|
||||||
alert( <?php echo "'" . __('Please select Agent'). "'"; ?> );
|
alert( <?php echo "'" . __('Please select Agent'). "'"; ?> );
|
||||||
return false;
|
return false;
|
||||||
@ -2018,7 +2024,7 @@ $(document).ready (function () {
|
|||||||
case 'MTBF': case 'MTTR': case 'prediction_date': case 'projection_graph':
|
case 'MTBF': case 'MTTR': case 'prediction_date': case 'projection_graph':
|
||||||
case 'avg_value': case 'max_value': case 'min_value': case 'monitor_report':
|
case 'avg_value': case 'max_value': case 'min_value': case 'monitor_report':
|
||||||
case 'database_serialized': case 'sumatory': case 'historical_data':
|
case 'database_serialized': case 'sumatory': case 'historical_data':
|
||||||
case 'agent_configuration':
|
case 'agent_configuration': case 'module_histogram_graph':
|
||||||
if ($("#hidden-id_agent").val() == 0) {
|
if ($("#hidden-id_agent").val() == 0) {
|
||||||
alert( <?php echo "'" . __('Please select Agent'). "'"; ?> );
|
alert( <?php echo "'" . __('Please select Agent'). "'"; ?> );
|
||||||
return false;
|
return false;
|
||||||
|
@ -1162,6 +1162,7 @@ switch ($action) {
|
|||||||
else
|
else
|
||||||
$style['label'] = '';
|
$style['label'] = '';
|
||||||
break;
|
break;
|
||||||
|
case 'module_histogram_graph':
|
||||||
case 'agent_configuration':
|
case 'agent_configuration':
|
||||||
case 'alert_report_agent':
|
case 'alert_report_agent':
|
||||||
case 'alert_report_module':
|
case 'alert_report_module':
|
||||||
@ -1489,6 +1490,7 @@ switch ($action) {
|
|||||||
else
|
else
|
||||||
$style['label'] = '';
|
$style['label'] = '';
|
||||||
break;
|
break;
|
||||||
|
case 'module_histogram_graph':
|
||||||
case 'agent_configuration':
|
case 'agent_configuration':
|
||||||
case 'alert_report_agent':
|
case 'alert_report_agent':
|
||||||
case 'alert_report_module':
|
case 'alert_report_module':
|
||||||
|
BIN
pandora_console/images/square_yellow.png
Normal file
BIN
pandora_console/images/square_yellow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 167 B |
@ -500,6 +500,12 @@ function reporting_make_reporting_data($report = null, $id_report,
|
|||||||
$force_width_chart,
|
$force_width_chart,
|
||||||
$force_height_chart);
|
$force_height_chart);
|
||||||
break;
|
break;
|
||||||
|
case 'module_histogram_graph':
|
||||||
|
$report['contents'][] = reporting_enterprise_module_histogram_graph(
|
||||||
|
$report,
|
||||||
|
$content,
|
||||||
|
$pdf);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6799,27 +6805,29 @@ function reporting_get_group_stats_resume ($id_group = 0, $access = 'AR') {
|
|||||||
GROUP BY tae.id_agente;";
|
GROUP BY tae.id_agente;";
|
||||||
$data_array_2 = db_get_all_rows_sql($sql);
|
$data_array_2 = db_get_all_rows_sql($sql);
|
||||||
|
|
||||||
foreach ($data_array_2 as $key => $value) {
|
if (is_array($data_array_2) || is_object($data_array_2)){
|
||||||
if($value['monitor_agent_critical'] != 0){
|
foreach ($data_array_2 as $key => $value) {
|
||||||
$data['agent_critical'] ++;
|
if($value['monitor_agent_critical'] != 0){
|
||||||
|
$data['agent_critical'] ++;
|
||||||
|
}
|
||||||
|
elseif($value['monitor_agent_critical'] == 0 && $value['monitor_agent_warning'] != 0){
|
||||||
|
$data['agent_warning'] ++;
|
||||||
|
}
|
||||||
|
elseif($value['monitor_agent_critical'] == 0 && $value['monitor_agent_warning'] == 0 &&
|
||||||
|
$value['monitor_agent_unknown'] != 0){
|
||||||
|
$data['agent_unknown'] ++;
|
||||||
|
}
|
||||||
|
elseif($value['monitor_agent_critical'] == 0 && $value['monitor_agent_warning'] == 0 &&
|
||||||
|
$value['monitor_agent_unknown'] == 0 && $value['monitor_agent_ok'] != 0){
|
||||||
|
$data['agent_ok'] ++;
|
||||||
|
}
|
||||||
|
elseif($value['monitor_agent_critical'] == 0 && $value['monitor_agent_warning'] == 0 &&
|
||||||
|
$value['monitor_agent_unknown'] == 0 && $value['monitor_agent_ok'] == 0 &&
|
||||||
|
$value['monitor_agent_not_init'] != 0){
|
||||||
|
$data['agent_not_init'] ++;
|
||||||
|
}
|
||||||
|
$data['total_agents'] ++;
|
||||||
}
|
}
|
||||||
elseif($value['monitor_agent_critical'] == 0 && $value['monitor_agent_warning'] != 0){
|
|
||||||
$data['agent_warning'] ++;
|
|
||||||
}
|
|
||||||
elseif($value['monitor_agent_critical'] == 0 && $value['monitor_agent_warning'] == 0 &&
|
|
||||||
$value['monitor_agent_unknown'] != 0){
|
|
||||||
$data['agent_unknown'] ++;
|
|
||||||
}
|
|
||||||
elseif($value['monitor_agent_critical'] == 0 && $value['monitor_agent_warning'] == 0 &&
|
|
||||||
$value['monitor_agent_unknown'] == 0 && $value['monitor_agent_ok'] != 0){
|
|
||||||
$data['agent_ok'] ++;
|
|
||||||
}
|
|
||||||
elseif($value['monitor_agent_critical'] == 0 && $value['monitor_agent_warning'] == 0 &&
|
|
||||||
$value['monitor_agent_unknown'] == 0 && $value['monitor_agent_ok'] == 0 &&
|
|
||||||
$value['monitor_agent_not_init'] != 0){
|
|
||||||
$data['agent_not_init'] ++;
|
|
||||||
}
|
|
||||||
$data['total_agents'] ++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get total count of monitors for this group, except disabled.
|
// Get total count of monitors for this group, except disabled.
|
||||||
@ -10324,6 +10332,7 @@ function reporting_label_macro ($item, $label) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'simple_graph':
|
case 'simple_graph':
|
||||||
|
case 'module_histogram_graph':
|
||||||
case 'custom_graph':
|
case 'custom_graph':
|
||||||
case 'simple_baseline_graph':
|
case 'simple_baseline_graph':
|
||||||
case 'event_report_module':
|
case 'event_report_module':
|
||||||
|
@ -318,6 +318,9 @@ function reporting_html_print_report($report, $mini = false, $report_info = 1) {
|
|||||||
case 'SLA_services':
|
case 'SLA_services':
|
||||||
reporting_enterprise_html_SLA_services($table, $item, $mini);
|
reporting_enterprise_html_SLA_services($table, $item, $mini);
|
||||||
break;
|
break;
|
||||||
|
case 'module_histogram_graph':
|
||||||
|
reporting_enterprise_html_module_histogram_graph($table, $item, $mini);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($item['type'] == 'agent_module')
|
if ($item['type'] == 'agent_module')
|
||||||
|
@ -522,7 +522,8 @@ function reports_get_report_types ($template = false, $not_editor = false) {
|
|||||||
$types['availability_graph'] = array('optgroup' => __('Graphs'),
|
$types['availability_graph'] = array('optgroup' => __('Graphs'),
|
||||||
'name' => __('Availability graph'));
|
'name' => __('Availability graph'));
|
||||||
|
|
||||||
|
$types['module_histogram_graph'] = array('optgroup' => __('Graphs'),
|
||||||
|
'name' => __('Module Histogram graph'));
|
||||||
|
|
||||||
$types['TTRT'] = array('optgroup' => __('ITIL'),
|
$types['TTRT'] = array('optgroup' => __('ITIL'),
|
||||||
'name' => __('TTRT'));
|
'name' => __('TTRT'));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user