2012-06-25 Miguel de Dios <miguel.dedios@artica.es>

* include/functions_graph.php, include/functions_reporting.php,
	operation/agentes/status_monitor.php: cleaned source code style.
	
	* extensions/update_manager/load_updatemanager.php,
	extensions/update_manager/lib/functions.ajax.php,
	extensions/update_manager/main.php: now the function "get_key"
	returns more info about error to get user key from execution of
	keygen, and the calls of this function show more info about the
	kind errors.
	
	Merged from 4.0.2




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6697 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2012-06-25 13:17:05 +00:00
parent d82c06a212
commit 4591c80e22
7 changed files with 47 additions and 12 deletions

View File

@ -1,3 +1,17 @@
2012-06-25 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/functions_reporting.php,
operation/agentes/status_monitor.php: cleaned source code style.
* extensions/update_manager/load_updatemanager.php,
extensions/update_manager/lib/functions.ajax.php,
extensions/update_manager/main.php: now the function "get_key"
returns more info about error to get user key from execution of
keygen, and the calls of this function show more info about the
kind errors.
Merged from 4.0.2
2012-06-25 Sancho Lerena <slerena@artica.es>
* operation/menu.php: Changed order of treeview in menu.

View File

@ -460,6 +460,18 @@ function checking_online_enterprise_package() {
$settings = um_db_load_settings();
$user_key = get_user_key($settings);
if (is_array($user_key)) {
if (!$user_key['result']) {
$return['text'] = ui_print_error_message(
array('message' => $user_key['message'],
'no_close' => true), '', true);
echo json_encode($return);
return;
}
}
//Disabled output error messages
$package = @um_client_check_latest_update ($settings, $user_key);
//Get error message

View File

@ -62,14 +62,16 @@ function get_user_key ($settings) {
echo __('Keygen file does not exists');
echo '</h3>';*/
return '';
return array('result' => false,
'message' => __('The Keygen is not in the path.'));
}
if (! is_executable ($settings->keygen_path)) {
/*echo '<h3 class="error">';
echo __('Keygen file is not executable');
echo '</h3>';*/
return '';
return array('result' => false,
'message' => __('Cannot execute the Keygen.'));
}
$command_line = escapeshellcmd($settings->keygen_path.

View File

@ -46,6 +46,11 @@ function main_view() {
false, "", false, $buttons);
if (enterprise_installed()) {
if (is_array($user_key)) {
if (!$user_key['result']) {
ui_print_error_message($user_key['message']);
}
}
main_view_enterprise($settings, $user_key);
}
else {
@ -78,6 +83,11 @@ function main_view_enterprise($settings, $user_key) {
$settings = um_db_load_settings ();
$user_key = get_user_key ($settings);
if (is_array($user_key)) {
if (!$user_key['result']) {
ui_print_error_message($user_key['message']);
}
}
}
else {
ui_print_error_message(__('This is an Enterprise feature. Visit %s for more information.', '<a href="http://pandorafms.com">http://pandorafms.com</a>'));

View File

@ -252,7 +252,6 @@ function grafico_modulo_sparse ($agent_module_id, $period, $show_events,
if (!$projection){
$timestamp = $timestamp_short;
}
// Data
if($show_events) {
$chart[$timestamp]['event'] = $event_value;
@ -2067,11 +2066,10 @@ function grafico_modulo_boolean ($agent_module_id, $period, $show_events,
$color['max'] = array('border' => '#000000', 'color' => $config['graph_color3'], 'alpha' => 50);
$color['min'] = array('border' => '#000000', 'color' => $config['graph_color1'], 'alpha' => 50);
$color['baseline'] = array('border' => null, 'color' => '#0097BD', 'alpha' => 10);
/////////////////////////////////////////////////////////////////////////////////////////
$flash_chart = $config['flash_charts'];
$flash_chart = $config['flash_charts'];
if ($only_image) {
$flash_chart = false;
}
@ -2453,11 +2451,9 @@ function grafico_modulo_string ($agent_module_id, $period, $show_events,
$color['max'] = array('border' => '#000000', 'color' => $config['graph_color3'], 'alpha' => 50);
$color['min'] = array('border' => '#000000', 'color' => $config['graph_color1'], 'alpha' => 50);
//$color['baseline'] = array('border' => null, 'color' => '#0097BD', 'alpha' => 10);
/////////////////////////////////////////////////////////////////////////////////////////
$flash_chart = $config['flash_charts'];
if ($only_image) {
$flash_chart = false;
}
@ -2668,7 +2664,8 @@ function grafico_modulo_log4x ($id_agente_modulo, $periodo, $show_event,
//
$dataset[$i]->addPoint($pivot, $y, array("x" => $x, "size" => $size, "value" => $count));
}
} else {
}
else {
// There's a problem when we have no data ...
// This was the first try.. didnt work
//$dataset[$i]->addPoint($now, -1, array("x" => 0, "size" => 0));