ZABBIX BUGS AND ISSUES
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-9257

No history links in trigger popups for triggers with 2 or more items

    Details

    • Type: Incident report Incident report
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.3
    • Fix Version/s: 2.4.4rc1, 2.5.0
    • Component/s: Frontend (F)
    • Environment:
      All browsers (PHP issue)

      Description

      If we create a trigger with at least two items in expression, the popup window will not show links to history of the items. (1.png).

      I've tracked down the issue to tr_status.php, line 547, but the problem probably lies somewhere in setMenuPopup or getTrigger.
      $description->setMenuPopup(CMenuPopupHelper::getTrigger($trigger, $triggerItems));

      Checking the value of the array returned by getTrigger:

      $descArray = CMenuPopupHelper::getTrigger($trigger, $triggerItems);
      print_r($descArray);

      Array ( 
      [type] => trigger 
      [triggerid] => 15217 
      [items] => Array ( 
        [1] => Array ( 
          [name] => Procent wolnego miejsca na C: 
          [params] => Array ( 
            [itemid] => 30666 
            [action] => showgraph 
          ) 
        ) 
        [0] => Array ( 
          [name] => Wolne miejsce na C: 
          [params] => Array ( 
            [itemid] => 30665 
            [action] => showgraph 
          ) 
        ) 
      ) 
      [acknowledge] => [eventTime] => [configuration] => Array ( 
          [hostid] => 10276 
      ) [url] => [showEvents] => 1 )
      

      The index of the nested array "index" starts at 1 - something futher down doesn't cope well with this.
      A simple fix which fixed the issue:

      $description = new CSpan($trigger['description'], 'link_menu');
      $triggerPopupData = CMenuPopupHelper::getTrigger($trigger, $triggerItems);
      sort($triggerPopupData['items']);
      $description->setMenuPopup($triggerPopupData);
      
      1. 1.png
        17 kB
      2. 2.png
        12 kB
      3. trigger_hosts_after.png
        7 kB
      4. trigger_hosts_before.png
        6 kB

        Issue Links

          Activity

          Hide
          richlv added a comment - - edited

          (1) not directly related, but a minor issue :
          if a trigger references items from two hosts, previously they were shown on one line, if there was enough space. now they are split in two lines even if there's more than enough space.

          before :

          after :

          regression, broken by :

          ------------------------------------------------------------------------
          r38449 | eduards | 2013-09-12 12:06:15 +0300 (Thu, 12 Sep 2013) | 3 lines

          A.F.I..... ZBXNEXT-1786 implemented script name tree in menu popups (Eduard, Sasha)
          ..F....... ZBXNEXT-1786 redesigned menu popups using jQuery Menu (Eduard)
          ..F....... ZBXNEXT-1786 updated jQuery-ui to latest (Eduard)
          ------------------------------------------------------------------------

          if this can not be handled in this issue, please split it out in a separate issue

          Ivo Kurzemnieks RESOLVED for:

          • 2.4 in svn://svn.zabbix.com/branches/dev/ZBX-9257 r51910
          • trunk in svn://svn.zabbix.com/branches/dev/ZBX-9257-trunk r51931

          Alexander Vladishev CLOSED

          Show
          richlv added a comment - - edited (1) not directly related, but a minor issue : if a trigger references items from two hosts, previously they were shown on one line, if there was enough space. now they are split in two lines even if there's more than enough space. before : after : regression, broken by : ------------------------------------------------------------------------ r38449 | eduards | 2013-09-12 12:06:15 +0300 (Thu, 12 Sep 2013) | 3 lines A.F.I..... ZBXNEXT-1786 implemented script name tree in menu popups (Eduard, Sasha) ..F....... ZBXNEXT-1786 redesigned menu popups using jQuery Menu (Eduard) ..F....... ZBXNEXT-1786 updated jQuery-ui to latest (Eduard) ------------------------------------------------------------------------ if this can not be handled in this issue, please split it out in a separate issue Ivo Kurzemnieks RESOLVED for: 2.4 in svn://svn.zabbix.com/branches/dev/ZBX-9257 r51910 trunk in svn://svn.zabbix.com/branches/dev/ZBX-9257-trunk r51931 Alexander Vladishev CLOSED
          Hide
          richlv added a comment - - edited

          confirming in trunk r51893; seems to happen when trigger references items from more than one host

          regression, caused by :

          ------------------------------------------------------------------------
          r41617 | eduards | 2014-01-17 14:25:52 +0200 (Fri, 17 Jan 2014) | 8 lines

          ..F....... ZBXNEXT-2073 improved dashboard refresh time menu
          ..F....... ZBXNEXT-2073 improved dashboard favourite menu
          ..F....... ZBXNEXT-2073 improved dashboard refresh time menu
          ..F....... ZBXNEXT-2073 improved service configuration menu
          ..F....... ZBXNEXT-2073 improved slide show refresh multiplier menu
          ..F....... ZBXNEXT-2073 improved trigger log menu
          ..F....... ZBXNEXT-2073 improved trigger macros menu
          ..F....... ZBXNEXT-2073 update jQuery to latest 1.10.2
          ------------------------------------------------------------------------

          Show
          richlv added a comment - - edited confirming in trunk r51893; seems to happen when trigger references items from more than one host regression, caused by : ------------------------------------------------------------------------ r41617 | eduards | 2014-01-17 14:25:52 +0200 (Fri, 17 Jan 2014) | 8 lines ..F....... ZBXNEXT-2073 improved dashboard refresh time menu ..F....... ZBXNEXT-2073 improved dashboard favourite menu ..F....... ZBXNEXT-2073 improved dashboard refresh time menu ..F....... ZBXNEXT-2073 improved service configuration menu ..F....... ZBXNEXT-2073 improved slide show refresh multiplier menu ..F....... ZBXNEXT-2073 improved trigger log menu ..F....... ZBXNEXT-2073 improved trigger macros menu ..F....... ZBXNEXT-2073 update jQuery to latest 1.10.2 ------------------------------------------------------------------------
          Hide
          richlv added a comment - - edited

          (2) the links are missing in monitoring -> triggers. they are still there in monitoring -> overview, but they did not have host prefixed even before the regression in r41617.

          let's figure out why those menus are different and fix them in all places we can think of.

          looks like... if items with different keys are from 2 different hosts, links are missing in monitoring -> triggers, and they are available, but without host prefix.
          if items are from 2 different hosts but with the same key, item links also disappear in the overview page.

          Ivo Kurzemnieks another similar thing happens: trigger with 2 items from same host seems to work, but 3 no longer work (even if all if them are supported). Not it Monitoring->Overview and not in Monitoring->Triggers.

          Ivo Kurzemnieks RESOLVED for:

          • 2.4 in svn://svn.zabbix.com/branches/dev/ZBX-9257 r51909
          • trunk in svn://svn.zabbix.com/branches/dev/ZBX-9257-trunk r51930

          Alexander Vladishev The links are not sorted.

          REOPENED

          Ivo Kurzemnieks As discussed, I move item retrieval code in one place and fixed sorting.
          RESOLVED for 2.4 only in svn://svn.zabbix.com/branches/dev/ZBX-9257 r51964

          Alexander Vladishev Any API calls should be outside menu helpers.

          REOPENED

          Ivo Kurzemnieks RESOLVED in r52079

          Alexander Vladishev CLOSED

          Show
          richlv added a comment - - edited (2) the links are missing in monitoring -> triggers. they are still there in monitoring -> overview, but they did not have host prefixed even before the regression in r41617. let's figure out why those menus are different and fix them in all places we can think of. looks like... if items with different keys are from 2 different hosts, links are missing in monitoring -> triggers, and they are available, but without host prefix. if items are from 2 different hosts but with the same key, item links also disappear in the overview page. Ivo Kurzemnieks another similar thing happens: trigger with 2 items from same host seems to work, but 3 no longer work (even if all if them are supported). Not it Monitoring->Overview and not in Monitoring->Triggers. Ivo Kurzemnieks RESOLVED for: 2.4 in svn://svn.zabbix.com/branches/dev/ZBX-9257 r51909 trunk in svn://svn.zabbix.com/branches/dev/ZBX-9257-trunk r51930 Alexander Vladishev The links are not sorted. REOPENED Ivo Kurzemnieks As discussed, I move item retrieval code in one place and fixed sorting. RESOLVED for 2.4 only in svn://svn.zabbix.com/branches/dev/ZBX-9257 r51964 Alexander Vladishev Any API calls should be outside menu helpers. REOPENED Ivo Kurzemnieks RESOLVED in r52079 Alexander Vladishev CLOSED
          Hide
          Ivo Kurzemnieks added a comment - - edited

          RESOLVED for:

          • 2.4 in svn://svn.zabbix.com/branches/dev/ZBX-9257
          • trunk in svn://svn.zabbix.com/branches/dev/ZBX-9257-trunk
          Show
          Ivo Kurzemnieks added a comment - - edited RESOLVED for: 2.4 in svn://svn.zabbix.com/branches/dev/ZBX-9257 trunk in svn://svn.zabbix.com/branches/dev/ZBX-9257-trunk
          Hide
          Alexander Vladishev added a comment - - edited

          (3) Take a look at my changes in r52107.

          Ivo Kurzemnieks Thanks!
          CLOSED.

          Show
          Alexander Vladishev added a comment - - edited (3) Take a look at my changes in r52107. Ivo Kurzemnieks Thanks! CLOSED.
          Hide
          Ivo Kurzemnieks added a comment -

          Fixed:

          • displaying missing history links in trigger context menu,
          • added missing host prefix before items in trigger context menu if trigger belongs to multiple hosts,
          • changed displaying host list from vertical to horizontal if trigger belongs to multiple hosts.

          Fixed in:

          • pre-2.4.4rc1 r52109
          • pre-2.5.0 (trunk) r52110
          Show
          Ivo Kurzemnieks added a comment - Fixed: displaying missing history links in trigger context menu, added missing host prefix before items in trigger context menu if trigger belongs to multiple hosts, changed displaying host list from vertical to horizontal if trigger belongs to multiple hosts. Fixed in: pre-2.4.4rc1 r52109 pre-2.5.0 (trunk) r52110

            People

            • Assignee:
              Unassigned
              Reporter:
              Jakub Kuchta
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: