diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index a2983b8841..a683b879b1 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,18 @@ +2013-04-25 Miguel de Dios + + * extensions/agents_modules.php: changed the header of the table + agents modules, now it uses css3 (and some tricks in javascript) + and the text for the modules is vertical. + + Fixes: #3539424 + + * operation/integria_incidents/incident.list.php, + operation/search_users.getdata.php, + godmode/servers/manage_recontask_form.php, + godmode/massive/massive_delete_action_alerts.php, + godmode/modules/manage_network_components_form.php: improved the + source code style. + 2013-04-25 Ramon Novoa * images/cross_double.png, diff --git a/pandora_console/extensions/agents_modules.php b/pandora_console/extensions/agents_modules.php index b20b8ecba1..83e3cbf638 100644 --- a/pandora_console/extensions/agents_modules.php +++ b/pandora_console/extensions/agents_modules.php @@ -85,12 +85,14 @@ function mainAgentsModules() { $comborefr = '
'; $comborefr .= ''.__('Refresh').''; $comborefr .= html_print_select ( - array('30' => '30 '.__('seconds'), + array('30' => '30 ' . __('seconds'), (string)SECONDS_1MINUTE => __('1 minute'), (string)SECONDS_2MINUTES => __('2 minutes'), (string)SECONDS_5MINUTES => __('5 minutes'), (string)SECONDS_10MINUTES => __('10 minutes')), - 'refr', (int)get_parameter('refr', 0), $script = 'this.form.submit()', '', 0, true, false, false, '', false, 'width: 100px; margin-right: 10px; margin-top: 5px;'); + 'refr', (int)get_parameter('refr', 0), + $script = 'this.form.submit()', '', 0, true, false, false, '', + false, 'width: 100px; margin-right: 10px; margin-top: 5px;'); $comborefr .= "
"; if ($config["pure"] == 0) { @@ -137,8 +139,8 @@ function mainAgentsModules() { $name = ''; $cont = 0; - foreach($all_modules as $key => $module) { - if($module == $name) { + foreach ($all_modules as $key => $module) { + if ($module == $name) { $modules_by_name[$cont-1]['id'][] = $key; } else { @@ -149,32 +151,35 @@ function mainAgentsModules() { } } - if($config["pure"] == 1) { + if ($config["pure"] == 1) { $block = count($modules_by_name); } $filter_groups = array ('offset' => (int) $offset, 'limit' => (int) $config['block_size']); - if($group_id > 0) { + if ($group_id > 0) { $filter_groups['id_grupo'] = $group_id; } $agents = agents_get_agents ($filter_groups); $nagents = count($agents); - if($all_modules == false || $agents == false) { + if ($all_modules == false || $agents == false) { echo "
".__('There are no agents with modules')."
"; return; } - echo ''; + echo '
'; - echo ""; + echo ""; - if($hor_offset > 0) { + echo ""; + + if ($hor_offset > 0) { $new_hor_offset = $hor_offset-$block; - echo ""; + echo ""; } $nmodules = 0; foreach ($modules_by_name as $module) { @@ -184,16 +189,26 @@ function mainAgentsModules() { continue; } - echo '"; + $text = ui_print_truncate_text(io_safe_output($module['name']), 'module_small'); + + echo ''; } - if(($hor_offset + $block) < $nmodules) { + if (($hor_offset + $block) < $nmodules) { $new_hor_offset = $hor_offset+$block; echo ""; } + echo ""; + $filter_agents = false; - if($group_id > 0) { + if ($group_id > 0) { $filter_agents = array('id_grupo' => $group_id); } // Prepare pagination @@ -307,6 +322,42 @@ function mainAgentsModules() { '' . "" . "

"; + + echo " + + + "; } extensions_add_operation_menu_option(__("Agents/Modules view"), 'estado', 'agents_modules/icon_menu.png', "v1r1"); diff --git a/pandora_console/godmode/massive/massive_delete_action_alerts.php b/pandora_console/godmode/massive/massive_delete_action_alerts.php index 6f47cb707d..c6a04a1976 100644 --- a/pandora_console/godmode/massive/massive_delete_action_alerts.php +++ b/pandora_console/godmode/massive/massive_delete_action_alerts.php @@ -61,7 +61,7 @@ if ($delete) { $agent_alerts = agents_get_alerts($id_agents); $alerts_agent_modules = array(); - foreach ($agent_alerts['simple'] as $agent_alert){ + foreach ($agent_alerts['simple'] as $agent_alert) { if (in_array($agent_alert['id_alert_template'], $id_alert_templates)) { $alerts_agent_modules = array_merge($alerts_agent_modules, alerts_get_alerts_agent_module ($agent_alert['id_agent_module'], true, false, 'id')); } @@ -192,7 +192,7 @@ $(document).ready (function () { update_alerts(); var recursion; - $("#checkbox-recursion").click(function (){ + $("#checkbox-recursion").click(function () { recursion = this.checked ? 1 : 0; $("#id_group").trigger("change"); }); diff --git a/pandora_console/godmode/modules/manage_network_components_form.php b/pandora_console/godmode/modules/manage_network_components_form.php index 95dcfe682c..fcf917311b 100644 --- a/pandora_console/godmode/modules/manage_network_components_form.php +++ b/pandora_console/godmode/modules/manage_network_components_form.php @@ -413,12 +413,12 @@ $(document).ready (function () { }); }); $("#submit-crt").click(function () { - $('#id_tag_selected option').map(function(){ + $('#id_tag_selected option').map(function() { $(this).attr('selected','selected'); }); }); $("#submit-upd").click(function () { - $('#id_tag_selected option').map(function(){ + $('#id_tag_selected option').map(function() { $(this).attr('selected','selected'); }); }); diff --git a/pandora_console/godmode/servers/manage_recontask_form.php b/pandora_console/godmode/servers/manage_recontask_form.php index 254b0ba602..ef03092ffc 100644 --- a/pandora_console/godmode/servers/manage_recontask_form.php +++ b/pandora_console/godmode/servers/manage_recontask_form.php @@ -54,8 +54,8 @@ if (isset ($_GET["update"]) or (isset($_GET["crt"]))) { // Edit mode } } - if ($update_recon){ - if (!isset($id_rt)){ + if ($update_recon) { + if (!isset($id_rt)) { $id_rt = (int) get_parameter_get ("update"); } $row = db_get_row ("trecon_task","id_rt",$id_rt); diff --git a/pandora_console/operation/integria_incidents/incident.list.php b/pandora_console/operation/integria_incidents/incident.list.php index b66b7f5a9d..ca12566440 100644 --- a/pandora_console/operation/integria_incidents/incident.list.php +++ b/pandora_console/operation/integria_incidents/incident.list.php @@ -41,8 +41,8 @@ if (isset ($result_groups['group'])) { $resolutions[0] = __('None'); -if (isset ($result_resolutions['resolution'])){ - foreach($result_resolutions['resolution'] as $res) { +if (isset ($result_resolutions['resolution'])) { + foreach ($result_resolutions['resolution'] as $res) { $resolutions[$res['id']] = $res['name']; } } diff --git a/pandora_console/operation/search_users.getdata.php b/pandora_console/operation/search_users.getdata.php index 2e39425683..0c12aaf14a 100644 --- a/pandora_console/operation/search_users.getdata.php +++ b/pandora_console/operation/search_users.getdata.php @@ -133,11 +133,11 @@ if ($searchUsers) { ORDER BY " . $order['field'] . " " . $order['order'] . " LIMIT " . $config['block_size'] . " OFFSET " . get_parameter ('offset',0); $users = db_process_sql($sql); - - if($users !== false) { + + if ($users !== false) { //Check ACLs $users_id = array(); - foreach($users as $key => $user){ + foreach ($users as $key => $user) { if (!check_acl ($config["id_user"], users_get_groups ($user["id_user"]), "UM") && $config["id_user"] != $user["id_user"]) { unset($users[$key]); }
".__("Agents")." / ".__("Modules")."
" . __("Agents") . " / " . __("Modules") . "".html_print_image("images/darrowleft.png",true, array('title' => __('Previous modules')))." " . + "".html_print_image("images/darrowleft.png",true, array('title' => __('Previous modules')))." '. html_print_image('images/information.png', true, array('title' => io_safe_output($module['name']))) ." +
+ +
+
".html_print_image("images/darrowright.png",true, array('title' => __('More modules')))."