diff --git a/pandora_console/include/class/AgentsAlerts.class.php b/pandora_console/include/class/AgentsAlerts.class.php index 41a75ffa8a..c2d8604bef 100644 --- a/pandora_console/include/class/AgentsAlerts.class.php +++ b/pandora_console/include/class/AgentsAlerts.class.php @@ -548,10 +548,7 @@ class AgentsAlerts extends HTML if (empty($templates_raw)) { $templates_raw = []; } - } - - // Is needed sort templates for show in the row. - sort($templates); + }; $alerts = []; $ntemplates = 0; @@ -600,20 +597,22 @@ class AgentsAlerts extends HTML } $templates[$temp['id']] = $temp['name']; + } + } - if (empty($temp['name']) === false) { - $outputLine = html_print_div( - [ - 'id' => 'line_header_'.$temp['id'], - 'class' => 'rotate_text_module position_text_module', - 'style' => '', - 'content' => '
'.ui_print_truncate_text(io_safe_output($temp['name']), 20).'
', - ], - true - ); + foreach ($templates as $id => $name) { + if (empty($name) === false) { + $outputLine = html_print_div( + [ + 'id' => 'line_header_'.$id, + 'class' => 'rotate_text_module position_text_module', + 'style' => '', + 'content' => '
'.ui_print_truncate_text(io_safe_output($name), 20).'
', + ], + true + ); - echo sprintf('%s', $thSize, $outputLine); - } + echo sprintf('%s', $thSize, $outputLine); } } @@ -651,7 +650,7 @@ class AgentsAlerts extends HTML $alias = db_get_row('tagente', 'id_agente', $agent['id_agente']); echo ''; // Name of the agent. - echo ''.$alias['alias'].''; + echo ''.$alias['alias'].''; // Alerts of the agent. foreach ($templates as $tid => $tname) { $anyfired = 0; diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index e7b8e246c4..3b1b1bf126 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -467,10 +467,9 @@ function html_print_select_groups( $output = ''; global $config; + $select2_css = 'select2.min'; - if ($config['style'] === 'pandora') { - $select2_css = 'select2.min'; - } else { + if ($config['style'] === 'pandora_black') { $select2_css = 'select2_dark.min'; }