[ZBXNEXT-1794] Indicator that output is filtered Created: 2013 Jun 14  Updated: 2016 May 13

Status: Open
Project: ZABBIX FEATURE REQUESTS
Component/s: Frontend (F)
Affects Version/s: 2.0.6
Fix Version/s: None

Type: Change Request Priority: Trivial
Reporter: Marc Assignee: Unassigned
Resolution: Unresolved Votes: 6
Labels: filters, patch, trivial, usability
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux, CentOS-6.4, PostgreSQL 9.1.9, Apache HTTPD-2.2.15, PHP-5.3.3


Attachments: Text File ZBXNEXT-1794-2.0.10-non_vanilla_patches.txt     PNG File ZBXNEXT-1794-2.0.8-1-class.cwidget-active-darkorange.png     PNG File ZBXNEXT-1794-2.0.8-1-class.cwidget-active.png     Text File ZBXNEXT-1794-2.0.8-1-class.cwidget.patch     PNG File ZBXNEXT-1794-2.0.8-class.cwidget-empty.png     PNG File ZbxNext1794-2.5-Mockup.png     JPEG File screenshot-1.jpg     JPEG File screenshot-2.jpg     File zbxNext1794-2.2.5-2.tgz     File zbxNext1794-2.2.5.tgz    

 Description   

It happens now and then that people miss an applied filter and get a different result as intended or expected.
Maybe there could be some kind of flashy indicator beside every "Filter" label, if a filter is applied and collapsed/hidden.



 Comments   
Comment by richlv [ 2013 Jun 14 ]

i was sure i had a feature request like that created, but can't find it. maybe i just talked about it a lot
dashboard implementation might make sense (an orange icon)

Comment by Marc [ 2013 Jun 14 ]

Haven't found one as well

In addition:
Pre-defined filters that can't be empty should be indicated if set to non-default selection/values.

Comment by Talaat Harb [ 2013 Jun 14 ]

Would be nice to have some indication like this attached screen shot

Comment by Oleksii Zagorskyi [ 2013 Jun 15 ]

Talaat, I was not able to distinguish your two pictures during 10 seconds
Probably some coloring would be better noticeable.

Comment by Alexei Vladishev [ 2013 Jul 19 ]

I believe same applies to tabs. For example, if there are no macros defined for a host, tab 'Macros' should be displayed differently.

Comment by Marc [ 2013 Oct 06 ]

Attached patch allows to pass value for requested indication:

$hostgroupWidget->addFlicker($filter_form, CProfile::get('web.hostgroups.filter.state', 0), $data['filter_ind']);
  • null/0 behaves like before,
  • 1 sets 'empty' indication,
  • 2 sets 'active' indication

personally I prefer the combination of null and 2.
I played with several color classes but finally decided to just use 'bold' for active indication.

Edit:
Changed my opinion about coloring and value combination (1 and 2 now):

./styles/default.css
span.filter_active { color: #ffcc00; }
span.filter_empty { color: #ffffff; }
./styles/themes/darkorange/main.css
span.filter_active { color: #FF5500; }
Comment by Denis Filinkov [ 2013 Nov 20 ]

How use this patch?

I am added ZBXNEXT-1794-2.0.8-1-class.cwidget.patch but can't find changes.

$this->flicker_indicator not updated

if i tra add $hostgroupWidget->addFlicker($filter_form, CProfile::get('web.hostgroups.filter.state', 0), $data['filter_ind']);
filter_ind not defined

Comment by Volker Fröhlich [ 2013 Nov 20 ]

Go to the frontend directory, download the patch and run:

patch -p4 < file.patch

Comment by Denis Filinkov [ 2013 Nov 20 ]

i am patched frontand manualy but don't see indicator

Comment by Marc [ 2013 Nov 21 ]

The attached patch implements the functionality within the widget only.
Without additional modifications of the respective frontend sites the behavior is the same as without the patch.

I plan to gather all my modifications that make use of this patch and provide them as well.

To have an idea about what to modify find below an example for 'CONFIGURATION OF ITEMS':

--- items.php.orig      2013-10-15 11:25:56.000000000 +0200
+++ items.php   2013-10-15 10:58:20.000000000 +0200
@@ -800,7 +800,8 @@
 else {
        $data = array(
                'form' => get_request('form', null),
-               'sortfield' => getPageSortField('name')
+               'sortfield' => getPageSortField('name'),
+               'filter_ind' => 1
        );

        if (isset($hostid)) {
@@ -892,6 +893,7 @@
                $data['items'] = array();
        }
        else {
+               $data['filter_ind'] = 2;
                $data['items'] = API::Item()->get($options);
        }
--- include/views/configuration.item.list.php.orig      2013-10-15 11:25:56.000000000 +0200
+++ include/views/configuration.item.list.php   2013-11-04 18:19:40.000000000 +0100
@@ -37,7 +37,7 @@
 if (!empty($this->data['hostid'])) {
        $itemsWidget->addItem(get_header_host_table('items', $this->data['hostid']));
 }
-$itemsWidget->addFlicker($this->data['flicker'], CProfile::get('web.items.filter.state', 0));
+$itemsWidget->addFlicker($this->data['flicker'], CProfile::get('web.items.filter.state', 0), $this->data['filter_ind']);

 // create form
 $itemForm = new CForm();

Value for $data['filter_ind'] is set to 1 initially to display "Filter (empty)".
When filter is set the value for $data['filter_ind'] is set to 2 and "Filter (active)" is displayed.

Comment by Marc [ 2014 Jan 07 ]

Attached file:
ZBXNEXT-1794-2.0.10-non_vanilla_patches.txt

includes additional diffs against non vanilla files what means they may include (parts of) other custom patches.
The diffs show how one can make use of ZBXNEXT-1794-2.0.8-1-class.cwidget.patch in several sites.

Any diff needs to be reviewed before being applied!

Comment by richlv [ 2014 Feb 14 ]

how is it decided when "active" should be displayed ? for example, i would not expect that to be shown if "show details" is marked in latest data

Comment by Marc [ 2014 Feb 14 ]

The decision is made individually per site.
Just make sure that (in this example) 'filter_ind' is set to '2' for any selection that should indicate an 'active' filter.
See code example

Comment by Marc [ 2014 Aug 26 ]

Attached tarball zbxNext1794-2.2.5.tgz includes the necessary patches for release 2.2.5.
For an un-patched frontend only the patch zbxNext1794.common.patch is of interest.

Comment by Tatapoum [ 2014 Aug 26 ]

Thank you Marc for these patches.
richlv, it would be really nice if all these handy patches could be integrated into a next release. They greatly enhance the usability of the WebUI.

Comment by richlv [ 2014 Aug 26 ]

yes, i completely agree

Comment by Marc [ 2014 Aug 26 ]

Attached tarball zbxNext1794-2.2.5-2.tgz additionally provides a patch considering ZBXNEXT-2065.
This made it necessary to split the common patch.
For an un-patched frontend one has to apply two patches now:

  • zbxNext1794.common.patch
  • zbxNext1794.vanilla.patch
Comment by Marc [ 2015 Aug 22 ]

Inspired by the dashboard configuration icon introduced with Zabbix 2.5:

Comment by Alexei Vladishev [ 2016 May 13 ]

I believe Zabbix 3.0 fixed this problem, didn't it?

Comment by Marc [ 2016 May 13 ]

alexei,

not that I'm aware of. Zabbix 3.0 indicates whether filter is collapsed or expanded but not whether a filter is applied resp. takes place.

Comment by Pavel Amosov (Inactive) [ 2016 May 13 ]

This issue was not solved yet.

Generated at Fri Mar 29 02:58:02 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.