Merge branch 'ent-9662-second-round' of brutus.artica.es:artica/pandorafms into ent-9662-second-round

This commit is contained in:
Pablo Aragon 2023-03-13 12:03:43 +01:00
commit 0203e5eba9
6 changed files with 72 additions and 35 deletions

View File

@ -262,10 +262,7 @@ if ($is_management_allowed === true) {
[ 'icon' => 'next' ], [ 'icon' => 'next' ],
true true
), ),
[ [ 'right_content' => $tablePagination ]
'type' => 'form_action',
'right_content' => $tablePagination,
]
); );
echo '</form>'; echo '</form>';

View File

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

View File

@ -727,8 +727,8 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false)
false, false,
false, false,
'', '',
'white-box-content', 'white-box-content mrgn_top_0 mrgn_btn_0px',
'white_table_flex margin-bottom-10 border-bottom-gray' 'white_table_flex'
); );
if ($config['agentaccess']) { if ($config['agentaccess']) {
@ -747,8 +747,8 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false)
true, true,
false, false,
'', '',
'white-box-content border-bottom-gray', 'white-box-content mrgn_top_0 mrgn_btn_0px border-bottom-gray',
'white_table_flex margin-top-10 margin-bottom-10' 'white_table_flex'
); );
} }
@ -920,8 +920,8 @@ function treeview_printTable($id_agente, $server_data=[], $no_head=false)
true, true,
false, false,
'', '',
'white-box-content border-bottom-gray', 'white-box-content mrgn_top_0 mrgn_btn_0px border-bottom-gray',
'white_table_flex margin-top-10 margin-bottom-10' 'white_table_flex'
); );
if (empty($server_data) === false && is_metaconsole() === true) { if (empty($server_data) === false && is_metaconsole() === true) {

View File

@ -4360,7 +4360,10 @@ function ui_toggle(
$image_a = html_print_image( $image_a = html_print_image(
$img_a, $img_a,
true, true,
[ 'style' => 'rotate: '.$rotateA ], [
'class' => 'mrgn_right_10px',
'style' => 'rotate: '.$rotateA,
],
true true
); );
} else { } else {
@ -4371,7 +4374,10 @@ function ui_toggle(
$image_b = html_print_image( $image_b = html_print_image(
$img_b, $img_b,
true, true,
[ 'style' => 'rotate: '.$rotateB ], [
'class' => 'mrgn_right_10px',
'style' => 'margin-right:10px; rotate: '.$rotateB,
],
true true
); );
} else { } else {
@ -4434,7 +4440,7 @@ function ui_toggle(
$original, $original,
true, true,
[ [
'class' => 'float-left main_menu_icon', 'class' => 'float-left main_menu_icon mrgn_right_10px',
'style' => 'object-fit: contain; margin-right:10px; rotate:'.$imageRotate, 'style' => 'object-fit: contain; margin-right:10px; rotate:'.$imageRotate,
'title' => $title, 'title' => $title,
'id' => 'image_'.$uniqid, 'id' => 'image_'.$uniqid,
@ -4466,7 +4472,7 @@ function ui_toggle(
$original, $original,
true, true,
[ [
'class' => 'main_menu_icon', 'class' => 'main_menu_icon mrgn_right_10px',
'style' => 'object-fit: contain; float:right; margin-right:10px; rotate:'.$imageRotate, 'style' => 'object-fit: contain; float:right; margin-right:10px; rotate:'.$imageRotate,
'title' => $title, 'title' => $title,
'id' => 'image_'.$uniqid, 'id' => 'image_'.$uniqid,

View File

@ -1,21 +1,29 @@
<?php <?php
/** /**
* Network explorer * Netflow Explorer
* *
* @package Operations. * @category Netflow
* @subpackage Netflow explorer view. * @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 * Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * 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, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* ============================================================================
*/ */
global $config; global $config;

View File

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