2012-12-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/module_manager_editor.php, godmode/setup/setup.php, include/functions_config.php: cleaned source code style. * include/functions_visual_map.php, include/functions_graph.php: re-added lost code for the visualmap in metaconsole. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7277 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
6e9274b270
commit
c82191167c
|
@ -1,3 +1,12 @@
|
|||
2012-12-13 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* godmode/agentes/module_manager_editor.php,
|
||||
godmode/setup/setup.php, include/functions_config.php: cleaned
|
||||
source code style.
|
||||
|
||||
* include/functions_visual_map.php, include/functions_graph.php:
|
||||
re-added lost code for the visualmap in metaconsole.
|
||||
|
||||
2012-12-13 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* include/functions_reporting.php,
|
||||
|
|
|
@ -470,11 +470,11 @@ $(document).ready (function () {
|
|||
//Check the name
|
||||
name = $("#text-name").val();
|
||||
remote_config = $("#textarea_configuration_data").val();
|
||||
|
||||
|
||||
regexp_name = new RegExp('module_name\\s*' + name.replace(/([^0-9A-Za-z_])/g, "\\$1") +"\n");
|
||||
|
||||
|
||||
regexp_plugin = new RegExp('^module_plugin\\s*');
|
||||
|
||||
|
||||
if (remote_config == '' || remote_config.match(regexp_name) ||
|
||||
remote_config.match(regexp_plugin) ||
|
||||
$("#id_module_type").val()==100 ||
|
||||
|
|
|
@ -37,7 +37,7 @@ if (is_ajax ()) {
|
|||
unset($timezones[$timezone_key]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo json_encode($timezones);
|
||||
}
|
||||
return;
|
||||
|
@ -75,13 +75,16 @@ $table->size[1] = '70%';
|
|||
|
||||
switch ($config["dbtype"]) {
|
||||
case "mysql":
|
||||
$current_system_lang = db_get_sql ('SELECT `value` FROM tconfig WHERE `token` = "language"');
|
||||
$current_system_lang = db_get_sql ('SELECT `value`
|
||||
FROM tconfig WHERE `token` = "language"');
|
||||
break;
|
||||
case "postgresql":
|
||||
$current_system_lang = db_get_sql ('SELECT "value" FROM tconfig WHERE "token" = \'language\'');
|
||||
$current_system_lang = db_get_sql ('SELECT "value"
|
||||
FROM tconfig WHERE "token" = \'language\'');
|
||||
break;
|
||||
case "oracle":
|
||||
$current_system_lang = db_get_sql ('SELECT value FROM tconfig WHERE token = \'language\'');
|
||||
$current_system_lang = db_get_sql ('SELECT value
|
||||
FROM tconfig WHERE token = \'language\'');
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -90,10 +93,12 @@ if ($current_system_lang == "") {
|
|||
}
|
||||
|
||||
$table->data[0][0] = __('Language code for Pandora');
|
||||
$table->data[0][1] = html_print_select_from_sql ('SELECT id_language, name FROM tlanguage',
|
||||
$table->data[0][1] = html_print_select_from_sql (
|
||||
'SELECT id_language, name FROM tlanguage',
|
||||
'language', $current_system_lang , '', '', '', true);
|
||||
|
||||
$table->data[1][0] = __('Remote config directory') . ui_print_help_tip (__("Directory where agent remote configuration is stored."), true);
|
||||
$table->data[1][0] = __('Remote config directory') .
|
||||
ui_print_help_tip (__("Directory where agent remote configuration is stored."), true);
|
||||
|
||||
$table->data[1][1] = html_print_input_text ('remote_config', $config["remote_config"], '', 30, 100, true);
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ function config_update_config () {
|
|||
switch($sec2) {
|
||||
case 'godmode/setup/setup':
|
||||
//////// MAIN SETUP
|
||||
config_update_value ('language', (string) get_parameter ('language'));
|
||||
config_update_value ('language', (string) get_parameter ('language'));
|
||||
config_update_value ('remote_config', (string) get_parameter ('remote_config'));
|
||||
config_update_value ('loginhash_pwd', (string) get_parameter ('loginhash_pwd'));
|
||||
config_update_value ('timesource', (string) get_parameter ('timesource'));
|
||||
|
|
|
@ -1414,6 +1414,10 @@ function progress_bar($progress, $width, $height, $title = '', $mode = 1, $value
|
|||
function progress_bubble($progress, $width, $height, $title = '', $mode = 1, $value_text = false, $color = false) {
|
||||
global $config;
|
||||
|
||||
$hack_metaconsole = '';
|
||||
if (defined('METACONSOLE'))
|
||||
$hack_metaconsole = '../../';
|
||||
|
||||
$out_of_lim_str = __("Out of limits");
|
||||
$title = "";
|
||||
|
||||
|
@ -1431,7 +1435,7 @@ function progress_bubble($progress, $width, $height, $title = '', $mode = 1, $va
|
|||
include_graphs_dependencies($config['homedir'].'/');
|
||||
|
||||
return "<img title='" . $title . "' alt='" . $title . "'" .
|
||||
" src='" . $config['homeurl'] . "/include/graphs/fgraph.php?homeurl=../../&graph_type=progressbubble" .
|
||||
" src='" . $config['homeurl'] . $hack_metaconsole . "/include/graphs/fgraph.php?homeurl=../../&graph_type=progressbubble" .
|
||||
"&width=".$width."&height=".$height."&progress=".$progress.
|
||||
"&mode=" . $mode . "&out_of_lim_str=".$out_of_lim_str .
|
||||
"&title=".$title."&font=".$config['fontpath']."&value_text=". $value_text .
|
||||
|
|
|
@ -182,7 +182,7 @@ function visual_map_print_item($layoutData) {
|
|||
//Metaconsole db connection
|
||||
if ($layoutData['id_metaconsole'] != 0) {
|
||||
$connection = db_get_row_filter ('tmetaconsole_setup',
|
||||
$layoutData['id_metaconsole']);
|
||||
array('id' => $layoutData['id_metaconsole']));
|
||||
if (metaconsole_load_external_db($connection) != NOERR) {
|
||||
//ui_print_error_message ("Error connecting to ".$server_name);
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue