2011-05-09 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php: changed in the function "grafico_modulo_sparse2" the order to include the javascripts for flash. * include/functions_visual_map.php, include/ajax/visual_console_builder.ajax.php, godmode/reporting/visual_console_builder.editor.js: some fixes in the show new graphs. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4320 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
9e426ae9cd
commit
fc35eb06a7
|
@ -1,3 +1,13 @@
|
|||
2011-05-09 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_graph.php: changed in the function
|
||||
"grafico_modulo_sparse2" the order to include the javascripts for flash.
|
||||
|
||||
* include/functions_visual_map.php,
|
||||
include/ajax/visual_console_builder.ajax.php,
|
||||
godmode/reporting/visual_console_builder.editor.js: some fixes in the show
|
||||
new graphs.
|
||||
|
||||
2011-05-09 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/graphs/functions_fsgraph.php: fixed the call to
|
||||
|
|
|
@ -608,6 +608,9 @@ function getModuleGraph(id_data) {
|
|||
}
|
||||
});
|
||||
|
||||
//Cleaned array
|
||||
parameter = Array();
|
||||
|
||||
parameter.push ({name: "page", value: "include/ajax/visual_console_builder.ajax"});
|
||||
parameter.push ({name: "action", value: "get_image_sparse"});
|
||||
parameter.push ({name: "id_agent_module", value: id_agente_modulo});
|
||||
|
@ -619,7 +622,7 @@ function getModuleGraph(id_data) {
|
|||
url: "ajax.php",
|
||||
data: parameter,
|
||||
type: "POST",
|
||||
dataType: 'json',
|
||||
dataType: 'text', //The ajax return the data as text.
|
||||
success: function (data)
|
||||
{
|
||||
img = data;
|
||||
|
@ -651,6 +654,7 @@ function getModuleValue(id_data) {
|
|||
|
||||
function getPercentileBar(id_data) {
|
||||
var parameter = Array();
|
||||
|
||||
parameter.push ({name: "page", value: "include/ajax/visual_console_builder.ajax"});
|
||||
parameter.push ({name: "action", value: "get_module_value"});
|
||||
parameter.push ({name: "id_element", value: id_data});
|
||||
|
@ -668,12 +672,32 @@ function getPercentileBar(id_data) {
|
|||
}
|
||||
});
|
||||
|
||||
|
||||
//Get the actual system font.
|
||||
parameter = Array();
|
||||
parameter.push ({name: "page", value: "include/ajax/visual_console_builder.ajax"});
|
||||
parameter.push ({name: "action", value: "get_font"});
|
||||
jQuery.ajax({
|
||||
async: false,
|
||||
url: "ajax.php",
|
||||
data: parameter,
|
||||
type: "POST",
|
||||
dataType: 'json',
|
||||
success: function (data)
|
||||
{
|
||||
font = data['font'];
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
if ( max_percentile > 0)
|
||||
var percentile = module_value / max_percentile * 100;
|
||||
else
|
||||
var percentile = 100;
|
||||
|
||||
var img = 'include/graphs/fgraph.php?graph_type=progressbar&height=15&width=' + width_percentile + '&mode=1&progress=' + percentile;
|
||||
var img = 'include/graphs/fgraph.php?graph_type=progressbar&height=15&' +
|
||||
'width=' + width_percentile + '&mode=1&progress=' + percentile + '&font=' + font;
|
||||
|
||||
return img;
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ $ajax = true;
|
|||
require_once('godmode/reporting/visual_console_builder.constans.php');
|
||||
require_once('include/functions_visual_map.php');
|
||||
require_once($config['homedir'] . "/include/functions_agents.php");
|
||||
require_once($config['homedir'] . '/include/functions_graph.php');
|
||||
|
||||
$action = get_parameter('action');
|
||||
$type = get_parameter('type');
|
||||
|
@ -61,6 +62,11 @@ $get_element_status = get_parameter('get_element_status', 0);
|
|||
$get_image_path_status = get_parameter('get_image_path_status', 0);
|
||||
|
||||
switch ($action) {
|
||||
case 'get_font':
|
||||
$return = array();
|
||||
$return['font'] = $config['fontpath'];
|
||||
echo json_encode($return);
|
||||
break;
|
||||
case 'get_image_sparse':
|
||||
$img = grafico_modulo_sparse2($id_agent_module,
|
||||
$period, false, $width, $height, '', null, false, 0, false, 0, 0, 0,
|
||||
|
|
|
@ -33,8 +33,6 @@ function grafico_modulo_sparse2 ($agent_module_id, $period, $show_events,
|
|||
global $config;
|
||||
global $graphic_type;
|
||||
|
||||
include_flash_chart_script($homeurl);
|
||||
|
||||
// Set variables
|
||||
if ($date == 0) $date = get_system_time();
|
||||
$datelimit = $date - $period;
|
||||
|
@ -303,6 +301,10 @@ function grafico_modulo_sparse2 ($agent_module_id, $period, $show_events,
|
|||
$flash_chart = false;
|
||||
}
|
||||
|
||||
if ($flash_chart) {
|
||||
include_flash_chart_script($homeurl);
|
||||
}
|
||||
|
||||
return area_graph($flash_chart, $chart, $width, $height, $color,$legend,
|
||||
$long_index, "images/image_problem.opaque.png", "", "", $homeurl,
|
||||
$config['homedir'] . "/images/logo_vertical_water.png",
|
||||
|
|
|
@ -118,7 +118,6 @@ function printItemInVisualConsole($layoutData) {
|
|||
echo '<div id="' . $id . '" class="item percentile_bar" style="left: 0px; top: 0px; color: ' . $color . '; text-align: center; position: absolute; ' . $sizeStyle . ' margin-top: ' . $top . 'px; margin-left: ' . $left . 'px;">';
|
||||
echo $text . '<br />';
|
||||
echo progress_bar2($percentile, $width, 15);
|
||||
echo $img;
|
||||
echo '</div>';
|
||||
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue