2012-06-18 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_html.php godmode/agentes/module_manager_editor_common.php: Modified width of module type select in module editor when you are editing/creating a network module. * include/functions.php godmode/reporting/visual_console_builder.php: Fixed autorefresh functionality. * include/functions_ui.php godmode/massive/massive_edit_modules.php operation/agentes/ver_agente.php: Several Php warnings fixed over console code. * godmode/reporting/reporting_builder.list_items.php: Fixed broken view due to a bad sintax statement. Merged fro branches. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6568 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
a67900b5da
commit
d75e0dc869
|
@ -1,3 +1,24 @@
|
|||
2012-06-18 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
|
||||
* include/functions_html.php
|
||||
godmode/agentes/module_manager_editor_common.php: Modified width
|
||||
of module type select in module editor when you are
|
||||
editing/creating a network module.
|
||||
|
||||
* include/functions.php
|
||||
godmode/reporting/visual_console_builder.php: Fixed autorefresh
|
||||
functionality.
|
||||
|
||||
* include/functions_ui.php
|
||||
godmode/massive/massive_edit_modules.php
|
||||
operation/agentes/ver_agente.php: Several Php warnings
|
||||
fixed over console code.
|
||||
|
||||
* godmode/reporting/reporting_builder.list_items.php: Fixed broken
|
||||
view due to a bad sintax statement.
|
||||
|
||||
Merged fro branches.
|
||||
|
||||
2012-06-18 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/functions_config.php: Cleaning the mess when
|
||||
|
|
|
@ -175,7 +175,7 @@ else {
|
|||
ORDER BY descripcion',
|
||||
implode (',', $categories));
|
||||
$table_simple->data[1][1] = html_print_select_from_sql ($sql, 'id_module_type',
|
||||
$idModuleType, '', '', '', true, false, false, $disabledBecauseInPolicy);
|
||||
$idModuleType, '', '', '', true, false, false, $disabledBecauseInPolicy, false, false, 100);
|
||||
}
|
||||
|
||||
$table_simple->data[1][2] = __('Module group');
|
||||
|
|
|
@ -106,7 +106,7 @@ $idAgentMassive = (int) get_parameter('id_agent_massive');
|
|||
$group_select = get_parameter('groups_select');
|
||||
|
||||
$module_name = get_parameter ('module_name');
|
||||
$agents_select = get_parameter('agents');
|
||||
$agents_select = get_parameter('agents', array());
|
||||
$agents_id = get_parameter('id_agents');
|
||||
$modules_select = get_parameter('module');
|
||||
$selection_mode = get_parameter('selection_mode', 'modules');
|
||||
|
@ -114,7 +114,8 @@ $recursion = get_parameter('recursion');
|
|||
|
||||
$update = (bool) get_parameter_post ('update');
|
||||
|
||||
if ($update) {
|
||||
if ($update) {
|
||||
$agents_ = '';
|
||||
if($selection_mode == 'modules') {
|
||||
$force = get_parameter('force_type', false);
|
||||
|
||||
|
|
|
@ -295,7 +295,7 @@ foreach ($items as $item) {
|
|||
$row [3] = '';
|
||||
}
|
||||
else {
|
||||
$module_name_db = db_get_value_filter('nombre', 'tagente_modulo', array('id_agente_modulo' => $item['id_agent_module']))
|
||||
$module_name_db = db_get_value_filter('nombre', 'tagente_modulo', array('id_agente_modulo' => $item['id_agent_module']));
|
||||
$row[3] = ui_print_truncate_text(io_safe_output($module_name_db), 'module_small');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -254,6 +254,11 @@ switch ($activeTab) {
|
|||
break;
|
||||
}
|
||||
|
||||
if (isset($config['vc_refr']) and $config['vc_refr'] != 0)
|
||||
$view_refresh = $config['vc_refr'];
|
||||
else
|
||||
$view_refresh = '60';
|
||||
|
||||
$buttons = array(
|
||||
'data' => array('active' => false,
|
||||
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/visual_console_builder&tab=data&action=' . $action . '&id_visual_console=' . $idVisualConsole . '">' .
|
||||
|
@ -268,7 +273,7 @@ $buttons = array(
|
|||
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/visual_console_builder&tab=editor&action=' . $action . '&id_visual_console=' . $idVisualConsole . '">' .
|
||||
html_print_image ("images/config.png", true, array ("title" => __('Editor'))) .'</a>'),
|
||||
'view' => array('active' => false,
|
||||
'text' => '<a href="index.php?sec=reporting&sec2=operation/visual_console/render_view&id=' . $idVisualConsole . '&refr=60">' .
|
||||
'text' => '<a href="index.php?sec=reporting&sec2=operation/visual_console/render_view&id=' . $idVisualConsole . '&refr=' . $view_refresh . '">' .
|
||||
html_print_image ("images/eye.png", true, array ("title" => __('View'))) .'</a>'),);
|
||||
|
||||
if ($action == 'new' || $idVisualConsole === false){
|
||||
|
|
|
@ -32,9 +32,11 @@ function check_refererer() {
|
|||
if (isset($_SERVER['HTTP_REFERER'])) {
|
||||
$referer = $_SERVER['HTTP_REFERER'];
|
||||
}
|
||||
else if (isset($_GET['HTTP_REFERER'])) {
|
||||
$referer = $_GET['HTTP_REFERER'];
|
||||
}
|
||||
|
||||
// If refresh is performed then dont't check referer
|
||||
// This is done due to problems with HTTP_REFERER var when metarefresh is performed
|
||||
if ($config["refr"] > 0)
|
||||
return true;
|
||||
|
||||
$url = 'http://';
|
||||
if ($config['https']) {
|
||||
|
|
|
@ -390,11 +390,12 @@ function html_print_select ($fields, $name, $selected = '', $script = '', $nothi
|
|||
* @param bool $disabled if it's true, disable the select.
|
||||
* @param string $style The string of style.
|
||||
* @param mixed $size Max elements showed in select or default (size=10)
|
||||
* @param int $truncante_size Truncate size of the element, by default is set to GENERIC_SIZE_TEXT constant
|
||||
*
|
||||
* @return string HTML code if return parameter is true.
|
||||
*/
|
||||
function html_print_select_from_sql ($sql, $name, $selected = '', $script = '', $nothing = '', $nothing_value = '0', $return = false,
|
||||
$multiple = false, $sort = true, $disabled = false, $style = false, $size = false) {
|
||||
$multiple = false, $sort = true, $disabled = false, $style = false, $size = false, $trucate_size = GENERIC_SIZE_TEXT) {
|
||||
global $config;
|
||||
|
||||
$fields = array ();
|
||||
|
@ -405,7 +406,7 @@ function html_print_select_from_sql ($sql, $name, $selected = '', $script = '',
|
|||
foreach ($result as $row) {
|
||||
$id = array_shift($row);
|
||||
$value = array_shift($row);
|
||||
$fields[$id] = ui_print_truncate_text($value, GENERIC_SIZE_TEXT, false, true, false);
|
||||
$fields[$id] = ui_print_truncate_text($value, $trucate_size, false, true, false);
|
||||
}
|
||||
|
||||
return html_print_select ($fields, $name, $selected, $script, $nothing, $nothing_value, $return, $multiple, $sort,'',$disabled, $style,'', $size);
|
||||
|
|
|
@ -1057,15 +1057,8 @@ function ui_process_page_head ($string, $bitfield) {
|
|||
|
||||
if ($config["refr"] > 0) {
|
||||
$query = ui_get_url_refresh (false);
|
||||
|
||||
|
||||
$HTTP_REFERER = '';
|
||||
if (isset($_SERVER['HTTP_REFERER']))
|
||||
$HTTP_REFERER = '&HTTP_REFERER=' . $_SERVER['HTTP_REFERER'];
|
||||
else if (isset($_GET['HTTP_REFERER']))
|
||||
$HTTP_REFERER = '&HTTP_REFERER=' . $_GET['HTTP_REFERER'];
|
||||
|
||||
$output .= '<meta http-equiv="refresh" content="'.$config["refr"].'; URL='.$query. $HTTP_REFERER .'" />';
|
||||
$output .= '<meta http-equiv="refresh" content="'.$config["refr"].'; URL=' . $query . '" />';
|
||||
}
|
||||
$output .= "\n\t";
|
||||
$output .= '<title>Pandora FMS - '.__('the Flexible Monitoring System').'</title>
|
||||
|
|
|
@ -44,6 +44,8 @@ if($delete_networkmap) {
|
|||
$message = ui_print_result_message ($result,
|
||||
__('Network map deleted successfully'),
|
||||
__('Could not delete network map'), '', true);
|
||||
|
||||
echo $message;
|
||||
|
||||
$id_networkmap = 0;
|
||||
}
|
||||
|
@ -220,6 +222,7 @@ if(!$nomaps && $id_networkmap != 0) {
|
|||
html_print_image("images/file.png", true, array ("title" => __('Save map'))) .'</a>');
|
||||
}
|
||||
|
||||
$title = '';
|
||||
switch($activeTab){
|
||||
case 'topology':
|
||||
$title = __('Topology view');
|
||||
|
|
|
@ -111,6 +111,9 @@ if (is_ajax ()) {
|
|||
|
||||
$nameAgents = db_get_all_rows_sql($sql);
|
||||
|
||||
if ($nameAgents == false)
|
||||
$nameAgents = array();
|
||||
|
||||
foreach ($nameAgents as $nameAgent) {
|
||||
$names[] = $nameAgent['name'];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue