From 23407892b92d35dad92f865b647ee26bfc530d46 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 20 Dec 2022 10:03:45 +0100 Subject: [PATCH] #9292 fixed issues 3 --- .../include/class/SnmpConsole.class.php | 301 ++++++++++++++++-- .../operation/snmpconsole/snmp_view.php | 21 +- 2 files changed, 292 insertions(+), 30 deletions(-) diff --git a/pandora_console/include/class/SnmpConsole.class.php b/pandora_console/include/class/SnmpConsole.class.php index 455ddd45ce..476f5011ea 100644 --- a/pandora_console/include/class/SnmpConsole.class.php +++ b/pandora_console/include/class/SnmpConsole.class.php @@ -64,14 +64,79 @@ class SnmpConsole extends HTML */ private $ajaxController; + /** + * Filter alert. + * + * @var integer + */ + private $filter_alert; + + /** + * Filter severity. + * + * @var integer + */ + private $filter_severity; + + /** + * Filter search. + * + * @var string + */ + private $filter_free_search; + + /** + * Filter status. + * + * @var integer + */ + private $filter_status; + + /** + * Filter group by. + * + * @var integer + */ + private $filter_group_by; + + /** + * Filter hours. + * + * @var integer + */ + private $filter_hours_ago; + + /** + * Filter trap type. + * + * @var integer + */ + private $filter_trap_type; + + /** + * Refresh. + * + * @var integer + */ + private $refr; + /** * Class constructor * * @param string $ajaxController Ajax controller. */ - public function __construct(string $ajaxController) - { + public function __construct( + string $ajaxController, + int $filter_alert, + int $filter_severity, + string $filter_free_search, + int $filter_status, + int $filter_group_by, + int $filter_hours_ago, + int $filter_trap_type, + int $refr + ) { global $config; check_login(); @@ -89,6 +154,14 @@ class SnmpConsole extends HTML // Set the ajax controller. $this->ajaxController = $ajaxController; + $this->filter_alert = $filter_alert; + $this->filter_severity = $filter_severity; + $this->filter_free_search = $filter_free_search; + $this->filter_status = $filter_status; + $this->filter_group_by = $filter_group_by; + $this->filter_hours_ago = $filter_hours_ago; + $this->filter_trap_type = $filter_trap_type; + $this->refr = $refr; } @@ -106,6 +179,8 @@ class SnmpConsole extends HTML ui_require_css_file('wizard'); ui_require_css_file('discovery'); + $default_refr = 300; + if (!isset($config['pure']) || $config['pure'] === false) { $statistics['text'] = ''.html_print_image( 'images/op_reporting.png', @@ -115,7 +190,7 @@ class SnmpConsole extends HTML 'class' => 'invert_filter', ] ).''; - $list['text'] = ''.html_print_image( + $list['text'] = ''.html_print_image( 'images/op_snmp.png', true, [ @@ -125,7 +200,7 @@ class SnmpConsole extends HTML ).''; $list['active'] = true; - $screen['text'] = ''.html_print_image( + $screen['text'] = ''.html_print_image( 'images/full_screen.png', true, [ @@ -158,17 +233,14 @@ class SnmpConsole extends HTML ] ); } else { - echo '
'; + echo '
'; echo '