From e4ba7ccde0eba5e97650858e7d247dded35da8e7 Mon Sep 17 00:00:00 2001 From: manuel Date: Thu, 21 Nov 2019 12:06:00 +0100 Subject: [PATCH] Added hint --- .../reporting/graph_builder.graph_editor.php | 77 +++++++------------ .../visual_console_builder.wizard.php | 6 +- 2 files changed, 31 insertions(+), 52 deletions(-) diff --git a/pandora_console/godmode/reporting/graph_builder.graph_editor.php b/pandora_console/godmode/reporting/graph_builder.graph_editor.php index 33cacc9bab..d69729eac9 100644 --- a/pandora_console/godmode/reporting/graph_builder.graph_editor.php +++ b/pandora_console/godmode/reporting/graph_builder.graph_editor.php @@ -59,52 +59,36 @@ switch ($action) { $resultOperationDB = false; } else if (!empty($ids_serialize)) { $ids = explode('|', $ids_serialize); - - switch ($config['dbtype']) { - case 'mysql': - $items = db_get_all_rows_sql( - ' - SELECT id_gs, `field_order` - FROM tgraph_source - WHERE id_graph = '.$id_graph.' - ORDER BY `field_order`' - ); - break; - } + $items = db_get_all_rows_sql( + 'SELECT id_gs, `field_order` + FROM tgraph_source + WHERE id_graph = '.$id_graph.' + ORDER BY `field_order`' + ); if ($items === false) { $items = []; } - // Clean the repeated order values + // Clean the repeated order values. $order_temp = 1; foreach ($items as $item) { - switch ($config['dbtype']) { - case 'mysql': - db_process_sql_update( - 'tgraph_source', - ['`field_order`' => $order_temp], - ['id_gs' => $item['id_rc']] - ); - break; - } + db_process_sql_update( + 'tgraph_source', + ['`field_order`' => $order_temp], + ['id_gs' => $item['id_rc']] + ); $order_temp++; } - - switch ($config['dbtype']) { - case 'mysql': - $items = db_get_all_rows_sql( - ' - SELECT id_gs, `field_order` - FROM tgraph_source - WHERE id_graph = '.$id_graph.' - ORDER BY `field_order`' - ); - break; - } + $items = db_get_all_rows_sql( + 'SELECT id_gs, `field_order` + FROM tgraph_source + WHERE id_graph = '.$id_graph.' + ORDER BY `field_order`' + ); if ($items === false) { $items = []; @@ -116,7 +100,7 @@ switch ($action) { $temp = []; foreach ($items as $item) { - // Remove the contents from the block to sort + // Remove the contents from the block to sort. if (array_search($item['id_gs'], $ids) === false) { $temp[$item['field_order']] = $item['id_gs']; } @@ -150,16 +134,11 @@ switch ($action) { foreach ($items as $order => $id) { - switch ($config['dbtype']) { - case 'mysql': - - db_process_sql_update( - 'tgraph_source', - ['`field_order`' => ($order + 1)], - ['id_gs' => $id] - ); - break; - } + db_process_sql_update( + 'tgraph_source', + ['`field_order`' => ($order + 1)], + ['id_gs' => $id] + ); } $resultOperationDB = true; @@ -211,7 +190,7 @@ if ($editGraph) { $weights = implode(',', $weight_array); } -// Modules table +// Modules table. if (count($module_array) > 0) { echo ""; echo ' @@ -224,7 +203,7 @@ if (count($module_array) > 0) { '; $color = 0; for ($a = 0; $a < count($module_array); $a++) { - // Calculate table line color + // Calculate table line color. if ($color == 1) { $tdcolor = 'datos'; $color = 0; @@ -332,7 +311,7 @@ echo ''; echo '
'; -// Configuration form +// Configuration form. echo ''; echo ""; @@ -352,7 +331,7 @@ echo "'; echo ''; -echo "'; +echo "'; echo ''; echo "'; echo ''; diff --git a/pandora_console/godmode/reporting/visual_console_builder.wizard.php b/pandora_console/godmode/reporting/visual_console_builder.wizard.php index 955d4f88a9..6079d4bb1d 100644 --- a/pandora_console/godmode/reporting/visual_console_builder.wizard.php +++ b/pandora_console/godmode/reporting/visual_console_builder.wizard.php @@ -15,7 +15,7 @@ global $config; check_login(); -// Visual console required +// Visual console required. if (empty($visualConsole)) { db_pandora_audit( 'ACL Violation', @@ -425,7 +425,7 @@ $table->data['all_one_item_per_agent'][1] .= html_print_input_hidden( $table->rowstyle['all_4'] = 'display: none;'; -$table->data['all_4'][0] = __('Agents'); +$table->data['all_4'][0] = __('Agents').ui_print_help_tip(__('If you select several agents, only the common modules will be displayed'), true); $agents_list = []; if (!is_metaconsole()) { @@ -506,7 +506,7 @@ $table->data['all_8'][1] = html_print_select( VISUAL_MAP_WIZARD_PARENTS_NONE, true ); -$table->data['all_8'][2] = ''.__('Item in the map').''.''.ui_print_help_tip( +$table->data['all_8'][2] = ''.__('Item in the map').''.ui_print_help_tip( __('The parenting relationships in %s will be drawn on the map.', get_product_name()), true ).'';
'.__('Sort').'
".html_print_select_groups( true ).'
".__('Agents').'".__('Agents').ui_print_help_tip(__('If you select several agents, only the common modules will be displayed'), true).'".__('Modules').'