Netflow improvements

This commit is contained in:
Jose Gonzalez 2023-03-13 11:25:43 +01:00
parent bbec6a92a4
commit 590e7a3978
3 changed files with 55 additions and 21 deletions

View File

@ -68,10 +68,10 @@ function network_print_explorer_header(
$cell = '<div class="flex_center">';
$cell .= $title;
$cell .= html_print_link_with_params(
'images/arrow-down-white.png',
'images/arrow@svg.svg',
array_merge($hidden_data, ['order_by' => $order]),
'image',
($selected === $order) ? 'opacity: 0.5' : ''
'rotate: 270deg; width: 20px; margin-top: 4px;'.(($selected === $order) ? '' : 'opacity: 0.5')
);
$cell .= '</div>';

View File

@ -1,21 +1,29 @@
<?php
/**
* Network explorer
* Netflow Explorer
*
* @package Operations.
* @subpackage Netflow explorer view.
* @category Netflow
* @package Pandora FMS
* @subpackage Community
* @version 1.0.0
* @license See below
*
* Pandora FMS - http://pandorafms.com
* ==================================================
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2022 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; version 2
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
global $config;

View File

@ -1,23 +1,32 @@
<?php
/**
* Network explorer
* Netflow Report
*
* @package Operations.
* @subpackage Network explorer view.
* @category Netflow
* @package Pandora FMS
* @subpackage Community
* @version 1.0.0
* @license See below
*
* Pandora FMS - http://pandorafms.com
* ==================================================
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2022 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; version 2
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
// Begin.
check_login();
// ACL Check.
@ -390,15 +399,26 @@ if (empty($data)) {
],
'labels' => $labels,
];
// Results table.
$resultsTable = html_print_div(
[
'class' => '',
'style' => 'flex: 50;margin-right: 5px;',
'content' => html_print_table($table, true),
],
true
);
// Pie graph.
html_print_div(
$pieGraph = html_print_div(
[
'class' => 'databox netflow-pie-graph-container padding-2 white_box',
'style' => 'flex: 50;margin-left: 5px;',
'content' => pie_graph(
$chart_data,
$options
),
]
],
true
);
// Print the filter remove link.
if (empty($main_value) === false) {
@ -418,7 +438,13 @@ if (empty($data)) {
}
// Print results.
html_print_table($table);
html_print_div(
[
'style' => 'max-width: -webkit-fill-available; display: flex',
'class' => '',
'content' => $resultsTable.$pieGraph,
]
);
}
?>