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
edc6ad7d50
commit
c42525b0f1
|
@ -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>
|
||||
|
||||
* include/functions_ui.php: reduced the char lenght of title in
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
// Login check
|
||||
global $config;
|
||||
global $statusProcessInDB;
|
||||
|
||||
check_login ();
|
||||
|
||||
|
@ -52,7 +53,9 @@ $refr = (int) get_parameter ('refr', $config['vc_refr']);
|
|||
|
||||
|
||||
//Save/Update data in DB
|
||||
$statusProcessInDB = null;
|
||||
global $statusProcessInDB;
|
||||
if (empty($statusProcessInDB))
|
||||
$statusProcessInDB = null;
|
||||
switch ($activeTab) {
|
||||
case 'data':
|
||||
switch ($action) {
|
||||
|
@ -68,10 +71,12 @@ switch ($activeTab) {
|
|||
$background = get_parameter('background');
|
||||
$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
|
||||
$visualConsole = db_get_row_filter('tlayout', array('id' => $idVisualConsole));
|
||||
$visualConsole = db_get_row_filter('tlayout',
|
||||
array('id' => $idVisualConsole));
|
||||
$background_now = $visualConsole['background'];
|
||||
if ($background_now != $background && $background) {
|
||||
$sizeBackground = getimagesize($config['homedir'] . '/images/console/background/' . $background);
|
||||
|
@ -96,27 +101,33 @@ switch ($activeTab) {
|
|||
break;
|
||||
|
||||
case 'save':
|
||||
if ($values['name'] != "" && $values['background'])
|
||||
$idVisualConsole = db_process_sql_insert('tlayout', $values);
|
||||
else
|
||||
$idVisualConsole = false;
|
||||
|
||||
if ($idVisualConsole !== false) {
|
||||
db_pandora_audit( "Visual console builder", "Create visual console #$idVisualConsole");
|
||||
$action = 'edit';
|
||||
$statusProcessInDB = array('flag' => true, 'message' => ui_print_success_message(__('Successfully 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));
|
||||
if (!defined('METACONSOLE')) {
|
||||
if ($values['name'] != "" && $values['background'])
|
||||
$idVisualConsole = db_process_sql_insert('tlayout', $values);
|
||||
else
|
||||
$idVisualConsole = false;
|
||||
|
||||
if ($idVisualConsole !== false) {
|
||||
db_pandora_audit( "Visual console builder", "Create visual console #$idVisualConsole");
|
||||
$action = 'edit';
|
||||
$statusProcessInDB = array('flag' => true,
|
||||
'message' => ui_print_success_message(__('Successfully 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;
|
||||
}
|
||||
$visualConsole = db_get_row_filter('tlayout', array('id' => $idVisualConsole));
|
||||
$visualConsole = db_get_row_filter('tlayout',
|
||||
array('id' => $idVisualConsole));
|
||||
break;
|
||||
|
||||
case 'edit':
|
||||
$visualConsole = db_get_row_filter('tlayout', array('id' => $idVisualConsole));
|
||||
$visualConsole = db_get_row_filter('tlayout',
|
||||
array('id' => $idVisualConsole));
|
||||
$visualConsoleName = $visualConsole['name'];
|
||||
$idGroup = $visualConsole['id_group'];
|
||||
$background = $visualConsole['background'];
|
||||
|
|
|
@ -2615,8 +2615,8 @@ function ui_print_agent_autocomplete_input($parameters) {
|
|||
|
||||
|
||||
$input_id_server_name = uniqid('server_'); //Default value
|
||||
if (isset($parameters['input_id_server_id'])) {
|
||||
$input_id_server_id = $parameters['input_id_server_id'];
|
||||
if (isset($parameters['input_id_server_name'])) {
|
||||
$input_id_server_name = $parameters['input_id_server_name'];
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue