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_monthly':
|
||||
case 'SLA_hourly':
|
||||
case 'availability_graph';
|
||||
case 'availability_graph':
|
||||
$description = $item['description'];
|
||||
$only_display_wrong = $item['only_display_wrong'];
|
||||
$monday = $item['monday'];
|
||||
|
@ -257,6 +257,13 @@ switch ($action) {
|
|||
$period = $item['period'];
|
||||
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':
|
||||
$description = $item['description'];
|
||||
$period = $item['period'];
|
||||
|
@ -1988,7 +1995,6 @@ $(document).ready (function () {
|
|||
|
||||
});
|
||||
|
||||
|
||||
$("#submit-create_item").click(function () {
|
||||
var type = $('#type').val();
|
||||
switch (type){
|
||||
|
@ -1998,7 +2004,7 @@ $(document).ready (function () {
|
|||
case 'MTBF': case 'MTTR': case 'prediction_date': case 'projection_graph':
|
||||
case 'avg_value': case 'max_value': case 'min_value': case 'monitor_report':
|
||||
case 'database_serialized': case 'sumatory': case 'historical_data':
|
||||
case 'agent_configuration':
|
||||
case 'agent_configuration': case 'module_histogram_graph':
|
||||
if ($("#hidden-id_agent").val() == 0) {
|
||||
alert( <?php echo "'" . __('Please select Agent'). "'"; ?> );
|
||||
return false;
|
||||
|
@ -2018,7 +2024,7 @@ $(document).ready (function () {
|
|||
case 'MTBF': case 'MTTR': case 'prediction_date': case 'projection_graph':
|
||||
case 'avg_value': case 'max_value': case 'min_value': case 'monitor_report':
|
||||
case 'database_serialized': case 'sumatory': case 'historical_data':
|
||||
case 'agent_configuration':
|
||||
case 'agent_configuration': case 'module_histogram_graph':
|
||||
if ($("#hidden-id_agent").val() == 0) {
|
||||
alert( <?php echo "'" . __('Please select Agent'). "'"; ?> );
|
||||
return false;
|
||||
|
|
|
@ -1162,6 +1162,7 @@ switch ($action) {
|
|||
else
|
||||
$style['label'] = '';
|
||||
break;
|
||||
case 'module_histogram_graph':
|
||||
case 'agent_configuration':
|
||||
case 'alert_report_agent':
|
||||
case 'alert_report_module':
|
||||
|
@ -1489,6 +1490,7 @@ switch ($action) {
|
|||
else
|
||||
$style['label'] = '';
|
||||
break;
|
||||
case 'module_histogram_graph':
|
||||
case 'agent_configuration':
|
||||
case 'alert_report_agent':
|
||||
case 'alert_report_module':
|
||||
|
|
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_height_chart);
|
||||
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;";
|
||||
$data_array_2 = db_get_all_rows_sql($sql);
|
||||
|
||||
foreach ($data_array_2 as $key => $value) {
|
||||
if($value['monitor_agent_critical'] != 0){
|
||||
$data['agent_critical'] ++;
|
||||
if (is_array($data_array_2) || is_object($data_array_2)){
|
||||
foreach ($data_array_2 as $key => $value) {
|
||||
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.
|
||||
|
@ -10324,6 +10332,7 @@ function reporting_label_macro ($item, $label) {
|
|||
}
|
||||
break;
|
||||
case 'simple_graph':
|
||||
case 'module_histogram_graph':
|
||||
case 'custom_graph':
|
||||
case 'simple_baseline_graph':
|
||||
case 'event_report_module':
|
||||
|
|
|
@ -318,6 +318,9 @@ function reporting_html_print_report($report, $mini = false, $report_info = 1) {
|
|||
case 'SLA_services':
|
||||
reporting_enterprise_html_SLA_services($table, $item, $mini);
|
||||
break;
|
||||
case 'module_histogram_graph':
|
||||
reporting_enterprise_html_module_histogram_graph($table, $item, $mini);
|
||||
break;
|
||||
}
|
||||
|
||||
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'),
|
||||
'name' => __('Availability graph'));
|
||||
|
||||
|
||||
$types['module_histogram_graph'] = array('optgroup' => __('Graphs'),
|
||||
'name' => __('Module Histogram graph'));
|
||||
|
||||
$types['TTRT'] = array('optgroup' => __('ITIL'),
|
||||
'name' => __('TTRT'));
|
||||
|
|
Loading…
Reference in New Issue