diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index 5b5d66c85f..5c337f912b 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -4294,3 +4294,147 @@ function agents_get_offspring(int $id_agent) return $return; } + + +function agents_get_starmap(int $id_agent, float $width=0, float $height=0) +{ + ui_require_css_file('heatmap'); + + // $all_modules = agents_get_modules($id_agent); + // if (empty($all_modules)) { + // return null; + // } + // $total_modules = count($all_modules); + $all_modules = []; + $total_modules = 200; + $contador = 0; + while ($contador < $total_modules) { + $contador++; + $all_modules[$contador] = ''; + } + + // Best square. + $high = (float) max($width, $height); + $low = 0.0; + + while (abs($high - $low) > 0.000001) { + $mid = (($high + $low) / 2.0); + $midval = (floor($width / $mid) * floor($height / $mid)); + if ($midval >= $total_modules) { + $low = $mid; + } else { + $high = $mid; + } + } + + $square_length = min(($width / floor($width / $low)), ($height / floor($height / $low))); + + // Print starmap. + $html = sprintf( + ''; + + return $html; +} diff --git a/pandora_console/include/graphs/pandora.d3.js b/pandora_console/include/graphs/pandora.d3.js index d081cf7fca..896149b892 100644 --- a/pandora_console/include/graphs/pandora.d3.js +++ b/pandora_console/include/graphs/pandora.d3.js @@ -2869,7 +2869,7 @@ function donutNarrowGraph( arc = d3.svg .arc() .outerRadius(radius) - .innerRadius(radius - radius / 6); + .innerRadius(radius - radius / 4); svg = donutbody .append("svg") diff --git a/pandora_console/include/styles/heatmap.css b/pandora_console/include/styles/heatmap.css index bac09b561e..12db5cc399 100644 --- a/pandora_console/include/styles/heatmap.css +++ b/pandora_console/include/styles/heatmap.css @@ -159,10 +159,26 @@ fill: #cccccc; } +.notinit_10, +.notinit_9, +.notinit_8, .notinit { fill: #4a83f3; } +.notinit_7, +.notinit_6, +.notinit_5, +.notinit_4 { + fill: #6695f5; +} + +.notinit_3, +.notinit_2, +.notinit_1 { + fill: #79a3f6; +} + .hover { cursor: pointer; } diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index ae109ba20d..e886ccc7aa 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -5614,12 +5614,12 @@ div#bullets_modules div { } .agent_details_col_left { - width: 40%; - min-width: 300px; + width: 49%; + min-width: 450px; } .agent_details_col_right { - width: 59%; - min-width: 480px; + width: 49%; + min-width: 450px; } .agent_access_rate_events { @@ -5630,14 +5630,15 @@ div#bullets_modules div { } .white_table_graph#table_access_rate { - flex: 1 1 auto; - min-width: 450px; - margin-right: 1%; + margin-left: 1px; + margin-right: 1px; + width: 49%; } .white_table_graph#table_events { - flex: 1 1 auto; - min-width: 450px; + margin-left: 1px; + margin-right: 1px; + width: 49%; } @media screen and (max-width: 1150px) { @@ -5676,7 +5677,7 @@ div#status_pie { justify-content: flex-end; align-items: center; border-bottom: 1px solid #e2e2e2; - padding: 6px 20px; + padding: 8px 20px; } .agent_details_content { diff --git a/pandora_console/operation/agentes/estado_generalagente.php b/pandora_console/operation/agentes/estado_generalagente.php index 57109fa837..3b93f8edef 100755 --- a/pandora_console/operation/agentes/estado_generalagente.php +++ b/pandora_console/operation/agentes/estado_generalagente.php @@ -74,9 +74,7 @@ if (! check_acl_one_of_groups($config['id_user'], $all_groups, 'AR') return; } -$alive_animation = agents_get_status_animation( - agents_get_interval_status($agent, false) -); +$alive_animation = agents_get_starmap($id_agente, 200, 50); /* * START: TABLE AGENT BUILD. @@ -170,10 +168,10 @@ $status_img = agents_detail_view_status_img( $table_agent_header .= '