From f818b86827e38af5672a4b4d084c75186527cf54 Mon Sep 17 00:00:00 2001
From: marcos <marcos.alconada@artica.es>
Date: Fri, 23 Apr 2021 09:56:06 +0200
Subject: [PATCH] fixed minnor error black theme 7376

---
 .../godmode/agentes/module_manager.php        |  1 +
 pandora_console/include/functions_events.php  |  8 ++++++-
 pandora_console/include/graphs/fgraph.php     | 19 ++++++++++++++-
 .../include/styles/pandora_black.css          | 24 ++++++++++++++++---
 .../operation/agentes/stat_win.php            |  8 ++++++-
 5 files changed, 54 insertions(+), 6 deletions(-)

diff --git a/pandora_console/godmode/agentes/module_manager.php b/pandora_console/godmode/agentes/module_manager.php
index 91c6395b96..d8dd0eeef2 100644
--- a/pandora_console/godmode/agentes/module_manager.php
+++ b/pandora_console/godmode/agentes/module_manager.php
@@ -1072,6 +1072,7 @@ foreach ($modules as $module) {
             [
                 'alt'   => __('Enable module'),
                 'title' => __('Enable module'),
+                'class' => 'invert_filter_important',
             ]
         ).'</a>';
     } else {
diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php
index ea85ed589b..80c5f78938 100644
--- a/pandora_console/include/functions_events.php
+++ b/pandora_console/include/functions_events.php
@@ -4313,6 +4313,12 @@ function events_page_details($event, $server='')
         $serverstring = '';
     }
 
+    $table_class = 'table_modal_alternate';
+
+    if ($config['style'] === 'pandora_black') {
+        $table_class = 'black_table_modal_alternate';
+    }
+
     // Details.
     $table_details = new stdClass;
     $table_details->width = '100%';
@@ -4320,7 +4326,7 @@ function events_page_details($event, $server='')
     $table_details->head = [];
     $table_details->cellspacing = 0;
     $table_details->cellpadding = 0;
-    $table_details->class = 'table_modal_alternate';
+    $table_details->class = $table_class;
 
     /*
      * Useless switch.
diff --git a/pandora_console/include/graphs/fgraph.php b/pandora_console/include/graphs/fgraph.php
index 06ddf7d9f3..87eeb73e2e 100644
--- a/pandora_console/include/graphs/fgraph.php
+++ b/pandora_console/include/graphs/fgraph.php
@@ -236,6 +236,9 @@ function vbar_graph(
     // Grid color axes x.
     if (isset($options['x']['color']) === false) {
         $options['x']['color'] = '#ffffff';
+        if ($config['style'] === 'pandora_black') {
+            $options['x']['color'] = '#222';
+        }
     }
 
     if (isset($options['x']['labelWidth']) === false) {
@@ -300,7 +303,7 @@ function vbar_graph(
         $options['y']['font']['color'] = '#545454';
 
         if ($config['style'] === 'pandora_black') {
-            $options['y']['font']['color'] = '#fff';
+            $options['y']['font']['color'] = '#222';
         }
     }
 
@@ -317,6 +320,9 @@ function vbar_graph(
     // Grid color axes y.
     if (isset($options['y']['color']) === false) {
         $options['y']['color'] = '#ffffff';
+        if ($config['style'] === 'pandora_black') {
+            $options['y']['color'] = '#222';
+        }
     }
 
     if (isset($options['y']['labelWidth']) === false) {
@@ -352,6 +358,9 @@ function vbar_graph(
 
     if (isset($options['grid']['color']) === false) {
         $options['grid']['color'] = '#ffffff';
+        if ($config['style'] === 'pandora_black') {
+            $options['grid']['color'] = '#222';
+        }
     }
 
     if (isset($options['grid']['backgroundColor']) === false) {
@@ -361,6 +370,14 @@ function vbar_graph(
                 '#ffffff',
             ],
         ];
+        if ($config['style'] === 'pandora_black') {
+            $options['grid']['backgroundColor'] = [
+                'colors' => [
+                    '#222',
+                    '#222',
+                ],
+            ];
+        }
     }
 
     if (isset($options['grid']['margin']) === false) {
diff --git a/pandora_console/include/styles/pandora_black.css b/pandora_console/include/styles/pandora_black.css
index ecf0c292dc..ed8fb5b514 100644
--- a/pandora_console/include/styles/pandora_black.css
+++ b/pandora_console/include/styles/pandora_black.css
@@ -54,7 +54,8 @@ table.databox,
 .white_box,
 input.sub,
 .introjs-tooltip,
-button.sub {
+button.sub,
+.bg_general {
   background-color: #222 !important;
   color: #fff;
 }
@@ -242,11 +243,20 @@ div#foot {
 
 /* events.css */
 table.table_modal_alternate tr:nth-child(odd) td {
-  background-color: #222;
+  background-color: #222 !important;
 }
 
 table.table_modal_alternate tr:nth-child(even) td {
-  background-color: #111;
+  background-color: #111 !important;
+}
+
+/* events.css */
+table.black_table_modal_alternate tr:nth-child(odd) td {
+  background-color: #222 !important;
+}
+
+table.black_table_modal_alternate tr:nth-child(even) td {
+  background-color: #111 !important;
 }
 
 /* tables.css */
@@ -945,3 +955,11 @@ div.integria_details_description textarea {
 .fill_fff {
   fill: #fff !important;
 }
+.module_graph_menu_header,
+.module_graph_menu_content {
+  background-color: #222 !important;
+}
+
+.invert_filter_important {
+  filter: invert(100%) !important;
+}
diff --git a/pandora_console/operation/agentes/stat_win.php b/pandora_console/operation/agentes/stat_win.php
index aa9dc6e68f..ca6c7fcbdc 100644
--- a/pandora_console/operation/agentes/stat_win.php
+++ b/pandora_console/operation/agentes/stat_win.php
@@ -64,8 +64,14 @@ if (file_exists('../../include/languages/'.$user_language.'.mo')) {
     $l10n->load_tables();
 }
 
+global $config;
 echo '<link rel="stylesheet" href="../../include/styles/pandora.css" type="text/css"/>';
 
+if ($config['style'] === 'pandora_black') {
+    echo '<link rel="stylesheet" href="../../include/styles/pandora_black.css" type="text/css"/>';
+}
+
+
 $id = get_parameter('id');
 $id_agent = db_get_value(
     'id_agente',
@@ -129,7 +135,7 @@ ui_print_message_dialog(
             };
         </script>
     </head>
-    <body class='bg_white'>
+    <body class='bg_general'>
         <?php
         // Module id.
         $id = (int) get_parameter('id', 0);