Subject: [Pkg-cacti-maint] Bug#871496: cacti graph search box reloads, and clears searchbox on any keypress.

From: Ronny Aasen <[email-masked]>
Date: Tue, 08 Aug 2017 15:06:21 +0100

Package: cacti
Version: 1.1.16+ds1-1
Severity: normal

Dear Maintainer,

On the graphs page when trying to use the right hand side search box. the search box clears and reloads when I enter the first letter. This happens in all browsers I have tried. 

I tracked it down to line 1216 in /usr/share/cacti/site/include/layout.js 

$('#filter, #rfilter').bind('keypress', 'ctrl+shift+x', function() {
	$('#filter, #rfilter').val('').css('text-align', 'left').submit(); });

It looks to me like the bind keypress activates the ctrl+shift+x clear function on any keypress.  If I comment out the line 1216 it works for me. This ofcourse disable the function, so there probably needs to be a proper fix.  

-- System Information:
Debian Release: 9.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-3-amd64 (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages cacti depends on:
ii  dbconfig-common                           2.0.8
ii  dbconfig-mysql                            2.0.8
ii  debconf [debconf-2.0]                     1.5.61
ii  fonts-dejavu-core                         2.37-1
ii  fonts-dejavu-extra                        2.37-1
ii  fonts-font-awesome                        4.7.0~dfsg-1
ii  javascript-common                         11
ii  libapache2-mod-php                        1:7.0+49
ii  libapache2-mod-php7.0 [libapache2-mod-ph  7.0.19-1
ii  libjs-c3                                  0.4.11+dfsg-2
ii  libjs-chartjs                             1.0.2-1
ii  libjs-d3                                  3.5.17-2
ii  libjs-jquery                              3.1.1-2
ii  libjs-jquery-colorpicker                  1.2.8-1
ii  libjs-jquery-cookie                       11-3
ii  libjs-jquery-hotkeys                      0~20130707+git2d51e3a9+dfsg-2
ii  libjs-jquery-jstree                       3.3.3+dfsg1-1
ii  libjs-jquery-metadata                     11-3
ii  libjs-jquery-tablesorter                  1:2.28.15+dfsg1-1
ii  libjs-jquery-timepicker                   1.2-1
ii  libjs-jquery-ui                           1.12.1+dfsg-4
ii  libjs-jquery-ui-theme-smoothness          1.12.1+dfsg-1
ii  libjs-jquery-ui-theme-south-street        1.12.1+dfsg-1
ii  libjs-jquery-ui-theme-ui-darkness         1.12.1+dfsg-1
ii  libjs-jquery-ui-touch-punch               0.0~git20141218.2.4bc0091+dfsg1-1
ii  libphp-phpmailer                          5.2.14+dfsg-2.3
ii  perl                                      5.24.1-3+deb9u1
ii  php                                       1:7.0+49
ii  php-gd                                    1:7.0+49
ii  php-ldap                                  1:7.0+49
ii  php-mbstring                              1:7.0+49
ii  php-mysql                                 1:7.0+49
ii  php-php-gettext                           1.0.12-0.1
ii  php-phpseclib                             2.0.4-1
ii  php-snmp                                  1:7.0+49
ii  php-twig                                  1.24.0-2
ii  php-xml                                   1:7.0+49
ii  php7.0 [php]                              7.0.19-1
ii  php7.0-cli [php-cli]                      7.0.19-1
ii  php7.0-gd [php-gd]                        7.0.19-1
ii  php7.0-json [php-json]                    7.0.19-1
ii  php7.0-ldap [php-ldap]                    7.0.19-1
ii  php7.0-mbstring [php-mbstring]            7.0.19-1
ii  php7.0-mysql [php-mysqlnd]                7.0.19-1
ii  php7.0-snmp [php-snmp]                    7.0.19-1
ii  php7.0-xml [php-xml]                      7.0.19-1
ii  rrdtool                                   1.6.0-1+b2
ii  snmp                                      5.7.3+dfsg-1.7
ii  ucf                                       3.0036

Versions of packages cacti recommends:
ii  apache2 [httpd]                             2.4.25-3+deb9u2
ii  default-mysql-server                        1.0.2
ii  iputils-ping                                3:20161105-1
ii  logrotate                                   3.11.0-0.1
ii  mariadb-server-10.1 [virtual-mysql-server]  10.1.23-9+deb9u1
ii  php-gmp                                     1:7.0+49
ii  php7.0-gmp [php-gmp]                        7.0.19-1

Versions of packages cacti suggests:
pn  cacti-spine  <none>
pn  moreutils    <none>
pn  snmpd        <none>

-- debconf information excluded

---

From: [email-masked] (Debian Bug Tracking System)
Date: Wed, 16 Aug 2017 14:27:03 +0000

Your message dated Wed, 16 Aug 2017 16:12:50 +0200
with message-id <[email-masked]>
and subject line Re: cacti graph search box reloads, and clears searchbox on any keypress.
has caused the Debian Bug report #871496,
regarding cacti graph search box reloads, and clears searchbox on any keypress.
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email-masked]
immediately.)

-- 
871496: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=871496
Debian Bug Tracking System
Contact [email-masked] with problems

Subject: cacti graph search box reloads, and clears searchbox on any keypress.
From: Ronny Aasen <[email-masked]>
To: Debian Bug Tracking System <[email-masked]>
Date: Tue, 08 Aug 2017 15:06:21 +0100

Package: cacti
Version: 1.1.16+ds1-1
Severity: normal

Dear Maintainer,

-- System Information:
Debian Release: 9.1
  APT prefers stable

Subject: Re: cacti graph search box reloads, and clears searchbox on any keypress.
From: Paul Gevers <[email-masked]>
To: [email-masked]
Date: Wed, 16 Aug 2017 16:12:50 +0200

Version: 1.1.17+ds-1

I forgot to close this bug in the changelog, but the fix is in.

cacti (1.1.17+ds1-1) unstable; urgency=medium

  * New upstream version 1.1.17
  * Make the autopkgtest strickter now upstream reduced the noise

 -- Paul Gevers <[email-masked]>  Wed, 16 Aug 2017 14:04:31 +0200

Cacti CHANGELOG

1.1.17
-issue#450: List View to Preview shows no results
-issue#486: Export Device table results to CSV
-issue#544: Allow Log Rotation to be other than Daily
-issue#673: Downtime/Recovery time/date is set incorrectly
-issue#819: Customized timespans for graphs
-issue#888: Rebuilding Poller Cache when External data sources are
present results in false positive warnings in the log
-issue#891: Database.php unable to connect to MySQL when using port
different than 3306
-issue#893: Warning messages when duplicating CDEF objects
-issue#897: Due to browser use of special key, deprecate ctrl-shift-x
for clearing filter
-issue#898: Issue with tcp and udp ping due to file description
allocation changes
-issue: Unable use ipv6 ip addresses for snmp ping in the Cacti GUI
-issue: Update language of the Rebuild Poller Cache menu pick
-issue: Broken design for input controls with Sunrise theme
-issue: Timespan switching not switching to Custom in Preview Mode
-issue: Log rotation would not occur under certain conditions.  Provide
more control over log functions
-issue: Purge log file always purged the cacti.log, not the selected log
-issue: Unable to view graphs for errored data sources from Cacti log