2012-06-20 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/graphs/pChart/pPie.class.php: ixed a bug in pie3d graph function when graph data only has one element. include/functions_reporting.php operation/reporting/reporting_viewer.php: Fixed a visualization problem in agent_modules report item. godmode/users/profile_list.php: Fixed a bug when profile creation fails. Merged from branches. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6621 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
5c22b6b962
commit
dc550e758f
|
@ -1,3 +1,17 @@
|
|||
2012-06-20 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
|
||||
* include/graphs/pChart/pPie.class.php: ixed a bug in pie3d graph
|
||||
function when graph data only has one element.
|
||||
|
||||
include/functions_reporting.php
|
||||
operation/reporting/reporting_viewer.php: Fixed a visualization
|
||||
problem in agent_modules report item.
|
||||
|
||||
godmode/users/profile_list.php: Fixed a bug when profile creation
|
||||
fails.
|
||||
|
||||
Merged from branches.
|
||||
|
||||
2012-06-20 Vanessa Gil <vanessa.gil@artica.es>
|
||||
|
||||
* godmode/agentes/module_manager.php
|
||||
|
|
|
@ -59,13 +59,13 @@ if ($delete_profile) {
|
|||
$sql = sprintf ('DELETE FROM tperfil WHERE id_perfil = %d', $id_profile);
|
||||
$ret = db_process_sql ($sql);
|
||||
if ($ret === false) {
|
||||
echo '<h3 class="error">'.__('There was a problem deleting the profile').'</h3>';
|
||||
ui_print_error_message(__('There was a problem deleting the profile'));
|
||||
}
|
||||
else {
|
||||
db_pandora_audit("Profile management",
|
||||
"Delete profile ". $profile['name']);
|
||||
|
||||
echo '<h3 class="suc">'.__('Successfully deleted').'</h3>';
|
||||
ui_print_success_message(__('Successfully deleted'));
|
||||
}
|
||||
|
||||
//Delete profile from user data
|
||||
|
@ -110,14 +110,14 @@ if ($update_profile) {
|
|||
db_pandora_audit("User management",
|
||||
"Update profile ". $name, false, false, $info);
|
||||
|
||||
echo '<h3 class="suc">'.__('Successfully updated').'</h3>';
|
||||
ui_print_success_message(__('Successfully updated'));
|
||||
}
|
||||
else {
|
||||
echo '<h3 class="error"'.__('There was a problem updating this profile').'</h3>';
|
||||
ui_print_error_message(__('There was a problem updating this profile'));
|
||||
}
|
||||
}
|
||||
else {
|
||||
echo '<h3 class="error"'.__('Profile name cannot be empty').'</h3>';
|
||||
ui_print_error_message(__('Profile name cannot be empty'));
|
||||
}
|
||||
$id_profile = 0;
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ if ($create_profile) {
|
|||
$ret = db_process_sql_insert('tperfil', $values);
|
||||
|
||||
if ($ret !== false) {
|
||||
echo '<h3 class="suc">'.__('Successfully created').'</h3>';
|
||||
ui_print_success_message(__('Successfully created'));
|
||||
|
||||
$info = 'Name: ' . $name . ' Incident view: ' . $incident_view .
|
||||
' Incident edit: ' . $incident_edit . ' Incident management: ' . $incident_management .
|
||||
|
@ -165,11 +165,11 @@ if ($create_profile) {
|
|||
"Created profile ". $name, false, false, $info);
|
||||
}
|
||||
else {
|
||||
echo '<h3 class="error">'.__('There was a problem creating this profile').'</h3>';
|
||||
ui_print_error_message(__('There was a problem creating this profile'));
|
||||
}
|
||||
}
|
||||
else {
|
||||
echo '<h3 class="error"'.__('There was a problem creating this profile').'</h3>';
|
||||
ui_print_error_message(__('There was a problem creating this profile'));
|
||||
}
|
||||
$id_profile = 0;
|
||||
}
|
||||
|
|
|
@ -4164,18 +4164,18 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
$nmodules = 0;
|
||||
foreach ($modules_by_name as $module) {
|
||||
$nmodules++;
|
||||
|
||||
if($nmodules > $block) { //Will show only the (block) first modules
|
||||
// Don't use pagination
|
||||
/*if($nmodules > $block) { //Will show only the (block) first modules
|
||||
continue;
|
||||
}
|
||||
}*/
|
||||
|
||||
$file_name = string2image(ui_print_truncate_text($module['name'], 'module_small', false, true, false, '...'), false, false, 6, 270, '#90B165', 'FFF', 4, 0);
|
||||
$table_data .= '<th width="22px">' . html_print_image($file_name, true, array('title' => $module['name']))."</th>";
|
||||
}
|
||||
|
||||
if ($block < $nmodules) {
|
||||
// Dont use pagination
|
||||
/*if ($block < $nmodules) {
|
||||
$table_data .= "<th width='20px' style='vertical-align:top; padding-top: 35px;' rowspan='".($nagents+1)."'><b>...</b></th>";
|
||||
}
|
||||
}*/
|
||||
|
||||
$filter_agents = false;
|
||||
if($id_group > 0) {
|
||||
|
@ -4224,10 +4224,10 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
|
||||
foreach ($modules_by_name as $module) {
|
||||
$nmodules++;
|
||||
|
||||
if ($nmodules > $block) {
|
||||
// Don't use pagination
|
||||
/*if ($nmodules > $block) {
|
||||
continue;
|
||||
}
|
||||
}*/
|
||||
|
||||
$match = false;
|
||||
foreach($module['id'] as $module_id){
|
||||
|
|
|
@ -293,7 +293,7 @@
|
|||
/* Dump the real number of data to draw */
|
||||
$Values = "";
|
||||
foreach ($Data["Series"][$DataSerie]["Data"] as $Key => $Value)
|
||||
{ if ($Value != 0) { $Values[] = $Value; } }
|
||||
{ if ($Value != 0) { $Values[$Key] = $Value; } }
|
||||
|
||||
/* Compute the wasted angular space between series */
|
||||
if (count($Values)==1) { $WastedAngular = 0; } else { $WastedAngular = count($Values) * $DataGapAngle; }
|
||||
|
@ -306,11 +306,18 @@
|
|||
|
||||
/* Draw the polygon pie elements */
|
||||
$Step = 360 / (2 * PI * $Radius);
|
||||
$Offset = 360; $ID = count($Values)-1;
|
||||
$Values = array_reverse($Values);
|
||||
$Offset = 360;
|
||||
// Commented due to fix bellow
|
||||
//$ID = count($Values)-1;
|
||||
|
||||
// Commented due to fix bellow
|
||||
// $Values = array_reverse($Values);
|
||||
$Slice = 0; $Slices = ""; $SliceColors = ""; $Visible = ""; $SliceAngle = "";
|
||||
foreach($Values as $Key => $Value)
|
||||
{
|
||||
// Fix: ID equal to the index of array
|
||||
$ID = $Key;
|
||||
|
||||
$Settings = array("R"=>$Palette[$ID]["R"],"G"=>$Palette[$ID]["G"],"B"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"]);
|
||||
$SliceColors[$Slice] = $Settings;
|
||||
|
||||
|
|
|
@ -216,7 +216,14 @@ foreach ($contents as $content) {
|
|||
|
||||
reporting_render_report_html_item ($content, $table, $report);
|
||||
|
||||
if ($content['type'] == 'agent_module')
|
||||
echo '<div style="width: 99%; overflow: auto;">';
|
||||
|
||||
html_print_table ($table);
|
||||
|
||||
if ($content['type'] == 'agent_module')
|
||||
echo '</div>';
|
||||
|
||||
flush ();
|
||||
}
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue