BGmot / zabbix-module-latest-data

A Zabbix 5.4 module to group items under Monitoring -> Latest data per Tag as it used to be with Application grouping in previous versions of Zabbix
21 stars 5 forks source link

Filter by name don't work after update to version 6.4.3 #4

Closed dd-everstake closed 4 months ago

dd-everstake commented 1 year ago

Hi there! After update out zabbix we have problem with latest data module. Filter by name don't work, and show all info as without filter by name. All other filters work well. Function wrap by tag don't work correct to. Avery time after autoupdate page all manually wrapped tags unwrap to default state.

dd-everstake commented 1 year ago

Any updates?

jamescook000 commented 4 months ago

This is caused by the file "actions/CControllerBGLatestView.php" on line 226 (I am using tag 3.0.1 for Zabbix 6.4.X)

The file references 'name' as the input field in the filter where as 'filter_select' is the correct input field when you inspect the html.

Incorrect:

            if ($this->hasInput('name')) {
                    $filter_name = $this->getInput('name');
            } else {
                    $filter_name = '';

Correct:

            if ($this->hasInput('filter_select')) {
                    $filter_name = $this->getInput('filter_select');
            } else {
                    $filter_name = '';

I made the above modifications and it carries over the items selected by name...

BGmot commented 4 months ago

Fixed in https://github.com/BGmot/zabbix-module-latest-data/tree/v3.0.2 Thanks for reporting and help with fixing filtering!