2013-07-31 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/visual_console_builder.php: change the code to show the tabs in metaconsole after create a new visualmap. * include/functions_ui.php: fixed into the function "ui_print_agent_autocomplete_input" the parameter "input_id_server_name" for metaconsole. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
7aa9ccbfb0
commit
8f1232f9e7
|
@ -1,3 +1,12 @@
|
||||||
|
2013-07-31 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* godmode/reporting/visual_console_builder.php: change the code
|
||||||
|
to show the tabs in metaconsole after create a new visualmap.
|
||||||
|
|
||||||
|
* include/functions_ui.php: fixed into the function
|
||||||
|
"ui_print_agent_autocomplete_input" the parameter
|
||||||
|
"input_id_server_name" for metaconsole.
|
||||||
|
|
||||||
2013-07-31 Miguel de Dios <miguel.dedios@artica.es>
|
2013-07-31 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
* include/functions_ui.php: reduced the char lenght of title in
|
* include/functions_ui.php: reduced the char lenght of title in
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
|
|
||||||
// Login check
|
// Login check
|
||||||
global $config;
|
global $config;
|
||||||
|
global $statusProcessInDB;
|
||||||
|
|
||||||
check_login ();
|
check_login ();
|
||||||
|
|
||||||
|
@ -52,7 +53,9 @@ $refr = (int) get_parameter ('refr', $config['vc_refr']);
|
||||||
|
|
||||||
|
|
||||||
//Save/Update data in DB
|
//Save/Update data in DB
|
||||||
$statusProcessInDB = null;
|
global $statusProcessInDB;
|
||||||
|
if (empty($statusProcessInDB))
|
||||||
|
$statusProcessInDB = null;
|
||||||
switch ($activeTab) {
|
switch ($activeTab) {
|
||||||
case 'data':
|
case 'data':
|
||||||
switch ($action) {
|
switch ($action) {
|
||||||
|
@ -68,10 +71,12 @@ switch ($activeTab) {
|
||||||
$background = get_parameter('background');
|
$background = get_parameter('background');
|
||||||
$visualConsoleName = get_parameter('name');
|
$visualConsoleName = get_parameter('name');
|
||||||
|
|
||||||
$values = array('name' => $visualConsoleName, 'id_group' => $idGroup, 'background' => $background);
|
$values = array('name' => $visualConsoleName,
|
||||||
|
'id_group' => $idGroup, 'background' => $background);
|
||||||
|
|
||||||
// If the background is changed the size is reseted
|
// If the background is changed the size is reseted
|
||||||
$visualConsole = db_get_row_filter('tlayout', array('id' => $idVisualConsole));
|
$visualConsole = db_get_row_filter('tlayout',
|
||||||
|
array('id' => $idVisualConsole));
|
||||||
$background_now = $visualConsole['background'];
|
$background_now = $visualConsole['background'];
|
||||||
if ($background_now != $background && $background) {
|
if ($background_now != $background && $background) {
|
||||||
$sizeBackground = getimagesize($config['homedir'] . '/images/console/background/' . $background);
|
$sizeBackground = getimagesize($config['homedir'] . '/images/console/background/' . $background);
|
||||||
|
@ -96,27 +101,33 @@ switch ($activeTab) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'save':
|
case 'save':
|
||||||
if ($values['name'] != "" && $values['background'])
|
if (!defined('METACONSOLE')) {
|
||||||
$idVisualConsole = db_process_sql_insert('tlayout', $values);
|
if ($values['name'] != "" && $values['background'])
|
||||||
else
|
$idVisualConsole = db_process_sql_insert('tlayout', $values);
|
||||||
$idVisualConsole = false;
|
else
|
||||||
|
$idVisualConsole = false;
|
||||||
if ($idVisualConsole !== false) {
|
|
||||||
db_pandora_audit( "Visual console builder", "Create visual console #$idVisualConsole");
|
if ($idVisualConsole !== false) {
|
||||||
$action = 'edit';
|
db_pandora_audit( "Visual console builder", "Create visual console #$idVisualConsole");
|
||||||
$statusProcessInDB = array('flag' => true, 'message' => ui_print_success_message(__('Successfully created.'), '', true));
|
$action = 'edit';
|
||||||
}
|
$statusProcessInDB = array('flag' => true,
|
||||||
else {
|
'message' => ui_print_success_message(__('Successfully created.'), '', true));
|
||||||
db_pandora_audit( "Visual console builder", "Fail try to create visual console");
|
}
|
||||||
$statusProcessInDB = array('flag' => false, 'message' => ui_print_error_message(__('Could not be created.'), '', true));
|
else {
|
||||||
|
db_pandora_audit( "Visual console builder", "Fail try to create visual console");
|
||||||
|
$statusProcessInDB = array('flag' => false,
|
||||||
|
'message' => ui_print_error_message(__('Could not be created.'), '', true));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$visualConsole = db_get_row_filter('tlayout', array('id' => $idVisualConsole));
|
$visualConsole = db_get_row_filter('tlayout',
|
||||||
|
array('id' => $idVisualConsole));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'edit':
|
case 'edit':
|
||||||
$visualConsole = db_get_row_filter('tlayout', array('id' => $idVisualConsole));
|
$visualConsole = db_get_row_filter('tlayout',
|
||||||
|
array('id' => $idVisualConsole));
|
||||||
$visualConsoleName = $visualConsole['name'];
|
$visualConsoleName = $visualConsole['name'];
|
||||||
$idGroup = $visualConsole['id_group'];
|
$idGroup = $visualConsole['id_group'];
|
||||||
$background = $visualConsole['background'];
|
$background = $visualConsole['background'];
|
||||||
|
|
|
@ -2615,8 +2615,8 @@ function ui_print_agent_autocomplete_input($parameters) {
|
||||||
|
|
||||||
|
|
||||||
$input_id_server_name = uniqid('server_'); //Default value
|
$input_id_server_name = uniqid('server_'); //Default value
|
||||||
if (isset($parameters['input_id_server_id'])) {
|
if (isset($parameters['input_id_server_name'])) {
|
||||||
$input_id_server_id = $parameters['input_id_server_id'];
|
$input_id_server_name = $parameters['input_id_server_name'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue