From 7a93861a2bfd22453ca3bf12b1ae555658b0545c Mon Sep 17 00:00:00 2001
From: Daniel Barbero Martin <daniel.barbero@artica.es>
Date: Tue, 28 Jun 2022 09:14:11 +0200
Subject: [PATCH] fixed size modal pandora_enterprise#8827

---
 .../lib/Dashboard/Widgets/alerts_fired.php       |  2 +-
 .../include/lib/Dashboard/Widgets/example.php    |  2 +-
 .../lib/Dashboard/Widgets/maps_made_by_user.php  |  2 +-
 .../lib/Dashboard/Widgets/maps_status.php        |  2 +-
 .../lib/Dashboard/Widgets/monitor_health.php     |  4 ++--
 .../include/lib/Dashboard/Widgets/post.php       |  4 ++--
 .../include/lib/Dashboard/Widgets/reports.php    |  2 +-
 .../include/lib/Dashboard/Widgets/top_n.php      | 16 ++++++++++++++++
 8 files changed, 25 insertions(+), 9 deletions(-)

diff --git a/pandora_console/include/lib/Dashboard/Widgets/alerts_fired.php b/pandora_console/include/lib/Dashboard/Widgets/alerts_fired.php
index f28a56fa08..abdacf5322 100755
--- a/pandora_console/include/lib/Dashboard/Widgets/alerts_fired.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/alerts_fired.php
@@ -381,7 +381,7 @@ class AlertsFiredWidget extends Widget
     {
         $size = [
             'width'  => 400,
-            'height' => 260,
+            'height' => (is_metaconsole() === true) ? 330 : 260,
         ];
 
         return $size;
diff --git a/pandora_console/include/lib/Dashboard/Widgets/example.php b/pandora_console/include/lib/Dashboard/Widgets/example.php
index 0c41ba2e84..e7ca6e5ada 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/example.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/example.php
@@ -298,7 +298,7 @@ class WelcomeWidget extends Widget
     {
         $size = [
             'width'  => 500,
-            'height' => 210,
+            'height' => 220,
         ];
 
         return $size;
diff --git a/pandora_console/include/lib/Dashboard/Widgets/maps_made_by_user.php b/pandora_console/include/lib/Dashboard/Widgets/maps_made_by_user.php
index 8c06a13295..40b47dce4b 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/maps_made_by_user.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/maps_made_by_user.php
@@ -544,7 +544,7 @@ class MapsMadeByUser extends Widget
     {
         $size = [
             'width'  => 400,
-            'height' => 270,
+            'height' => (is_metaconsole() === true) ? 330 : 270,
         ];
 
         return $size;
diff --git a/pandora_console/include/lib/Dashboard/Widgets/maps_status.php b/pandora_console/include/lib/Dashboard/Widgets/maps_status.php
index cec07021eb..2c2faa3147 100755
--- a/pandora_console/include/lib/Dashboard/Widgets/maps_status.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/maps_status.php
@@ -409,7 +409,7 @@ class MapsStatusWidget extends Widget
     {
         $size = [
             'width'  => 400,
-            'height' => 410,
+            'height' => 425,
         ];
 
         return $size;
diff --git a/pandora_console/include/lib/Dashboard/Widgets/monitor_health.php b/pandora_console/include/lib/Dashboard/Widgets/monitor_health.php
index 118cc2db6f..03d54700be 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/monitor_health.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/monitor_health.php
@@ -319,7 +319,7 @@ class MonitorHealthWidget extends Widget
             20
         );
 
-        $output = '<div class="container-center mw200px min-height-320px">';
+        $output = '<div>';
         $output .= \html_print_table($table, true);
         $output .= '</div>';
 
@@ -358,7 +358,7 @@ class MonitorHealthWidget extends Widget
     {
         $size = [
             'width'  => 400,
-            'height' => 210,
+            'height' => 220,
         ];
 
         return $size;
diff --git a/pandora_console/include/lib/Dashboard/Widgets/post.php b/pandora_console/include/lib/Dashboard/Widgets/post.php
index b39cc15a39..b6d35b24dd 100755
--- a/pandora_console/include/lib/Dashboard/Widgets/post.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/post.php
@@ -296,8 +296,8 @@ class PostWidget extends Widget
     public function getSizeModalConfiguration(): array
     {
         $size = [
-            'width'  => 480,
-            'height' => 480,
+            'width'  => 500,
+            'height' => 500,
         ];
 
         return $size;
diff --git a/pandora_console/include/lib/Dashboard/Widgets/reports.php b/pandora_console/include/lib/Dashboard/Widgets/reports.php
index 03fd29fe57..81422c41c3 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/reports.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/reports.php
@@ -508,7 +508,7 @@ class ReportsWidget extends Widget
     {
         $size = [
             'width'  => 400,
-            'height' => 260,
+            'height' => (is_metaconsole() === true) ? 330 : 260,
         ];
 
         return $size;
diff --git a/pandora_console/include/lib/Dashboard/Widgets/top_n.php b/pandora_console/include/lib/Dashboard/Widgets/top_n.php
index 0406a4e214..8e5aba52c0 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/top_n.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/top_n.php
@@ -540,4 +540,20 @@ class TopNWidget extends Widget
     }
 
 
+    /**
+     * Get size Modal Configuration.
+     *
+     * @return array
+     */
+    public function getSizeModalConfiguration(): array
+    {
+        $size = [
+            'width'  => 400,
+            'height' => 530,
+        ];
+
+        return $size;
+    }
+
+
 }