[Pkg-nagios-devel] Bug#831332: icinga-cgi-bin: fix menu hiding (jquery 1.11 incompatibility)

Nishanth Aravamudan nish.aravamudan at canonical.com
Thu Jul 14 16:50:43 UTC 2016


Package: icinga
Version: 1.13.3-2
Severity: important
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu yakkety ubuntu-patch

Dear Maintainer,

icinga-cgi-bin in Debian Sid, Ubuntu Yakkety (and Ubuntu Xenial) is
affected by an upstream bug where the left-hand menu in the Classic
icinga web interface disappears immediately after the page finishes
loading. Upstream has provided a fix and in my testing this resolves the
issue (which is due to current code incompatibilty with jQuery versions
in Debian and Ubuntu).

In Ubuntu, the attached patch was applied to achieve the following:

  * Backport 'Classic UI: fixed menu disappear with jQuery 1.11+'.
    Closes LP: #1593319.
    - Do not backport the jQuery source change, as it's not strictly
      necessary to fix the syntax; we depend on the system jQuery.
    - https://dev.icinga.org/issues/11732
    - https://git.icinga.org/?p=icinga-core.git;a=commitdiff;h=d3158e0140b19bc578556d0172a5ec69c943d4d1;js=1


Thanks for considering the patch.

*** /tmp/tmpKQpPwH/icinga_1.13.3-2ubuntu0.1.debdiff
only in patch2:
unchanged:
--- icinga-1.13.3.orig/html/js/menu.js
+++ icinga-1.13.3/html/js/menu.js
@@ -9,11 +9,14 @@
 
 		elem.prepend( img )
 			.css( "cursor", "pointer" )
-			.toggle( function() {
-				img.attr('src', 'images/menu_more.gif');
-				list.slideToggle("slow");
-			}, function() {
-				img.attr('src', 'images/menu_less.gif');
+			.click( function() {
+				if($(this).hasClass("collapsed")) {
+					img.attr('src', 'images/menu_less.gif');
+					$(this).removeClass("collapsed");
+				} else {
+					img.attr('src', 'images/menu_more.gif');
+					$(this).addClass("collapsed");
+				}
 				list.slideToggle("slow");
 		});
 


-- System Information:
Debian Release: stretch/sid
  APT prefers xenial-updates
  APT policy: (500, 'xenial-updates'), (500, 'xenial-security'), (500, 'xenial'), (100, 'xenial-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.4.0-28-generic (SMP w/4 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

-- 
Nishanth Aravamudan
Ubuntu Server
Canonical Ltd



More information about the Pkg-nagios-devel mailing list