From a209fc95ec16cf8709bb6bd3e5ded79ee79217a2 Mon Sep 17 00:00:00 2001
From: Pablo Aragon <pablo.aragon@pandorafms.com>
Date: Thu, 25 Apr 2024 12:57:47 +0200
Subject: [PATCH] 13614-Fix icon color dark theme in General search

---
 pandora_console/operation/search_main.php    |  6 +--
 pandora_console/operation/search_results.php | 42 +++++++++++++++-----
 2 files changed, 36 insertions(+), 12 deletions(-)

diff --git a/pandora_console/operation/search_main.php b/pandora_console/operation/search_main.php
index c565007e2f..099409bcf7 100644
--- a/pandora_console/operation/search_main.php
+++ b/pandora_console/operation/search_main.php
@@ -133,16 +133,16 @@ $table->data[0][3] = "<a href='index.php?search_category=modules&keywords=".$con
 // ~ $table->data[0][5] = "<a href='index.php?search_category=alerts&keywords=" . $config['search_keywords'] . "&head_search_keywords=Search'>" .
     // ~ sprintf(__("%s Found"), $totalAlerts) . "</a>";
 // ---------------------------------------------------------------------
-$table->data[0][6] = html_print_image('images/input_user.png', true, ['title' => __('Users found'), 'class' => 'invert_filter']);
+$table->data[0][6] = html_print_image('images/input_user.png', true, ['title' => __('Users found')]);
 $table->data[0][7] = "<a href='index.php?search_category=users&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".sprintf(__('%s Found'), $totalUsers).'</a>';
 $table->data[0][8] = html_print_image('images/chart_curve.png', true, ['title' => __('Graphs found'), 'class' => 'invert_filter']);
 $table->data[0][9] = "<a href='index.php?search_category=graphs&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".sprintf(__('%s Found'), $totalGraphs).'</a>';
 $table->data[0][10] = html_print_image('images/reporting.png', true, ['title' => __('Reports found'), 'class' => 'invert_filter']);
 $table->data[0][11] = "<a href='index.php?search_category=reports&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".sprintf(__('%s Found'), $totalReports).'</a>';
-$table->data[0][12] = html_print_image('images/visual_console_green.png', true, ['title' => __('Visual consoles')]);
+$table->data[0][12] = html_print_image('images/visual_console_green.png', true, ['title' => __('Visual consoles'), 'class' => 'main_menu_icon invert_filter']);
 $table->data[0][13] = "<a href='index.php?search_category=maps&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".sprintf(__('%s Found'), $totalMaps).'</a>';
 if (enterprise_installed()) {
-    $table->data[0][14] = html_print_image('images/policy@svg.svg', true, ['title' => __('Policies'), 'class' => 'main_menu_icon']);
+    $table->data[0][14] = html_print_image('images/policy@svg.svg', true, ['title' => __('Policies'), 'class' => 'main_menu_icon invert_filter']);
     $table->data[0][15] = "<a href='index.php?search_category=policies&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".sprintf(__('%s Found'), $totalPolicies).'</a>';
 }
 
diff --git a/pandora_console/operation/search_results.php b/pandora_console/operation/search_results.php
index 38ae15be1c..6bf3e7766e 100644
--- a/pandora_console/operation/search_results.php
+++ b/pandora_console/operation/search_results.php
@@ -66,7 +66,10 @@ if ($searchMain) {
         'text'   => "<a href='index.php?search_category=main&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".html_print_image(
             'images/zoom_mc.png',
             true,
-            ['title' => __('Global search')]
+            [
+                'title' => __('Global search'),
+                'class' => 'main_menu_icon invert_filter',
+            ]
         ).'</a>',
         'active' => $searchTab == 'main',
     ];
@@ -79,7 +82,10 @@ if ($searchAgents) {
         'text'   => "<a href='index.php?search_category=agents&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".html_print_image(
             'images/op_monitoring.png',
             true,
-            ['title' => __('Agents')]
+            [
+                'title' => __('Agents'),
+                'class' => 'main_menu_icon invert_filter',
+            ]
         ).'</a>',
         'active' => $searchTab == 'agents',
     ];
@@ -92,7 +98,10 @@ if ($searchUsers) {
         'text'   => "<a href='index.php?search_category=users&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".html_print_image(
             'images/op_workspace.png',
             true,
-            ['title' => __('Users')]
+            [
+                'title' => __('Users'),
+                'class' => 'main_menu_icon invert_filter',
+            ]
         ).'</a>',
         'active' => $searchTab == 'users',
     ];
@@ -105,7 +114,10 @@ if ($searchAlerts) {
         'text'   => "<a href='index.php?search_category=alerts&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".html_print_image(
             'images/op_alerts.png',
             true,
-            ['title' => __('Alerts')]
+            [
+                'title' => __('Alerts'),
+                'class' => 'main_menu_icon invert_filter',
+            ]
         ).'</a>',
         'active' => $searchTab == 'alerts',
     ];
@@ -118,7 +130,10 @@ if ($searchGraphs) {
         'text'   => "<a href='index.php?search_category=graphs&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".html_print_image(
             'images/chart.png',
             true,
-            ['title' => __('Graphs')]
+            [
+                'title' => __('Graphs'),
+                'class' => 'main_menu_icon invert_filter',
+            ]
         ).'</a>',
         'active' => $searchTab == 'graphs',
     ];
@@ -131,7 +146,10 @@ if ($searchReports) {
         'text'   => "<a href='index.php?search_category=reports&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".html_print_image(
             'images/op_reporting.png',
             true,
-            ['title' => __('Reports')]
+            [
+                'title' => __('Reports'),
+                'class' => 'main_menu_icon invert_filter',
+            ]
         ).'</a>',
         'active' => $searchTab == 'reports',
     ];
@@ -144,7 +162,10 @@ if ($searchMaps) {
         'text'   => "<a href='index.php?search_category=maps&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".html_print_image(
             'images/visual_console.png',
             true,
-            ['title' => __('Visual consoles')]
+            [
+                'title' => __('Visual consoles'),
+                'class' => 'main_menu_icon invert_filter',
+            ]
         ).'</a>',
         'active' => $searchTab == 'maps',
     ];
@@ -157,7 +178,10 @@ if ($searchModules) {
         'text'   => "<a href='index.php?search_category=modules&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".html_print_image(
             'images/brick.png',
             true,
-            ['title' => __('Modules')]
+            [
+                'title' => __('Modules'),
+                'class' => 'main_menu_icon invert_filter',
+            ]
         ).'</a>',
         'active' => $searchTab == 'modules',
     ];
@@ -172,7 +196,7 @@ if ($searchPolicies) {
             true,
             [
                 'title' => __('Policies'),
-                'class' => 'main_menu_icon',
+                'class' => 'main_menu_icon invert_filter',
             ]
         ).'</a>',
         'active' => $searchTab == 'policies',