#13453 Fixed dark theme styles in Netflow Widgets

This commit is contained in:
Jorge Rincon 2024-04-18 12:41:17 +02:00
parent 35b33f225a
commit e3c842b36c
2 changed files with 12 additions and 4 deletions

View File

@ -1389,6 +1389,7 @@ function netflow_draw_item(
$show_summary=true, $show_summary=true,
$show_table=true $show_table=true
) { ) {
global $config;
$aggregate = $filter['aggregate']; $aggregate = $filter['aggregate'];
$interval = ($end_date - $start_date); $interval = ($end_date - $start_date);
if (is_metaconsole() === true) { if (is_metaconsole() === true) {
@ -1568,13 +1569,20 @@ function netflow_draw_item(
$data_top_n $data_top_n
); );
// Theme.
$theme = $config['style'];
$text_color = ($theme !== 'pandora_black') ? '#333' : '#fff';
$graph_output = pie_graph( $graph_output = pie_graph(
$pie_data, $pie_data,
[ [
'width' => 200, 'width' => 200,
'height' => 200, 'height' => 200,
'ttl' => ($output === 'PDF') ? 2 : 1, 'ttl' => ($output === 'PDF') ? 2 : 1,
'dataLabel' => ['display' => 'auto'], 'dataLabel' => [
'display' => 'auto',
'color' => $text_color,
],
'layout' => [ 'layout' => [
'padding' => [ 'padding' => [
'top' => 15, 'top' => 15,
@ -1650,8 +1658,8 @@ function netflow_draw_item(
netflow_aggregate_is_ip($aggregate) netflow_aggregate_is_ip($aggregate)
); );
$data_circular['width'] = $width_content; $data_circular['width'] = 390;
$data_circular['height'] = $height_content; $data_circular['height'] = 390;
$html = '<div class="center">'; $html = '<div class="center">';
$html .= graph_netflow_circular_mesh($data_circular); $html .= graph_netflow_circular_mesh($data_circular);

View File

@ -462,7 +462,7 @@ class Netflow extends Widget
public function getSizeModalConfiguration(): array public function getSizeModalConfiguration(): array
{ {
$size = [ $size = [
'width' => 400, 'width' => 600,
'height' => 530, 'height' => 530,
]; ];