From 80076434b34d44b73eda55b180a457efb90cab93 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Mon, 13 Mar 2023 10:29:03 +0100 Subject: [PATCH 01/10] SNMP visual fix staticts --- .../include/class/SnmpConsole.class.php | 140 +++++------------- pandora_console/include/functions_ui.php | 9 +- pandora_console/include/styles/pandora.css | 18 +++ .../operation/snmpconsole/snmp_statistics.php | 29 ++-- 4 files changed, 79 insertions(+), 117 deletions(-) diff --git a/pandora_console/include/class/SnmpConsole.class.php b/pandora_console/include/class/SnmpConsole.class.php index ec7e3394dd..f1895dfc51 100644 --- a/pandora_console/include/class/SnmpConsole.class.php +++ b/pandora_console/include/class/SnmpConsole.class.php @@ -181,113 +181,47 @@ class SnmpConsole extends HTML $default_refr = 300; - if (!isset($config['pure']) || $config['pure'] === false) { - $statistics['text'] = ''.html_print_image( - 'images/logs@svg.svg', - true, - [ - 'title' => __('Statistics'), - 'class' => 'main_menu_icon invert_filter', - ] - ).''; - $list['text'] = ''.html_print_image( - 'images/SNMP-network-numeric-data@svg.svg', - true, - [ - 'title' => __('List'), - 'class' => 'main_menu_icon invert_filter', - ] - ).''; - $list['active'] = true; + $statistics['text'] = ''.html_print_image( + 'images/logs@svg.svg', + true, + [ + 'title' => __('Statistics'), + 'class' => 'main_menu_icon invert_filter', + ] + ).''; + $list['text'] = ''.html_print_image( + 'images/SNMP-network-numeric-data@svg.svg', + true, + [ + 'title' => __('List'), + 'class' => 'main_menu_icon invert_filter', + ] + ).''; + $list['active'] = true; - $screen['text'] = ''.html_print_image( - 'images/fullscreen@svg.svg', - true, + // Header. + ui_print_standard_header( + __('SNMP Console'), + 'images/op_snmp.png', + false, + 'snmp_console', + false, + [ + $screen, + $list, + $statistics, + ], + [ [ - 'title' => __('View in full screen'), - 'class' => 'main_menu_icon invert_filter', - ] - ).''; - - // Header. - ui_print_standard_header( - __('SNMP Console'), - 'images/op_snmp.png', - false, - 'snmp_console', - false, - [ - $screen, - $list, - $statistics, + 'link' => '', + 'label' => __('Monitoring'), ], [ - [ - 'link' => '', - 'label' => __('Monitoring'), - ], - [ - 'link' => '', - 'label' => __('SNMP'), - ], - ] - ); - } else { - echo '
'; - - echo ''; - - echo '
'; - - ui_require_css_file('pandora_enterprise', ENTERPRISE_DIR.'/include/styles/'); - ui_require_css_file('pandora_dashboard', ENTERPRISE_DIR.'/include/styles/'); - ui_require_css_file('cluetip', 'include/styles/js/'); - - ui_require_jquery_file('countdown'); - ui_require_javascript_file('pandora_dashboard', ENTERPRISE_DIR.'/include/javascript/'); - ui_require_javascript_file('wz_jsgraphics'); - ui_require_javascript_file('pandora_visual_console'); - } + 'link' => '', + 'label' => __('SNMP'), + ], + ] + ); // Datatables list. try { diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index d272ee224a..5a19b69da3 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -5044,6 +5044,8 @@ function ui_print_page_header( $breadcrumbs='', $hide_left_small=false ) { + global $config; + $title = io_safe_input_html($title); if (($icon == '') && ($godmode == true)) { $icon = 'images/gm_setup.png'; @@ -5057,13 +5059,18 @@ function ui_print_page_header( $type = 'view'; $type2 = 'menu_tab_frame_view'; $separator_class = 'separator'; + $div_style = ''; } else { $type = 'view'; $type2 = 'menu_tab_frame_view'; $separator_class = 'separator_view'; + $div_style = ''; + if ($config['pure'] === true) { + $div_style = 'top:0px;'; + } } - $buffer = '
'; + $buffer = '
'; if (!empty($breadcrumbs)) { $buffer .= '