diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index d2efde8013..77897169d4 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,17 @@ +2012-03-08 Miguel de Dios <miguel.dedios@artica.es> + + * pandoradb.sql, pandoradb.postgreSQL.sql, pandoradb.oracle.sql, + extras/pandoradb_migrate_4.0.x_to_4.1.mysql.sql, + extras/pandoradb_migrate_4.0.x_to_4.1.oracle.sql, + extras/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql: added the field + shortcut_data for to save as serialize the quick links. + + * general/shortcut_bar.php: added code to new feature to save in the + sortcut the important links for quick access. + + * include/functions_menu.php, godmode/agentes/modificar_agente.php: added + class "item_drag_shortcut" to links for drag to shorcut. For make a example. + 2012-03-08 Sancho Lerena <slerena@artica.es> * include/functions_visual_map.php diff --git a/pandora_console/extras/pandoradb_migrate_4.0.x_to_4.1.mysql.sql b/pandora_console/extras/pandoradb_migrate_4.0.x_to_4.1.mysql.sql index 264da47bfc..efd97b651e 100644 --- a/pandora_console/extras/pandoradb_migrate_4.0.x_to_4.1.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_4.0.x_to_4.1.mysql.sql @@ -55,6 +55,7 @@ CREATE TABLE IF NOT EXISTS `tnetflow_report_content` ( ALTER TABLE `tusuario` ADD COLUMN `disabled` int(4) NOT NULL DEFAULT 0; ALTER TABLE `tusuario` ADD COLUMN `shortcut` tinyint(1) DEFAULT 0; +ALTER TABLE tusuario ADD COLUMN `shortcut_data` text default ''; -- ----------------------------------------------------- -- Table `tincidencia` diff --git a/pandora_console/extras/pandoradb_migrate_4.0.x_to_4.1.oracle.sql b/pandora_console/extras/pandoradb_migrate_4.0.x_to_4.1.oracle.sql index 3fcd842ca2..a995a02ef8 100644 --- a/pandora_console/extras/pandoradb_migrate_4.0.x_to_4.1.oracle.sql +++ b/pandora_console/extras/pandoradb_migrate_4.0.x_to_4.1.oracle.sql @@ -168,9 +168,15 @@ ALTER TABLE tgraph ADD (id_graph_template NUMBER(11, 0) default 0 NOT NULL); -- Table `ttipo_modulo` -- ----------------------------------------------------- UPDATE ttipo_modulo SET descripcion='Generic data' WHERE id_tipo=1; - UPDATE ttipo_modulo SET descripcion='Generic data incremental' WHERE id_tipo=4; +-- ----------------------------------------------------- +-- Table `tusuario` +-- ----------------------------------------------------- +ALTER TABLE tusuario ADD COLUMN disabled NUMBER(10, 0) NOT NULL DEFAULT 0; +ALTER TABLE tusuario ADD COLUMN shortcut NUMBER(5, 0) DEFAULT 0; +ALTER TABLE tusuario ADD COLUMN shortcut_data CLOB default ''; + -- ----------------------------------------------------- -- Table `tusuario` -- ----------------------------------------------------- diff --git a/pandora_console/extras/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql b/pandora_console/extras/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql index 1e40909a17..ed90731e0e 100644 --- a/pandora_console/extras/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql +++ b/pandora_console/extras/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql @@ -155,9 +155,15 @@ ALTER TABLE "tgraph" ADD COLUMN "id_graph_template" INTEGER NOT NULL default 0; -- Table `ttipo_modulo` -- ----------------------------------------------------- UPDATE "ttipo_modulo" SET "descripcion"='Generic data' WHERE "id_tipo"=1; - UPDATE "ttipo_modulo" SET "descripcion"='Generic data incremental' WHERE "id_tipo"=4; +-- ----------------------------------------------------- +-- Table `tusuario` +-- ----------------------------------------------------- +ALTER TABLE "tusuario" ADD COLUMN "disabled" INTEGER NOT NULL DEFAULT 0; +ALTER TABLE "tusuario" ADD COLUMN "shortcut" SMALLINT DEFAULT 0; +ALTER TABLE "tusuario" ADD COLUMN "shortcut_data" text default ''; + -- ----------------------------------------------------- -- Table `tusuario` -- ----------------------------------------------------- diff --git a/pandora_console/general/shortcut_bar.php b/pandora_console/general/shortcut_bar.php index 1f03f79ab1..a3a445774c 100644 --- a/pandora_console/general/shortcut_bar.php +++ b/pandora_console/general/shortcut_bar.php @@ -14,215 +14,268 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. - $shortcut_state = db_get_value_filter('shortcut', 'tusuario', array('id_user' => $config['id_user'])); +global $config; - // If shortcut bar is disabled return to index.php - if ($shortcut_state == 0) - return; +// Login check +check_login (); - if (is_ajax()) { - require_once("include/functions_events.php"); +if (is_ajax()){ + require_once("include/functions_reporting.php"); + + $save_item_shorcut = get_parameter("save_item_shorcut", 0); + + if ($save_item_shorcut) { + $data = get_parameter("data", ''); + $id_user = get_parameter('id_user', 0); + if ($config['id_user'] != $id_user) return; - $update_shortcut_state = get_parameter('update_shortcut_state', 0); - $get_critical_events = get_parameter('get_critical_events', 0); - $get_opened_incidents = get_parameter('get_opened_incidents', 0); - - // Update if shortcut is visible or hidden - if ($update_shortcut_state){ - $value = get_parameter('value', 0); - db_process_sql_update('tusuario', array('shortcut' => $value), array('id_user' => $config['id_user'])); + $shortcut_data = db_get_value('shortcut_data', 'tusuario', 'id_user', $id_user); + if ($shortcut_data !== false) { + $serialize = $shortcut_data; + $unserialize = json_decode($serialize, true); + + $unserialize['item_shorcut'][] = $data; + $shortcut_data = array(); + $shortcut_data['shortcut_data'] = json_encode($unserialize); + + db_process_sql_update('tusuario', $shortcut_data, array('id_user' => $id_user)); } - - // Get critical events (realtime update) - if ($get_critical_events){ - $own_info = get_user_info ($config['id_user']); - - if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM")) - $own_groups = array_keys(users_get_groups($config['id_user'], "IR")); - else - $own_groups = array_keys(users_get_groups($config['id_user'], "IR", false)); - - // Get events in the last 8 hours - $shortcut_events_update = events_get_group_events($own_groups, 28800, time()); - if ($shortcut_events_update == false) - $shortcut_events_update = array(); - - $critical_events_update = 0; - foreach($shortcut_events_update as $event_update){ - if ($event_update['criticity'] == 4 and $event_update['estado'] == 0){ - $critical_events_update++; - } - } - - echo $critical_events_update; - } - - // Select only opened incidents - if ($get_opened_incidents){ - $own_info = get_user_info ($config['id_user']); - - if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM")) - $own_groups = array_keys(users_get_groups($config['id_user'], "IR")); - else - $own_groups = array_keys(users_get_groups($config['id_user'], "IR", false)); - - $sql = "SELECT count(*) total_incidents FROM tincidencia WHERE - id_grupo IN (".implode (",",array_keys ($own_groups)).") AND estado IN (0) - ORDER BY actualizacion"; - - - if (!empty($own_groups)){ - $result_incidents_update = db_get_all_rows_sql ($sql); - } - else{ - $result_incidents_update = false; - } - - if ($result_incidents_update === false) - $shortcut_incidents = 0; - else - $shortcut_incidents = $result_incidents_update[0]['total_incidents']; - - echo $shortcut_incidents; - } - - return; } + + return; +} +$shortcut_state = db_get_value_filter('shortcut', 'tusuario', array('id_user' => $config['id_user'])); - if ($shortcut_state == 2){ - echo "<div id='shortcut_button' style='position: fixed; overflow: hidden; bottom: 0px; left: 0px; width: 185px; height: 40px; background-color: #FFFFFF; border: 1px solid #808080; border-top-left-radius: 10px; border-top-right-radius: 10px;'>"; +// If shortcut bar is disabled return to index.php +if ($shortcut_state == 0) + return; + +if (is_ajax()) { + require_once("include/functions_events.php"); + + + $update_shortcut_state = get_parameter('update_shortcut_state', 0); + $get_critical_events = get_parameter('get_critical_events', 0); + $get_opened_incidents = get_parameter('get_opened_incidents', 0); + + // Update if shortcut is visible or hidden + if ($update_shortcut_state){ + $value = get_parameter('value', 0); + db_process_sql_update('tusuario', array('shortcut' => $value), array('id_user' => $config['id_user'])); } - else{ - echo "<div id='shortcut_button' style='position: fixed; overflow: hidden; bottom: 0px; left: 0px; width: 185px; height: 0px; background-color: #FFFFFF; border: 1px solid #808080; border-top-left-radius: 10px; border-top-right-radius: 10px;'>"; - } - html_print_image("images/pandora_textlogo.png", false, array("title" => __("Press here to activate shortcut bar"))); - echo "</div>"; - if ($shortcut_state == 2){ - echo "<div id='shotcut_bar' style='position: fixed; overflow:hidden; bottom: 0px; left: 0px; width:100%; height: 20px; background-color:#DCDCDC; border: 1px solid #808080;'>"; - } - else { - echo "<div id='shotcut_bar' style='position: fixed; overflow:hidden; bottom: 0px; left: 0px; width:100%; height: 0px; background-color:#DCDCDC; border: 1px solid #808080;'>"; - } - - echo " "; - $own_info = get_user_info ($config['id_user']); - - // If user is admin can see all groups - if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM")){ - echo "<a href='index.php?sec=estado&sec2=operation/agentes/alerts_status&refr=120&filter=fired&free_search=&filter_button=Filter'>"; - } - else{ - $own_groups = array_keys(users_get_groups($config['id_user'], "AR", false)); - if (!empty($own_groups)){ - $alerts_group = array_shift($own_groups); - echo "<a href='index.php?sec=estado&sec2=operation/agentes/alerts_status&refr=120&filter=fired&free_search=&ag_group=$alerts_group&filter_button=Filter'>"; - } - } - html_print_image("images/bell.png", false, array("title" => __("Alerts fired"), "style" => "margin-bottom: -5px;")); - echo " "; - - // Calculate alerts fired - $data_reporting = reporting_get_group_stats(); - - echo "<span id='shortcut_alerts_fired' style='font-size: 9pt; color:#696969; font-weight: bold;' title='" . __('Alerts fired') . "'>" . $data_reporting['monitor_alerts_fired'] . "</span>"; - if (!empty($own_groups)){ - echo "</a>"; - } - echo " "; - - $own_info = get_user_info ($config['id_user']); - - // If user is admin can see all groups - if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM")){ - echo "<a href='index.php?sec=eventos&sec2=operation/events/events&status=3&severity=4&event_view_hr=8&ev_group=0&group_rep=1&filter_only_alert=-1'>"; - } - else { - $own_groups = array_keys(users_get_groups($config['id_user'], "IR", false)); - if (!empty($own_groups)){ - $events_group = array_shift($own_groups); - echo "<a href='index.php?sec=eventos&sec2=operation/events/events&status=3&severity=4&event_view_hr=8&ev_group=0&group_rep=1&ev_group=$events_group&filter_only_alert=-1'>"; - } - } - html_print_image("images/lightning_go.png", false, array("title" => __("Critical events"), "style" => "margin-bottom: -5px;")); - echo " "; - - // Calculate critical events (not validated) + + // Get critical events (realtime update) + if ($get_critical_events){ $own_info = get_user_info ($config['id_user']); if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM")) $own_groups = array_keys(users_get_groups($config['id_user'], "IR")); else $own_groups = array_keys(users_get_groups($config['id_user'], "IR", false)); - + // Get events in the last 8 hours - $shortcut_events = events_get_group_events($own_groups, 28800, time()); - if ($shortcut_events == false) - $shortcut_events = array(); + $shortcut_events_update = events_get_group_events($own_groups, 28800, time()); + if ($shortcut_events_update == false) + $shortcut_events_update = array(); + + $critical_events_update = 0; + foreach($shortcut_events_update as $event_update){ + if ($event_update['criticity'] == 4 and $event_update['estado'] == 0) { + $critical_events_update++; + } + } + + echo $critical_events_update; + } - $critical_events = 0; - foreach($shortcut_events as $event){ - if ($event['criticity'] == 4 and $event['estado'] == 0){ - $critical_events++; - } - } + // Select only opened incidents + if ($get_opened_incidents) { + $own_info = get_user_info ($config['id_user']); - echo "<span id='shortcut_critical_events' style='font-size: 9pt; color:#696969; font-weight: bold;' title='" . __('Critical events') . "'>" . $critical_events . "</span>"; - echo "</a>"; - echo " "; - // Calculate opened incidents (id integria incidents are not enabled) - if ($config['integria_enabled'] == 0){ - echo "<a href='index.php?sec=incidencias&sec2=operation/incidents/incident&estado=0'>"; - html_print_image("images/book_edit.png", false, array("title" => __("Incidents opened"), "style" => "margin-bottom: -5px;")); - echo " "; - // Select only opened incidents - $sql = "SELECT count(*) total_incidents FROM tincidencia WHERE - id_grupo IN (".implode (",",array_keys ($own_groups)).") AND estado IN (0) - ORDER BY actualizacion"; - - if (!empty($own_groups)){ - $result_incidents = db_get_all_rows_sql ($sql); - } - else { - $result_incidents = false; - } - - if ($result_incidents === false) - $shortcut_incidents = 0; - else - $shortcut_incidents = $result_incidents[0]['total_incidents']; - - - echo "<span id='shortcut_incidents_opened' style='font-size: 9pt; color:#696969; font-weight: bold;' title='" . __('Incidents opened') . "'>" . $shortcut_incidents . "</span>"; - echo "</a>"; - echo " "; - } - echo " "; - echo "<span style='font-size: 9pt; color:#696969; font-weight: bold;'>|</span>"; - echo " "; - echo " "; + if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM")) + $own_groups = array_keys(users_get_groups($config['id_user'], "IR")); + else + $own_groups = array_keys(users_get_groups($config['id_user'], "IR", false)); - echo "<a href='index.php?sec=reporting&sec2=operation/reporting/custom_reporting'>"; - html_print_image("images/reporting.png", false, array("title" => __("View reports"), "style" => "margin-bottom: -5px;")); - echo "</a>"; - - echo " "; - - echo "<a href='index.php?sec=messages&sec2=operation/messages/message'>"; - html_print_image("images/email.png", false, array("title" => __("Create new message"), "style" => "margin-bottom: -5px;")); - echo "</a>"; - - // Login in Console and shortcut bar is disabled - // This will show and hide the shortcut value in Javascript code - if (isset($_POST['nick']) and $shortcut_state != 2){ - html_print_input_hidden("login_console", 1); + $sql = "SELECT count(*) total_incidents FROM tincidencia WHERE + id_grupo IN (".implode (",",array_keys ($own_groups)).") AND estado IN (0) + ORDER BY actualizacion"; + + + if (!empty($own_groups)) { + $result_incidents_update = db_get_all_rows_sql ($sql); } else { - html_print_input_hidden("login_console", 0); + $result_incidents_update = false; } + + if ($result_incidents_update === false) + $shortcut_incidents = 0; + else + $shortcut_incidents = $result_incidents_update[0]['total_incidents']; - html_print_input_hidden("shortcut_id_user", $config['id_user']); - echo "</div>"; + echo $shortcut_incidents; + } + + return; +} + +if ($shortcut_state == 2) { + echo "<div id='shortcut_button' style='position: fixed; overflow: hidden; bottom: 0px; left: 0px; width: 185px; height: 40px; background-color: #FFFFFF; border: 1px solid #808080; border-top-left-radius: 10px; border-top-right-radius: 10px;'>"; +} +else{ + echo "<div id='shortcut_button' style='position: fixed; overflow: hidden; bottom: 0px; left: 0px; width: 185px; height: 0px; background-color: #FFFFFF; border: 1px solid #808080; border-top-left-radius: 10px; border-top-right-radius: 10px;'>"; +} + html_print_image("images/pandora_textlogo.png", false, array("title" => __("Press here to activate shortcut bar"))); +echo "</div>"; +if ($shortcut_state == 2) { + echo "<div id='shotcut_bar' style='position: fixed; overflow:hidden; bottom: 0px; left: 0px; width:100%; height: 20px; background-color:#DCDCDC; border: 1px solid #808080;'>"; +} +else { + echo "<div id='shotcut_bar' style='position: fixed; overflow:hidden; bottom: 0px; left: 0px; width:100%; height: 0px; background-color:#DCDCDC; border: 1px solid #808080;'>"; +} + +echo " "; +$own_info = get_user_info ($config['id_user']); + +// If user is admin can see all groups +if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM")){ + echo "<a href='index.php?sec=estado&sec2=operation/agentes/alerts_status&refr=120&filter=fired&free_search=&filter_button=Filter'>"; +} +else { + $own_groups = array_keys(users_get_groups($config['id_user'], "AR", false)); + if (!empty($own_groups)) { + $alerts_group = array_shift($own_groups); + echo "<a href='index.php?sec=estado&sec2=operation/agentes/alerts_status&refr=120&filter=fired&free_search=&ag_group=$alerts_group&filter_button=Filter'>"; + } +} +html_print_image("images/bell.png", false, array("title" => __("Alerts fired"), "style" => "margin-bottom: -5px;")); +echo " "; + +// Calculate alerts fired +$data_reporting = reporting_get_group_stats(); + +echo "<span id='shortcut_alerts_fired' style='font-size: 9pt; color:#696969; font-weight: bold;' title='" . __('Alerts fired') . "'>" . $data_reporting['monitor_alerts_fired'] . "</span>"; +if (!empty($own_groups)){ + echo "</a>"; +} +echo " "; + +$own_info = get_user_info ($config['id_user']); + +// If user is admin can see all groups +if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM")){ + echo "<a href='index.php?sec=eventos&sec2=operation/events/events&status=3&severity=4&event_view_hr=8&ev_group=0&group_rep=1&filter_only_alert=-1'>"; +} +else { + $own_groups = array_keys(users_get_groups($config['id_user'], "IR", false)); + if (!empty($own_groups)){ + $events_group = array_shift($own_groups); + echo "<a href='index.php?sec=eventos&sec2=operation/events/events&status=3&severity=4&event_view_hr=8&ev_group=0&group_rep=1&ev_group=$events_group&filter_only_alert=-1'>"; + } +} +html_print_image("images/lightning_go.png", false, array("title" => __("Critical events"), "style" => "margin-bottom: -5px;")); +echo " "; + +// Calculate critical events (not validated) +$own_info = get_user_info ($config['id_user']); + +if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM")) + $own_groups = array_keys(users_get_groups($config['id_user'], "IR")); +else + $own_groups = array_keys(users_get_groups($config['id_user'], "IR", false)); + +// Get events in the last 8 hours +$shortcut_events = events_get_group_events($own_groups, 28800, time()); +if ($shortcut_events == false) + $shortcut_events = array(); + +$critical_events = 0; +foreach($shortcut_events as $event){ + if ($event['criticity'] == 4 and $event['estado'] == 0){ + $critical_events++; + } +} + +echo "<span id='shortcut_critical_events' style='font-size: 9pt; color:#696969; font-weight: bold;' title='" . __('Critical events') . "'>" . $critical_events . "</span>"; +echo "</a>"; +echo " "; +// Calculate opened incidents (id integria incidents are not enabled) +if ($config['integria_enabled'] == 0){ + echo "<a href='index.php?sec=incidencias&sec2=operation/incidents/incident&estado=0'>"; + html_print_image("images/book_edit.png", false, array("title" => __("Incidents opened"), "style" => "margin-bottom: -5px;")); + echo " "; + // Select only opened incidents + $sql = "SELECT count(*) total_incidents FROM tincidencia WHERE + id_grupo IN (".implode (",",array_keys ($own_groups)).") AND estado IN (0) + ORDER BY actualizacion"; + + if (!empty($own_groups)) { + $result_incidents = db_get_all_rows_sql ($sql); + } + else { + $result_incidents = false; + } + + if ($result_incidents === false) + $shortcut_incidents = 0; + else + $shortcut_incidents = $result_incidents[0]['total_incidents']; + + + echo "<span id='shortcut_incidents_opened' style='font-size: 9pt; color:#696969; font-weight: bold;' title='" . __('Incidents opened') . "'>" . $shortcut_incidents . "</span>"; + echo "</a>"; + echo " "; +} +echo " "; +echo "<span style='font-size: 9pt; color:#696969; font-weight: bold;'>|</span>"; +echo " "; +echo " "; + +echo "<a href='index.php?sec=reporting&sec2=operation/reporting/custom_reporting'>"; +html_print_image("images/reporting.png", false, array("title" => __("View reports"), "style" => "margin-bottom: -5px;")); +echo "</a>"; + +echo " "; + +echo "<a href='index.php?sec=messages&sec2=operation/messages/message'>"; +html_print_image("images/email.png", false, array("title" => __("Create new message"), "style" => "margin-bottom: -5px;")); +echo "</a>"; + +// Login in Console and shortcut bar is disabled +// This will show and hide the shortcut value in Javascript code +if (isset($_POST['nick']) and $shortcut_state != 2){ + html_print_input_hidden("login_console", 1); +} +else { + html_print_input_hidden("login_console", 0); +} + +html_print_input_hidden("shortcut_id_user", $config['id_user']); + + +//Quick access +$shortcut_data = db_get_value('shortcut_data', 'tusuario', 'id_user', $config['id_user']); +if (!empty($shortcut_data)) { + $serialize = $shortcut_data; + $unserialize = json_decode($serialize, true); + + $items = $unserialize['item_shorcut']; +} +else { + $items = array(); +} +echo "<div id='shortcut_icons_box' style='font-size: 9pt; color:#696969; font-weight: bold; display: inline; float: right; padding-right: 20px;'>" . + __("Shortcut: "); +echo "<ul style='display: inline; font-size: 9pt; color:#000;'>"; +foreach ($items as $item) { + echo "<li style='display: inline; padding-right: 10px;'>" . io_safe_output($item) . "</li>"; +} +echo "</ul>"; +echo "</div>"; + +echo "</div>"; ?> @@ -308,8 +361,42 @@ } $(document).ready (function () { + //TODO: Fix the change the content for the menu as html. setInterval("shortcut_check_alerts()", (10 * 1000)); //10 seconds between ajax request setInterval("shortcut_check_events()", (10 * 1000)); //10 seconds between ajax request setInterval("shortcut_check_incidents()", (10 * 1000)); //10 seconds between ajax request + + //For to make a link as item for drag only put "item_drag_shortcut" as class. + + //TODO: In the future show better as icons and the handle some icon. + //TODO: Remove the class "item_drag_shortcut" for avoid drag. + //TODO: Method for remove items. + + $("#shortcut_icons_box").droppable({ + drop: function( event, ui ) { + var item = ui.draggable.clone(); + //unescape for avoid change returns + var content_item = unescape($('<div id="content_item"></div>').html(item).html()); //hack + + //Add the element + $("<li style='display: inline; padding-right: 10px;'></li>").html(item).appendTo($("#shortcut_icons_box > ul")); + + jQuery.post ('ajax.php', + {"page": "general/shortcut_bar", + "save_item_shorcut": 1, + "id_user": "<?php echo $config['id_user'];?>", + "data": content_item + }, + function (data) { + } + ); + } + }); + + $(".item_drag_shortcut").draggable({ + appendTo: 'body', + helper: "clone", + scroll: false + }); }); </script> diff --git a/pandora_console/godmode/agentes/modificar_agente.php b/pandora_console/godmode/agentes/modificar_agente.php index 6b6fc1a56d..adea3c8ef3 100644 --- a/pandora_console/godmode/agentes/modificar_agente.php +++ b/pandora_console/godmode/agentes/modificar_agente.php @@ -401,7 +401,7 @@ if ($agents !== false) { echo "<em>"; } echo '<span class="left">'; - echo "<strong><a href='index.php?sec=gagente& + echo "<strong><a class='item_drag_shortcut' href='index.php?sec=gagente& sec2=godmode/agentes/configurar_agente&tab=main& id_agente=".$agent["id_agente"]."'>" . ui_print_truncate_text($agent["nombre"], 60, true, true, true, '[…]', 'font-size: 7pt')."</a></strong>"; if ($agent["disabled"]) { diff --git a/pandora_console/include/functions_menu.php b/pandora_console/include/functions_menu.php index 37b794a64f..03b5741e43 100644 --- a/pandora_console/include/functions_menu.php +++ b/pandora_console/include/functions_menu.php @@ -184,7 +184,7 @@ function menu_print_menu (&$menu) { } else { $title = ''; } - $submenu_output .= '<a href="index.php?'.$extensionInMenu.'sec='.$secUrl.'&sec2='.$subsec2.($sub["refr"] ? '&refr=' . $sub["refr"] : '').$link_add.'"' . $title . '>'.$sub["text"].'</a>'; + $submenu_output .= '<a class="item_drag_shortcut" href="index.php?'.$extensionInMenu.'sec='.$secUrl.'&sec2='.$subsec2.($sub["refr"] ? '&refr=' . $sub["refr"] : '').$link_add.'"' . $title . '>'.$sub["text"].'</a>'; $submenu_output .= '</li>'; } } diff --git a/pandora_console/pandoradb.oracle.sql b/pandora_console/pandoradb.oracle.sql index ce928dba75..c65396d2c0 100644 --- a/pandora_console/pandoradb.oracle.sql +++ b/pandora_console/pandoradb.oracle.sql @@ -869,6 +869,7 @@ CREATE TABLE tusuario ( id_skin NUMBER(10, 0) DEFAULT 0 NOT NULL, disabled NUMBER(10, 0) default 0 NOT NULL, shortcut NUMBER(5, 0) DEFAULT 0, + shortcut_data CLOB default '', section VARCHAR2(255) NOT NULL, data_section VARCHAR2(255) NOT NULL ); diff --git a/pandora_console/pandoradb.postgreSQL.sql b/pandora_console/pandoradb.postgreSQL.sql index b9e70229bd..02676785bc 100644 --- a/pandora_console/pandoradb.postgreSQL.sql +++ b/pandora_console/pandoradb.postgreSQL.sql @@ -699,6 +699,7 @@ CREATE TABLE "tusuario" ( "id_skin" INTEGER NOT NULL DEFAULT 0, "disabled" INTEGER NOT NULL default 1, "shortcut" SMALLINT DEFAULT 0, + "shortcut_data" text default '', "section" varchar(255) NOT NULL, "data_section" varchar(255) NOT NULL ); diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 0fb9348179..3f05e9acfd 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -774,6 +774,7 @@ CREATE TABLE IF NOT EXISTS `tusuario` ( `id_skin` int(10) unsigned NOT NULL, `disabled` int(4) NOT NULL DEFAULT 0, `shortcut` tinyint(1) DEFAULT 0, + `shortcut_data` text default '', `section` TEXT NOT NULL, `data_section` TEXT NOT NULL, UNIQUE KEY `id_user` (`id_user`)