2014-05-12 Sergio Martin <sergio.martin@artica.es>
* godmode/reporting/reporting_builder.php godmode/reporting/reporting_builder.item_editor.php include/functions_reporting.php include/functions_reports.php: Added SLA Monthly reports. Its an enterprise feature, so here is only the code to hook it and some forms logic * include/functions_html.php: Add support to header styles in html_print_table function. Used in SLA monthly reports git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9919 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
4ebdf3bb44
commit
33dc0295ef
|
@ -1,3 +1,15 @@
|
|||
2014-05-12 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* godmode/reporting/reporting_builder.php
|
||||
godmode/reporting/reporting_builder.item_editor.php
|
||||
include/functions_reporting.php
|
||||
include/functions_reports.php: Added SLA Monthly reports. Its
|
||||
an enterprise feature, so here is only the code to hook it and
|
||||
some forms logic
|
||||
|
||||
* include/functions_html.php: Add support to header styles in
|
||||
html_print_table function. Used in SLA monthly reports
|
||||
|
||||
2014-05-12 Vanessa Gil <vanessa.gil@artica.es>
|
||||
|
||||
* include/functions_config.php: Added alert in header
|
||||
|
|
|
@ -119,6 +119,7 @@ switch ($action) {
|
|||
// If we are creating a new report item then clean interface and display creation view
|
||||
$type = get_parameter('type', 'SLA');
|
||||
switch ($type) {
|
||||
case 'SLA_monthly':
|
||||
case 'SLA':
|
||||
case 'top_n':
|
||||
case 'exception':
|
||||
|
@ -218,6 +219,22 @@ switch ($action) {
|
|||
// 'top_n' filed will be reused for SLA sort option
|
||||
$sla_sorted_by = $item['top_n'];
|
||||
break;
|
||||
case 'SLA_monthly':
|
||||
$description = $item['description'];
|
||||
$only_display_wrong = $item['only_display_wrong'];
|
||||
$monday = $item['monday'];
|
||||
$tuesday = $item['tuesday'];
|
||||
$wednesday = $item['wednesday'];
|
||||
$thursday = $item['thursday'];
|
||||
$friday = $item['friday'];
|
||||
$saturday = $item['saturday'];
|
||||
$sunday = $item['sunday'];
|
||||
$time_from = $item['time_from'];
|
||||
$time_to = $item['time_to'];
|
||||
$show_graph = $item['show_graph'];
|
||||
// 'top_n' filed will be reused for SLA sort option
|
||||
$sla_sorted_by = $item['top_n'];
|
||||
break;
|
||||
case 'monitor_report':
|
||||
$description = $item['description'];
|
||||
$idAgentModule = $item['id_agent_module'];
|
||||
|
@ -1866,6 +1883,13 @@ function chooseType() {
|
|||
$("#row_show_in_two_columns").show();
|
||||
$("#row_sort").show();
|
||||
break;
|
||||
case 'SLA_monthly':
|
||||
$("#row_description").show();
|
||||
$("#sla_list").show();
|
||||
$("#row_working_time").show();
|
||||
$("#row_show_in_two_columns").show();
|
||||
$("#row_sort").show();
|
||||
break;
|
||||
case 'monitor_report':
|
||||
$("#row_description").show();
|
||||
$("#row_agent").show();
|
||||
|
|
|
@ -743,6 +743,7 @@ switch ($action) {
|
|||
$intervals = get_parameter('max_interval') . ';' . get_parameter('min_interval');
|
||||
$values['text'] = $intervals;
|
||||
break;
|
||||
case 'SLA_monthly':
|
||||
case 'SLA':
|
||||
$values['period'] = get_parameter('period');
|
||||
$values['top_n'] = get_parameter('combo_sla_sort_options',0);
|
||||
|
|
|
@ -1197,6 +1197,7 @@ function html_get_predefined_table ($model = 'transparent', $columns = 4) {
|
|||
* @param object Object with several properties:
|
||||
* $table->head - An array of heading names.
|
||||
* $table->head_colspan - An array of colspans of each head column.
|
||||
* $table->headstyle - An array of styles of each head column.
|
||||
* $table->align - An array of column alignments
|
||||
* $table->valign - An array of column alignments
|
||||
* $table->size - An array of column sizes
|
||||
|
@ -1400,8 +1401,12 @@ function html_print_table (&$table, $return = false) {
|
|||
$headColspan = 'colspan = "' . $table->head_colspan[$key] . '"';
|
||||
}
|
||||
else $headColspan = '';
|
||||
|
||||
if (isset ($table->headstyle[$key])) {
|
||||
$headStyle = ' style = "' . $table->headstyle[$key] . '" ';
|
||||
}
|
||||
|
||||
$output .= '<th class="'.$table->headclass[$key].'" ' . $headColspan . ' scope="col">'. $heading .'</th>';
|
||||
$output .= '<th class="'.$table->headclass[$key].'" ' . $headColspan . $headStyle . ' scope="col">'. $heading .'</th>';
|
||||
}
|
||||
$output .= '</tr></thead>'."\n";
|
||||
}
|
||||
|
|
|
@ -3262,6 +3262,9 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
ui_get_full_url(false) . '/');
|
||||
array_push ($table->data, $data);
|
||||
|
||||
break;
|
||||
case 'SLA_monthly':
|
||||
reporting_enterprise_sla_monthly($mini, $content, $report, $table, $item_title);
|
||||
break;
|
||||
case 3:
|
||||
case 'SLA':
|
||||
|
|
|
@ -528,7 +528,10 @@ function reports_get_report_types ($template = false, $not_editor = false) {
|
|||
|
||||
$types['SLA'] = array('optgroup' => __('SLA'),
|
||||
'name' => __('S.L.A.'));
|
||||
|
||||
if ($config['enterprise_installed']) {
|
||||
$types['SLA_monthly'] = array('optgroup' => __('SLA'),
|
||||
'name' => __('Monthly S.L.A.'));
|
||||
}
|
||||
|
||||
|
||||
$types['prediction_date'] = array('optgroup' => __('Forecasting'),
|
||||
|
|
Loading…
Reference in New Issue