mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
Merge branch 'ent-10075-14724-reporte-en-pdf-no-muestra-de-sla-compliance-y-status' into 'develop'
Ent 10075 14724 reporte en pdf no muestra de sla compliance y status See merge request artica/pandorafms!5364
This commit is contained in:
commit
ca7c745a82
@ -652,18 +652,18 @@ function reporting_html_SLA($table, $item, $mini, $pdf=0)
|
|||||||
$row[] = round($sla['sla_limit'], 2).'%';
|
$row[] = round($sla['sla_limit'], 2).'%';
|
||||||
|
|
||||||
if (reporting_sla_is_not_init_from_array($sla)) {
|
if (reporting_sla_is_not_init_from_array($sla)) {
|
||||||
$row[] = '<span style="font-weight: bold; font-size: '.$font_size.' !important; color: '.COL_NOTINIT.';">'.__('N/A').'</span>';
|
$row[] = '<span style="font-weight: bold; font-size: '.$font_size.(($pdf === 0) ? ' !important' : '').'; color: '.COL_NOTINIT.';">'.__('N/A').'</span>';
|
||||||
$row[] = '<span style="font-weight: bold; font-size: '.$font_size.' !important; color: '.COL_NOTINIT.';">'.__('Not init').'</span>';
|
$row[] = '<span style="font-weight: bold; font-size: '.$font_size.(($pdf === 0) ? ' !important' : '').'; color: '.COL_NOTINIT.';">'.__('Not init').'</span>';
|
||||||
} else if (reporting_sla_is_ignored_from_array($sla)) {
|
} else if (reporting_sla_is_ignored_from_array($sla)) {
|
||||||
$row[] = '<span style="font-weight: bold; font-size: '.$font_size.' !important; color: '.COL_IGNORED.';">'.__('N/A').'</span>';
|
$row[] = '<span style="font-weight: bold; font-size: '.$font_size.(($pdf === 0) ? ' !important' : '').'; color: '.COL_IGNORED.';">'.__('N/A').'</span>';
|
||||||
$row[] = '<span style="font-weight: bold; font-size: '.$font_size.' !important; color: '.COL_IGNORED.';">'.__('No data').'</span>';
|
$row[] = '<span style="font-weight: bold; font-size: '.$font_size.(($pdf === 0) ? ' !important' : '').'; color: '.COL_IGNORED.';">'.__('No data').'</span>';
|
||||||
// Normal calculation.
|
// Normal calculation.
|
||||||
} else if ($sla['sla_status']) {
|
} else if ($sla['sla_status']) {
|
||||||
$row[] = '<span style="font-weight: bold; font-size: '.$font_size.' !important; color: '.COL_NORMAL.';">'.sla_truncate($sla['sla_value'], $config['graph_precision']).'%</span>';
|
$row[] = '<span style="font-weight: bold; font-size: '.$font_size.(($pdf === 0) ? ' !important' : '').'; color: '.COL_NORMAL.';">'.sla_truncate($sla['sla_value'], $config['graph_precision']).'%</span>';
|
||||||
$row[] = '<span style="font-weight: bold; font-size: '.$font_size.' !important; color: '.COL_NORMAL.';">'.__('OK').'</span>';
|
$row[] = '<span style="font-weight: bold; font-size: '.$font_size.(($pdf === 0) ? ' !important' : '').'; color: '.COL_NORMAL.';">'.__('OK').'</span>';
|
||||||
} else {
|
} else {
|
||||||
$row[] = '<span style="font-weight: bold; font-size: '.$font_size.' !important; color: '.COL_CRITICAL.';">'.sla_truncate($sla['sla_value'], $config['graph_precision']).'%</span>';
|
$row[] = '<span style="font-weight: bold; font-size: '.$font_size.(($pdf === 0) ? ' !important' : '').'; color: '.COL_CRITICAL.';">'.sla_truncate($sla['sla_value'], $config['graph_precision']).'%</span>';
|
||||||
$row[] = '<span style="font-weight: bold; font-size: '.$font_size.' !important; color: '.COL_CRITICAL.';">'.__('Fail').'</span>';
|
$row[] = '<span style="font-weight: bold; font-size: '.$font_size.(($pdf === 0) ? ' !important' : '').'; color: '.COL_CRITICAL.';">'.__('Fail').'</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Second table for time globals.
|
// Second table for time globals.
|
||||||
@ -3463,10 +3463,10 @@ function reporting_html_monitor_report($table, $item, $mini, $pdf=0)
|
|||||||
$table1->head = [];
|
$table1->head = [];
|
||||||
$table1->data = [];
|
$table1->data = [];
|
||||||
if ($item['data']['unknown'] == 1) {
|
if ($item['data']['unknown'] == 1) {
|
||||||
$table1->data['data']['unknown'] = '<p class="bolder" style="font-size: '.$font_size.' !important; color: '.COL_UNKNOWN.';">';
|
$table1->data['data']['unknown'] = '<p class="bolder" style="font-size: '.$font_size.(($pdf === 0) ? ' !important' : '').'; color: '.COL_UNKNOWN.';">';
|
||||||
$table1->data['data']['unknown'] .= __('Unknown').'</p>';
|
$table1->data['data']['unknown'] .= __('Unknown').'</p>';
|
||||||
} else {
|
} else {
|
||||||
$table1->data['data']['ok'] = '<p class="bolder" style="font-size: '.$font_size.' !important; color: '.COL_NORMAL.';">';
|
$table1->data['data']['ok'] = '<p class="bolder" style="font-size: '.$font_size.(($pdf === 0) ? ' !important' : '').'; color: '.COL_NORMAL.';">';
|
||||||
$table1->data['data']['ok'] .= html_print_image(
|
$table1->data['data']['ok'] .= html_print_image(
|
||||||
'images/module_ok.png',
|
'images/module_ok.png',
|
||||||
true
|
true
|
||||||
@ -3479,7 +3479,7 @@ function reporting_html_monitor_report($table, $item, $mini, $pdf=0)
|
|||||||
)
|
)
|
||||||
).' %</p>';
|
).' %</p>';
|
||||||
|
|
||||||
$table1->data['data']['fail'] = '<p class="bolder" style="font-size: '.$font_size.' !important; color: '.COL_CRITICAL.';">';
|
$table1->data['data']['fail'] = '<p class="bolder" style="font-size: '.$font_size.(($pdf === 0) ? ' !important' : '').'; color: '.COL_CRITICAL.';">';
|
||||||
$table1->data['data']['fail'] .= html_print_image(
|
$table1->data['data']['fail'] .= html_print_image(
|
||||||
'images/module_critical.png',
|
'images/module_critical.png',
|
||||||
true
|
true
|
||||||
@ -4683,7 +4683,7 @@ function reporting_html_availability_graph($table, $item, $pdf=0)
|
|||||||
$checks_resume_text = '<span style = "font-size: '.$font_mini.';">';
|
$checks_resume_text = '<span style = "font-size: '.$font_mini.';">';
|
||||||
$checks_resume_text .= $checks_resume;
|
$checks_resume_text .= $checks_resume;
|
||||||
$checks_resume_text .= '</span>';
|
$checks_resume_text .= '</span>';
|
||||||
$sla_value_text = "<span style = 'font-weight: bold; font-size: ".$font_size.' !important; color: '.$color."'>".$sla_value.'</span>';
|
$sla_value_text = "<span style = 'font-weight: bold; font-size: ".$font_size.(($pdf === 0) ? ' !important' : '').'; color: '.$color."'>".$sla_value.'</span>';
|
||||||
switch ($item['data'][$k_chart]['failover']) {
|
switch ($item['data'][$k_chart]['failover']) {
|
||||||
case 'primary_compare':
|
case 'primary_compare':
|
||||||
$title = '<b>'.__('Primary').' (24x7)</b>';
|
$title = '<b>'.__('Primary').' (24x7)</b>';
|
||||||
@ -4711,7 +4711,7 @@ function reporting_html_availability_graph($table, $item, $pdf=0)
|
|||||||
|
|
||||||
case 'result_compare':
|
case 'result_compare':
|
||||||
$title = '<b>'.__('Result').' (24x7)</b>';
|
$title = '<b>'.__('Result').' (24x7)</b>';
|
||||||
$sla_value_text = "<span style = 'font-weight: bold; font-size: ".$font_size.' !important; color: '.$color."'>".$sla_value.'</span>';
|
$sla_value_text = "<span style = 'font-weight: bold; font-size: ".$font_size.(($pdf === 0) ? ' !important' : '').'; color: '.$color."'>".$sla_value.'</span>';
|
||||||
$checks_resume_text = '<span style = "font-size: '.$font_mini.';">';
|
$checks_resume_text = '<span style = "font-size: '.$font_mini.';">';
|
||||||
$checks_resume_text .= $checks_resume;
|
$checks_resume_text .= $checks_resume;
|
||||||
$checks_resume_text .= '</span>';
|
$checks_resume_text .= '</span>';
|
||||||
@ -4722,7 +4722,7 @@ function reporting_html_availability_graph($table, $item, $pdf=0)
|
|||||||
$total_values += $sla_value;
|
$total_values += $sla_value;
|
||||||
$count_total_charts++;
|
$count_total_charts++;
|
||||||
$title = '<b>'.__('Result').'</b>';
|
$title = '<b>'.__('Result').'</b>';
|
||||||
$sla_value_text = "<span style = 'font-weight: bold; font-size: ".$font_size.' !important; color: '.$color."'>".$sla_value.'</span>';
|
$sla_value_text = "<span style = 'font-weight: bold; font-size: ".$font_size.(($pdf === 0) ? ' !important' : '').'; color: '.$color."'>".$sla_value.'</span>';
|
||||||
$checks_resume_text = '<span style = "font-size: '.$font_mini.';">';
|
$checks_resume_text = '<span style = "font-size: '.$font_mini.';">';
|
||||||
$checks_resume_text .= $checks_resume;
|
$checks_resume_text .= $checks_resume;
|
||||||
$checks_resume_text .= '</span>';
|
$checks_resume_text .= '</span>';
|
||||||
@ -4756,7 +4756,7 @@ function reporting_html_availability_graph($table, $item, $pdf=0)
|
|||||||
|
|
||||||
$table_summary->data = [];
|
$table_summary->data = [];
|
||||||
$table_summary->data[0][0] = '<b>'.__('Summary').'</b>';
|
$table_summary->data[0][0] = '<b>'.__('Summary').'</b>';
|
||||||
$table_summary->data[0][1] = '<span style = "font-weight: bold; font-size: '.$font_size.' !important;">';
|
$table_summary->data[0][1] = '<span style = "font-weight: bold; font-size: '.$font_size.(($pdf === 0) ? ' !important' : '').';">';
|
||||||
$table_summary->data[0][1] .= sla_truncate($total_values / $count_total_charts);
|
$table_summary->data[0][1] .= sla_truncate($total_values / $count_total_charts);
|
||||||
$table_summary->data[0][1] .= ' %';
|
$table_summary->data[0][1] .= ' %';
|
||||||
$table_summary->data[0][1] .= '</span>';
|
$table_summary->data[0][1] .= '</span>';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user