Fixed the monthly SLA for dashboards. TICKET: #2087

This commit is contained in:
mdtrooper 2015-06-08 16:51:54 +02:00
parent c658e83ec6
commit 62fedd78c8
4 changed files with 10 additions and 7 deletions

View File

@ -553,7 +553,7 @@ html_print_input_hidden('id_item', $idItem);
html_print_select(reports_get_report_types(false, true), 'type', $type, 'chooseType();', '', '');
}
else {
$report_type = reports_get_report_types($type);
$report_type = reports_get_report_types(false, true);
if (!empty($report_type) and isset($report_type[$type]['name']))
echo $report_type[$type]['name'];
else

View File

@ -147,7 +147,7 @@ echo '<a href="javascript: toggleFormFilter();"><b>' .
array("title" => __('Toggle filter(s)'),
"id" => 'image_form_filter')) . '</a>';
$table = null;
$table = new stdClass();
$table->width = '100%';
$table->data[0][0] = __('Agents');
$table->data[0][1] = html_print_select($agents, 'agent_filter', $agentFilter, '', __('All'), 0, true);
@ -412,7 +412,7 @@ echo "<form action='index.php?sec=reporting&sec2=godmode/reporting/reporting_bui
echo "</div>";
echo "</form>";
$table = null;
$table = new stdClass();
$table->width = '100%';
$table->colspan[0][0] = 3;
$table->size = array();
@ -435,7 +435,7 @@ echo "<form action='index.php?sec=reporting&sec2=godmode/reporting/reporting_bui
html_print_table($table);
echo "</form>";
$table = null;
$table = new stdClass();
$table->width = '100%';
$table->colspan[0][0] = 3;
$table->size = array();

View File

@ -4011,8 +4011,9 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
reporting_enterprise_sla_monthly($mini, $content, $report, $table, $item_title);
break;
case 'SLA_services':
if (function_exists("reporting_enterprise_sla_services"))
if (function_exists("reporting_enterprise_sla_services")) {
reporting_enterprise_sla_services($mini, $content, $report, $table, $item_title);
}
break;
case 3:
case 'SLA':

6
pandora_console/include/functions_reports.php Normal file → Executable file
View File

@ -528,9 +528,11 @@ function reports_get_report_types ($template = false, $not_editor = false) {
$types['SLA'] = array('optgroup' => __('SLA'),
'name' => __('S.L.A.'));
if (!$template && $config['enterprise_installed']) {
if ($config['enterprise_installed']) {
$types['SLA_monthly'] = array('optgroup' => __('SLA'),
'name' => __('Monthly S.L.A.'));
'name' => __('Monthly S.L.A.'));
}
if (!$template && $config['enterprise_installed']) {
$types['SLA_services'] = array('optgroup' => __('SLA'),
'name' => __('Services S.L.A.'));
}