2012-03-22 Vanessa Gil <vanessa.gil@artica.es>
* pandoradb.sql pandoradb.postgreSQL.sql pandoradb.oracle.sql, extras/pandoradb_migrate_4.0.x_to_4.1.mysql.sql, extras/pandoradb_migrate_4.0.x_to_4.1.oracle.sql, extras/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql: added 'operation' to treport_content_item table. * godmode/reporting/reporting_builder.item_editor.php include/functions_reporting.php include/ajax/reporting.ajax.php include/javascript/pandora.js: Added operation: sum,max,min or avg to global reports. * images/sum.png images/avg.png images/min.png images/max.png: Added icons. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5819 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
ba559aa265
commit
fa04824354
|
@ -1,3 +1,24 @@
|
|||
2012-03-22 Vanessa Gil <vanessa.gil@artica.es>
|
||||
|
||||
* pandoradb.sql
|
||||
pandoradb.postgreSQL.sql
|
||||
pandoradb.oracle.sql,
|
||||
extras/pandoradb_migrate_4.0.x_to_4.1.mysql.sql,
|
||||
extras/pandoradb_migrate_4.0.x_to_4.1.oracle.sql,
|
||||
extras/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql: added 'operation'
|
||||
to treport_content_item table.
|
||||
|
||||
* godmode/reporting/reporting_builder.item_editor.php
|
||||
include/functions_reporting.php
|
||||
include/ajax/reporting.ajax.php
|
||||
include/javascript/pandora.js: Added operation: sum,max,min or avg to
|
||||
global reports.
|
||||
|
||||
* images/sum.png
|
||||
images/avg.png
|
||||
images/min.png
|
||||
images/max.png: Added icons.
|
||||
|
||||
2012-03-22 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/graphs/functions_pchart.php
|
||||
|
|
|
@ -187,3 +187,8 @@ UPDATE ttipo_modulo SET descripcion='Generic data incremental' WHERE id_tipo=4;
|
|||
ALTER TABLE `tusuario` ADD COLUMN `section` TEXT NOT NULL;
|
||||
|
||||
ALTER TABLE `tusuario` ADD COLUMN `data_section` TEXT NOT NULL;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `treport_content_item`
|
||||
-- -----------------------------------------------------
|
||||
ALTER TABLE `treport_content_item` ADD COLUMN `operation` TEXT DEFAULT '';
|
||||
|
|
|
@ -183,3 +183,8 @@ ALTER TABLE tusuario ADD COLUMN shortcut_data CLOB default '';
|
|||
ALTER TABLE tusuario ADD (section VARCHAR2(255) NOT NULL);
|
||||
|
||||
ALTER TABLE tusuario ADD (data_section VARCHAR2(255) NOT NULL);
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `treport_content_item`
|
||||
-- -----------------------------------------------------
|
||||
ALTER TABLE `treport_content_item` ADD (operation` CLOB default '');
|
||||
|
|
|
@ -170,3 +170,9 @@ ALTER TABLE "tusuario" ADD COLUMN "shortcut_data" text default '';
|
|||
ALTER TABLE "tusuario" ADD COLUMN "section" varchar(255) NOT NULL;
|
||||
|
||||
ALTER TABLE "tusuario" ADD COLUMN "data_section" varchar(255) NOT NULL;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `treport_content_item`
|
||||
-- -----------------------------------------------------
|
||||
ALTER TABLE "treport_content_item" ADD COLUMN "operation" text default '';
|
||||
|
||||
|
|
|
@ -754,12 +754,14 @@ function print_SLA_list($width, $action, $idItem = null) {
|
|||
|
||||
function print_General_list($width, $action, $idItem = null) {
|
||||
global $config;
|
||||
include_once('include/functions_html.php');
|
||||
?>
|
||||
<table class="databox" id="general_list" border="0" cellpadding="4" cellspacing="4" width="98%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="header" scope="col"><?php echo __('Agent');?></th>
|
||||
<th class="header" scope="col"><?php echo __('Module');?></th>
|
||||
<th class="header" scope="col"><?php echo __('Operation');?></th>
|
||||
<th class="header" scope="col"><?php echo __('Action');?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -797,6 +799,7 @@ function print_General_list($width, $action, $idItem = null) {
|
|||
echo '<tr id="general_' . $item['id'] . '" style="" class="datos">
|
||||
<td>' . printSmallFont($nameAgent) . '</td>
|
||||
<td>' . printSmallFont($nameModule) . '</td>
|
||||
<td>' . printSmallFont($item['operation']) . '</td>
|
||||
<td style="text-align: center;">
|
||||
<a href="javascript: deleteGeneralRow(' . $item['id'] . ');">' . html_print_image("images/cross.png", true) . '</a>
|
||||
</td>
|
||||
|
@ -812,6 +815,7 @@ function print_General_list($width, $action, $idItem = null) {
|
|||
<tr id="row" style="display: none;" class="datos">
|
||||
<td class="agent_name"></td>
|
||||
<td class="module_name"></td>
|
||||
<td class="operation_name"></td>
|
||||
<td style="text-align: center;"><a class="delete_button" href="javascript: deleteGeneralRow(0);"><?php html_print_image("images/cross.png", false); ?></a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -822,6 +826,8 @@ function print_General_list($width, $action, $idItem = null) {
|
|||
<input id="hidden-server_name_general" name="server_name_general" value="" type="hidden">
|
||||
<input style="background: transparent url(images/lightning.png) no-repeat right;" name="agent_general" id="text-agent_general" size="15" maxlength="20" type="text"><a href="#" class="tip"> <span>Type at least two characters to search</span></a></td>
|
||||
<td><select id="id_agent_module_general" name="id_agente_modulo_general" disabled="disabled" style="max-width: 180px"><option value="0"><?php echo __('Select an Agent first'); ?></option></select></td>
|
||||
<?php $operation = array ('avg'=>'avg','max'=>'max','min'=>'min','sum'=>'sum'); ?>
|
||||
<td><?php html_print_select ($operation, 'id_operation_module_general', 0, false, '', '', false, false, true, 'width: 200px', true); ?></td>
|
||||
<td style="text-align: center;"><a href="javascript: addGeneralRow();"><?php html_print_image("images/disk.png", false); ?></a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -841,7 +847,8 @@ function print_General_list($width, $action, $idItem = null) {
|
|||
$(document).ready (function () {
|
||||
agent_module_autocomplete('#text-agent', '#hidden-id_agent', '#id_agent_module', '#hidden-server_name');
|
||||
agent_module_autocomplete('#text-agent_sla', '#hidden-id_agent_sla', '#id_agent_module_sla', '#hidden-server_name');
|
||||
agent_module_autocomplete('#text-agent_general', '#hidden-id_agent_general', '#id_agent_module_general', '#hidden-server_name_general');
|
||||
agent_module_autocomplete('#text-agent_general', '#hidden-id_agent_general', '#id_agent_module_general', '#hidden-server_name_general', '#id_operation_module_general');
|
||||
|
||||
chooseType();
|
||||
chooseSQLquery();
|
||||
|
||||
|
@ -1050,7 +1057,9 @@ function addGeneralRow() {
|
|||
var idAgent = $("input[name=id_agent_general]").val();
|
||||
var serverName = $("input[name=server_name_general]").val();
|
||||
var idModule = $("#id_agent_module_general").val();
|
||||
var operation = $("#id_operation_module_general").val();
|
||||
var nameModule = $("#id_agent_module_general :selected").text();
|
||||
var nameOperation = $("#id_operation_module_general :selected").text();
|
||||
|
||||
if (idAgent != '') {
|
||||
//Truncate nameAgent
|
||||
|
@ -1083,11 +1092,27 @@ function addGeneralRow() {
|
|||
nameModule = data;
|
||||
}
|
||||
});
|
||||
//Truncate nameOperation
|
||||
var params = [];
|
||||
params.push("truncate_text=1");
|
||||
params.push("text=" + nameOperation);
|
||||
params.push("page=include/ajax/reporting.ajax");
|
||||
jQuery.ajax ({
|
||||
data: params.join ("&"),
|
||||
type: 'POST',
|
||||
url: action="ajax.php",
|
||||
async: false,
|
||||
timeout: 10000,
|
||||
success: function (data) {
|
||||
nameOperation = data;
|
||||
}
|
||||
});
|
||||
var params = [];
|
||||
params.push("add_general=1");
|
||||
params.push("id=" + $("input[name=id_item]").val());
|
||||
params.push("id_module=" + idModule);
|
||||
params.push("server_name_general=" + serverName);
|
||||
params.push("operation=" + operation);
|
||||
|
||||
params.push("page=include/ajax/reporting.ajax");
|
||||
jQuery.ajax ({
|
||||
|
@ -1104,6 +1129,7 @@ function addGeneralRow() {
|
|||
$("#row", row).attr('id', 'general_' + data['id']);
|
||||
$(".agent_name", row).html(nameAgent);
|
||||
$(".module_name", row).html(nameModule);
|
||||
$(".operation_name", row).html(nameOperation);
|
||||
$(".delete_button", row).attr('href', 'javascript: deleteGeneralRow(' + data['id'] + ');');
|
||||
|
||||
$("#list_general").append($(row).html());
|
||||
|
@ -1117,6 +1143,14 @@ function addGeneralRow() {
|
|||
$("<option></option>")
|
||||
.attr ("value", 0)
|
||||
.html ($("#module_general_text").html()));
|
||||
|
||||
$("#id_operation_module_general").empty();
|
||||
$("#id_operation_module_general").attr('disabled', 'true');
|
||||
$("#id_operation_module_general").append(
|
||||
$("<option></option>")
|
||||
.attr ("value", 0)
|
||||
//.html ($("#id_operation_general_text").html()));
|
||||
.html ($("#operation_general_text").html()));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 382 B |
Binary file not shown.
After Width: | Height: | Size: 845 B |
Binary file not shown.
After Width: | Height: | Size: 778 B |
Binary file not shown.
After Width: | Height: | Size: 284 B |
|
@ -88,11 +88,13 @@ if ($add_sla) {
|
|||
if ($add_general) {
|
||||
$id_module = get_parameter('id_module', 0);
|
||||
$server_name = get_parameter('server_name_general', '');
|
||||
$operation = get_parameter('operation', '');
|
||||
|
||||
$result = db_process_sql_insert('treport_content_item', array(
|
||||
'id_report_content' => $id,
|
||||
'id_agent_module' => $id_module,
|
||||
'server_name' => $server_name));
|
||||
'server_name' => $server_name,
|
||||
'operation' => $operation));
|
||||
|
||||
if ($result === false) {
|
||||
$data['correct'] = 0;
|
||||
|
|
|
@ -297,7 +297,7 @@ function reporting_get_agentmodule_data_min ($id_agent_module, $period, $date =
|
|||
* @return float The sumatory of the module values in the interval.
|
||||
*/
|
||||
function reporting_get_agentmodule_data_sum ($id_agent_module, $period, $date = 0) {
|
||||
|
||||
global $config;
|
||||
// Initialize variables
|
||||
if (empty ($date)) $date = get_system_time ();
|
||||
if ((empty ($period)) OR ($period == 0)) $period = $config["sla_period"];
|
||||
|
@ -3265,7 +3265,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
switch ($group_by_agent) {
|
||||
//0 means not group by agent
|
||||
case 0:
|
||||
$sql = sprintf("select id_agent_module, server_name from treport_content_item
|
||||
$sql = sprintf("select id_agent_module, server_name, operation from treport_content_item
|
||||
where id_report_content = %d", $content['id_rc']);
|
||||
|
||||
$generals = db_process_sql ($sql);
|
||||
|
@ -3282,12 +3282,15 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
$table1->head = array ();
|
||||
$table1->head[0] = __('Agent');
|
||||
$table1->head[1] = __('Module');
|
||||
$table1->head[2] = __('Value');
|
||||
$table1->head[2] = __('Operation');
|
||||
$table1->head[3] = __('Value');
|
||||
$table1->style[0] = 'text-align: left';
|
||||
$table1->style[1] = 'text-align: left';
|
||||
$table1->style[2] = 'text-align: right';
|
||||
$table1->style[2] = 'text-align: left';
|
||||
$table1->style[3] = 'text-align: center';
|
||||
|
||||
$data_avg = array();
|
||||
$data_res = array();
|
||||
|
||||
foreach ($generals as $key => $row) {
|
||||
//Metaconsole connection
|
||||
$server_name = $row ['server_name'];
|
||||
|
@ -3301,13 +3304,29 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
|
||||
$mod_name = modules_get_agentmodule_name ($row['id_agent_module']);
|
||||
$ag_name = modules_get_agentmodule_agent_name ($row['id_agent_module']);
|
||||
|
||||
switch ($row['operation']) {
|
||||
case 'sum':
|
||||
$data_res[$key] = reporting_get_agentmodule_data_sum ($row['id_agent_module'], $content['period'], $report["datetime"]);
|
||||
break;
|
||||
case 'max':
|
||||
$data_res[$key] = reporting_get_agentmodule_data_max ($row['id_agent_module'], $content['period']);
|
||||
break;
|
||||
case 'min':
|
||||
$data_res[$key] = reporting_get_agentmodule_data_min ($row['id_agent_module'], $content['period']);
|
||||
break;
|
||||
case 'avg':
|
||||
default:
|
||||
$data_res[$key] = reporting_get_agentmodule_data_average ($row['id_agent_module'], $content['period']);
|
||||
break;
|
||||
}
|
||||
|
||||
$unit = db_get_value('unit', 'tagente_modulo', 'id_agente_modulo', $row ['id_agent_module']);
|
||||
|
||||
$data_avg[$key] = reporting_get_agentmodule_data_average ($row['id_agent_module'], $content['period']);
|
||||
$id_agent_module[$key] = $row['id_agent_module'];
|
||||
$agent_name[$key] = $ag_name;
|
||||
$module_name[$key] = $mod_name;
|
||||
$units[$key] = $unit;
|
||||
$operations[$key] = $row['operation'];
|
||||
|
||||
//Restore dbconnection
|
||||
if (($config ['metaconsole'] == 1) && $server_name != '') {
|
||||
|
@ -3319,24 +3338,43 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
switch ($order_uptodown) {
|
||||
//Descending
|
||||
case 1:
|
||||
array_multisort($data_avg, SORT_DESC, $agent_name, SORT_ASC, $module_name, SORT_ASC, $id_agent_module, SORT_ASC);
|
||||
array_multisort($data_res, SORT_DESC, $agent_name, SORT_ASC, $module_name, SORT_ASC, $id_agent_module, SORT_ASC);
|
||||
break;
|
||||
//Ascending
|
||||
case 2:
|
||||
array_multisort($data_avg, SORT_ASC, $agent_name, SORT_ASC, $module_name, SORT_ASC, $id_agent_module, SORT_ASC);
|
||||
array_multisort($data_res, SORT_ASC, $agent_name, SORT_ASC, $module_name, SORT_ASC, $id_agent_module, SORT_ASC);
|
||||
break;
|
||||
}
|
||||
$i=0;
|
||||
foreach ($data_avg as $d) {
|
||||
foreach ($data_res as $d) {
|
||||
$data = array();
|
||||
$data[0] = $agent_name[$i];
|
||||
$data[1] = $module_name[$i];
|
||||
|
||||
switch ($operations[$i]) {
|
||||
case 'sum':
|
||||
$op = __('Summatory');
|
||||
break;
|
||||
case 'min':
|
||||
$op = __('Minimal');
|
||||
break;
|
||||
case 'max':
|
||||
$op = __('Maximun');
|
||||
break;
|
||||
case 'avg':
|
||||
default:
|
||||
$op = __('Average');
|
||||
break;
|
||||
}
|
||||
$data[2] = $op;
|
||||
|
||||
if ($d === false) {
|
||||
$data[2] = '--';
|
||||
$data[3] = '--';
|
||||
}
|
||||
else {
|
||||
$data[2] = format_for_graph($d, 2) . " " . $units[$i];
|
||||
$data[3] = format_for_graph($d, 2) . " " . $units[$i];
|
||||
}
|
||||
|
||||
array_push ($table1->data, $data);
|
||||
$i++;
|
||||
}
|
||||
|
@ -3349,11 +3387,11 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
$data = array();
|
||||
$data[0] = $agent_name[$i];
|
||||
$data[1] = $module_name[$i];
|
||||
if ($data_avg[$i] === false) {
|
||||
if ($data_res[$i] === false) {
|
||||
$data[2] = '--';
|
||||
}
|
||||
else {
|
||||
$data[2] = format_for_graph($data_avg[$i], 2) . " " . $units[$i];
|
||||
$data[2] = format_for_graph($data_res[$i], 2) . " " . $units[$i];
|
||||
}
|
||||
array_push ($table1->data, $data);
|
||||
$i++;
|
||||
|
@ -3368,7 +3406,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
//1 means group by agent
|
||||
case 1:
|
||||
//Get the data
|
||||
$sql_data = sprintf("select id_agent_module, server_name from treport_content_item
|
||||
$sql_data = sprintf("select id_agent_module, server_name, operation from treport_content_item
|
||||
where id_report_content = %d", $content['id_rc']);
|
||||
$generals = db_process_sql ($sql_data);
|
||||
|
||||
|
@ -3382,8 +3420,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
|
||||
$agent_list = array();
|
||||
$modules_list = array();
|
||||
foreach ($generals as $general) {
|
||||
|
||||
$operation_list = array();
|
||||
foreach ($generals as $general) {
|
||||
//Metaconsole connection
|
||||
$server_name = $general ['server_name'];
|
||||
if (($config ['metaconsole'] == 1) && $server_name != '') {
|
||||
|
@ -3393,7 +3431,6 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$ag_name = modules_get_agentmodule_agent_name ($general ['id_agent_module']);
|
||||
if (!in_array ($ag_name, $agent_list)) {
|
||||
array_push ($agent_list, $ag_name);
|
||||
|
@ -3402,7 +3439,9 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
if (!in_array ($mod_name, $modules_list)) {
|
||||
array_push ($modules_list, $mod_name);
|
||||
}
|
||||
|
||||
if (!in_array ($general['operation'], $operation_list)) {
|
||||
array_push ($operation_list, $general['operation']);
|
||||
}
|
||||
//Restore dbconnection
|
||||
if (($config ['metaconsole'] == 1) && $server_name != '') {
|
||||
metaconsole_restore_db();
|
||||
|
@ -3413,21 +3452,21 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
$table2->data = array ();
|
||||
$table2->head = array ();
|
||||
$table2->head[0] = __('Agent');
|
||||
$table2->style[0] = 'text-align: center';
|
||||
$table2->style[0] = 'text-align: left';
|
||||
$i = 1;
|
||||
$x = 0;
|
||||
foreach ($modules_list as $m) {
|
||||
$table2->head[$i] = ui_print_truncate_text($m, 20, false);
|
||||
$table2->head[$i] = ui_print_truncate_text($m, 20, false).' ('.$operation_list[$x].')';
|
||||
$table2->style[$i] = 'text-align: center';
|
||||
$i++;
|
||||
$x++;
|
||||
}
|
||||
|
||||
foreach ($agent_list as $a) {
|
||||
$data = array();
|
||||
$data[0] = $a;
|
||||
$i = 1;
|
||||
foreach ($modules_list as $m) {
|
||||
foreach ($generals as $g) {
|
||||
|
||||
//Metaconsole connection
|
||||
$server_name = $g ['server_name'];
|
||||
if (($config ['metaconsole'] == 1) && $server_name != '') {
|
||||
|
@ -3437,18 +3476,31 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$agent_name = modules_get_agentmodule_agent_name ($g['id_agent_module']);
|
||||
$module_name = modules_get_agentmodule_name ($g['id_agent_module']);
|
||||
$unit = db_get_value('unit', 'tagente_modulo', 'id_agente_modulo', $g['id_agent_module']);
|
||||
$found = false;
|
||||
if (strcmp($a, $agent_name) == 0 && strcmp($m, $module_name) == 0) {
|
||||
$value_avg = reporting_get_agentmodule_data_average($g['id_agent_module'], $content['period']);
|
||||
switch ($g['operation']) {
|
||||
case 'sum':
|
||||
$value_res = reporting_get_agentmodule_data_sum ($g['id_agent_module'], $content['period'], $report["datetime"]);
|
||||
break;
|
||||
case 'max':
|
||||
$value_res = reporting_get_agentmodule_data_max ($g['id_agent_module'], $content['period']);
|
||||
break;
|
||||
case 'min':
|
||||
$value_res = reporting_get_agentmodule_data_min ($g['id_agent_module'], $content['period']);
|
||||
break;
|
||||
case 'avg':
|
||||
default:
|
||||
$value_res = reporting_get_agentmodule_data_average ($g['id_agent_module'], $content['period']);
|
||||
break;
|
||||
}
|
||||
|
||||
if ($value_avg === false) {
|
||||
if ($value_res === false) {
|
||||
$data[$i] = '--';
|
||||
} else {
|
||||
$data[$i] = format_for_graph($value_avg, 2) . " " . $unit;
|
||||
$data[$i] = format_for_graph($value_res, 2) . " " . $unit;
|
||||
}
|
||||
$found = true;
|
||||
}
|
||||
|
@ -3488,8 +3540,21 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$min = reporting_get_agentmodule_data_average($generals[$i]['id_agent_module'], $content['period']);
|
||||
switch ($generals[$i]['operation']) {
|
||||
case 'sum':
|
||||
$min = reporting_get_agentmodule_data_sum ($generals[$i]['id_agent_module'], $content['period'], $report["datetime"]);
|
||||
break;
|
||||
case 'max':
|
||||
$min = reporting_get_agentmodule_data_max ($generals[$i]['id_agent_module'], $content['period']);
|
||||
break;
|
||||
case 'min':
|
||||
$min = reporting_get_agentmodule_data_min ($generals[$i]['id_agent_module'], $content['period']);
|
||||
break;
|
||||
case 'avg':
|
||||
default:
|
||||
$min = reporting_get_agentmodule_data_average ($generals[$i]['id_agent_module'], $content['period']);
|
||||
break;
|
||||
}
|
||||
$i++;
|
||||
|
||||
//Restore dbconnection
|
||||
|
@ -3515,8 +3580,22 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$value = reporting_get_agentmodule_data_average ($g['id_agent_module'], $content['period']);
|
||||
switch ($g['operation']) {
|
||||
case 'sum':
|
||||
$value = reporting_get_agentmodule_data_sum ($g['id_agent_module'], $content['period'], $report["datetime"]);
|
||||
break;
|
||||
case 'max':
|
||||
$value = reporting_get_agentmodule_data_max ($g['id_agent_module'], $content['period']);
|
||||
break;
|
||||
case 'min':
|
||||
$value = reporting_get_agentmodule_data_min ($g['id_agent_module'], $content['period']);
|
||||
break;
|
||||
case 'avg':
|
||||
default:
|
||||
$value = reporting_get_agentmodule_data_average ($g['id_agent_module'], $content['period']);
|
||||
break;
|
||||
}
|
||||
|
||||
if ($value !== false) {
|
||||
if ($value > $max) {
|
||||
$max = $value;
|
||||
|
@ -3540,7 +3619,6 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
$avg = $avg / $length;
|
||||
}
|
||||
|
||||
|
||||
unset($table_summary);
|
||||
|
||||
$table_summary->width = '99%';
|
||||
|
|
|
@ -480,6 +480,8 @@ function agent_module_autocomplete (id_agent_name, id_agent_id, id_agent_module_
|
|||
});
|
||||
$(id_agent_module_selector).fadeIn ('normal');
|
||||
$(id_agent_module_selector).removeAttr('disabled');
|
||||
//enable operation select box
|
||||
$(noneValue).removeAttr('disabled');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1022,7 +1022,8 @@ CREATE TABLE treport_content_item (
|
|||
id NUMBER(10, 0) NOT NULL PRIMARY KEY,
|
||||
id_report_content NUMBER(10, 0) NOT NULL REFERENCES treport_content(id_rc) ON DELETE CASCADE,
|
||||
id_agent_module NUMBER(10, 0) NOT NULL,
|
||||
server_name CLOB default ''
|
||||
server_name CLOB default '',
|
||||
operation CLOB default ''
|
||||
);
|
||||
|
||||
CREATE SEQUENCE treport_content_item_s INCREMENT BY 1 START WITH 1;
|
||||
|
|
|
@ -815,7 +815,8 @@ CREATE TABLE "treport_content_item" (
|
|||
"id" SERIAL NOT NULL PRIMARY KEY,
|
||||
"id_report_content" INTEGER NOT NULL REFERENCES treport_content("id_rc") ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
"id_agent_module" INTEGER NOT NULL,
|
||||
"server_name" TEXT DEFAULT ''
|
||||
"server_name" TEXT DEFAULT '',
|
||||
"operation" TEXT DEFAULT ''
|
||||
);
|
||||
|
||||
CREATE TABLE "treport_custom_sql" (
|
||||
|
|
|
@ -904,6 +904,7 @@ CREATE TABLE IF NOT EXISTS `treport_content_item` (
|
|||
`id_report_content` INTEGER UNSIGNED NOT NULL,
|
||||
`id_agent_module` int(10) unsigned NOT NULL,
|
||||
`server_name` text default '',
|
||||
`operation` text default '',
|
||||
PRIMARY KEY(`id`),
|
||||
FOREIGN KEY (`id_report_content`) REFERENCES treport_content(`id_rc`)
|
||||
ON UPDATE CASCADE ON DELETE CASCADE
|
||||
|
|
Loading…
Reference in New Issue