Merge branch 'develop' into feature#new-iface-names

This commit is contained in:
Ramon Novoa 2017-03-01 15:00:44 +01:00
commit 47e17630d1
12 changed files with 65 additions and 22 deletions

0
pandora_agents/unix/pandora_agent Normal file → Executable file
View File

0
pandora_agents/unix/pandora_agent_installer Normal file → Executable file
View File

View File

@ -183,21 +183,15 @@ foreach ($extensions as $file => $extension) {
//Get version of this extensions
if ($config['extensions'][$file]['operation_menu']) {
$data[] = $config['extensions'][$file]['operation_menu']['version'];
}
if ($config['extensions'][$file]['godmode_menu']) {
} else if ($config['extensions'][$file]['godmode_menu']) {
$data[] = $config['extensions'][$file]['godmode_menu']['version'];
}
if ($config['extensions'][$file]['extension_ope_tab']) {
} else if ($config['extensions'][$file]['extension_ope_tab']) {
$data[] = $config['extensions'][$file]['extension_ope_tab']['version'];
}
else if ($config['extensions'][$file]['extension_god_tab']) {
} else if ($config['extensions'][$file]['extension_god_tab']) {
$data[] = $config['extensions'][$file]['extension_god_tab']['version'];
} else {
$data[] = __('N/A');
}
}
else {
$data[] = $file;
@ -205,17 +199,15 @@ foreach ($extensions as $file => $extension) {
//Get version of this extension
if ($config['extensions'][$file]['operation_menu']) {
$data[] = $config['extensions'][$file]['operation_menu']['version'];
}
else if ($config['extensions'][$file]['godmode_menu']) {
} else if ($config['extensions'][$file]['godmode_menu']) {
$data[] = $config['extensions'][$file]['godmode_menu']['version'];
}
else if (isset($config['extensions'][$file]['extension_ope_tab'])) {
} else if (isset($config['extensions'][$file]['extension_ope_tab'])) {
$data[] = $config['extensions'][$file]['extension_ope_tab']['version'];
}
else if ($config['extensions'][$file]['extension_god_tab']) {
} else if ($config['extensions'][$file]['extension_god_tab']) {
$data[] = $config['extensions'][$file]['extension_god_tab']['version'];
} else {
$data[] = __('N/A');
}
}
if ($extension['enterprise']) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 475 B

After

Width:  |  Height:  |  Size: 275 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 508 B

After

Width:  |  Height:  |  Size: 282 B

View File

@ -426,6 +426,41 @@ function __ ($string /*, variable arguments */) {
return vsprintf ($l10n->translate ($string), $args);
}
/**
* Get a translated string for extension
*
* @param string String to translate. It can have special format characters like
* a printf
* @param mixed Optional parameters to be replaced in string. Example:
* <code>
* echo ___('Hello!');
* echo ___('Hello, %s!', $user);
* </code>
*
* @return string The translated string. If not defined, the same string will be returned
*/
function ___ ($string /*, variable arguments */) {
global $config;
$trace = debug_backtrace();
foreach($config['extensions'] as $extension){
$extension_file = $extension['file'];
if(!isset($config['extensions'][$extension_file]['translate_function'])){
continue;
}
foreach($trace as $item){
if(pathinfo($item['file'], PATHINFO_BASENAME) == $extension_file){
$tranlateString = call_user_func_array($config['extensions'][$extension_file]['translate_function'], func_get_args());
if ($tranlateString !== false) {
return $tranlateString;
}
}
}
}
return call_user_func_array('__', func_get_args());
}
/*
* json_encode for multibyte characters.
*

View File

@ -5760,8 +5760,13 @@ function reporting_custom_graph($report, $content, $type = 'dinamic',
$return['type'] = 'custom_graph';
if (empty($content['name'])) {
if ($type_report == "custom_graph") {
$content['name'] = __('Custom graph');
}
else {
$content['name'] = __('Simple graph');
}
}
$return['title'] = $content['name'];
$return['subtitle'] = $graph['name'];

View File

@ -1671,8 +1671,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
plot.setSelection(ranges);
});
//~ var legends = $('#legend_' + graph_id + ' .legendLabel');
var legends = $('#legend_' + graph_id + ' .legendLabel');
var updateLegendTimeout = null;
var latestPosition = null;

View File

@ -548,3 +548,7 @@ warmup_unknown_interval 300
# Directory were additional enc files for the XML parser are located.
enc_dir /usr/share/pandora_server/enc/
# The number of times dynamic_min and dynamic_max will be recalculated per dynamic_interval.
# Go to http://wiki.pandorafms.com/ for more information.
dynamic_updates 5

View File

@ -522,3 +522,7 @@ warmup_unknown_interval 300
# Directory were additional enc files for the XML parser are located.
enc_dir /usr/share/pandora_server/enc/
# The number of times dynamic_min and dynamic_max will be recalculated per dynamic_interval.
# Go to http://wiki.pandorafms.com/ for more information.
dynamic_updates 5

View File

@ -281,6 +281,7 @@ sub pandora_load_config {
$pa_config->{"sync_port"} = '41121'; # 7.0
$pa_config->{"sync_retries"} = 2; # 7.0
$pa_config->{"sync_timeout"} = 5; # 7.0
$pa_config->{"dynamic_updates"} = 5; # 7.0
# Internal MTA for alerts, each server need its own config.
$pa_config->{"mta_address"} = '127.0.0.1'; # Introduced on 2.0
@ -1008,6 +1009,9 @@ sub pandora_load_config {
elsif ($parametro =~ m/^sync_retries\s+([0-9]*)/i) {
$pa_config->{'sync_retries'}= clean_blank($1);
}
elsif ($parametro =~ m/^dynamic_updates\s+([0-9]*)/i) {
$pa_config->{'dynamic_updates'}= clean_blank($1);
}
} # end of loop for parameter #
# Set to RDBMS' standard port

0
pandora_server/pandora_server_installer Normal file → Executable file
View File