diff --git a/pandora_console/include/javascript/general_tactical_view.js b/pandora_console/include/javascript/general_tactical_view.js index ee9aae65f2..c3d48b133b 100644 --- a/pandora_console/include/javascript/general_tactical_view.js +++ b/pandora_console/include/javascript/general_tactical_view.js @@ -51,6 +51,22 @@ $(document).ready(function() { $("#events-status-pending-validate").html(data); } }); + + $.ajax({ + url: "ajax.php", + data: { + page: "include/ajax/general_tactical_view.ajax", + method: "getStatusHeatMap", + class: "Groups", + width: $("#heatmap-group").width() - 50, + height: + $("#heatmap-group").height() < 280 ? 280 : $("#heatmap-group").height() + }, + type: "POST", + success: function(data) { + $("#heatmap-group").html(data); + } + }); }); function autoRefresh(interval, id, method, php_class) { diff --git a/pandora_console/include/lib/TacticalView/elements/Groups.php b/pandora_console/include/lib/TacticalView/elements/Groups.php index ee7ccf0ab6..234574511b 100644 --- a/pandora_console/include/lib/TacticalView/elements/Groups.php +++ b/pandora_console/include/lib/TacticalView/elements/Groups.php @@ -45,6 +45,7 @@ class Groups extends Element parent::__construct(); include_once $config['homedir'].'/include/functions_users.php'; include_once 'include/functions_groupview.php'; + $this->ajaxMethods = ['getStatusHeatMap']; ui_require_css_file('heatmap'); $this->title = __('Groups'); $this->total = $this->calculateTotalGroups(); @@ -71,12 +72,12 @@ class Groups extends Element public function getStatusHeatMap():string { global $config; + $width = get_parameter('width', 350); + $height = get_parameter('height', 275); // ACL Check. $agent_a = check_acl($config['id_user'], 0, 'AR'); $agent_w = check_acl($config['id_user'], 0, 'AW'); - $width = 350; - $height = 275; $groups_list = groupview_get_groups_list( $config['id_user'], diff --git a/pandora_console/include/styles/general_tactical_view.css b/pandora_console/include/styles/general_tactical_view.css index b1b81e3c68..ff76053f69 100644 --- a/pandora_console/include/styles/general_tactical_view.css +++ b/pandora_console/include/styles/general_tactical_view.css @@ -20,6 +20,7 @@ .row { display: flex; width: 100%; + align-items: stretch; } .col-12 { width: 100%; @@ -55,7 +56,7 @@ background-color: white; border: 1px solid #e5e9ed; border-radius: 10px; - margin: 5px; + height: 100%; max-width: 100%; } .br-l { @@ -192,10 +193,6 @@ a.pandora_pagination:first-child { color: #8a96a6; } -#Alerts { - padding-bottom: 20px; -} - .mini-criticity { width: 6px !important; min-width: auto !important; @@ -245,12 +242,17 @@ table.dataTable thead th { width: 21%; } .col-4 { - width: 30%; + width: 33%; } .row { flex-wrap: wrap; } - + .col-7 { + width: 56%; + } + .col-5 { + width: 41%; + } .flex-nowrap { flex-wrap: nowrap !important; } diff --git a/pandora_console/views/tacticalView/view.php b/pandora_console/views/tacticalView/view.php index 09e293bddb..8a59dd206c 100644 --- a/pandora_console/views/tacticalView/view.php +++ b/pandora_console/views/tacticalView/view.php @@ -5,7 +5,7 @@