Ad Widget

Collapse

Version Pre 1.7.0 Build 6806 -- Fixes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Palmertree
    Senior Member
    • Sep 2005
    • 746

    #1

    Version Pre 1.7.0 Build 6806 -- Fixes

    The following path fixes the following issues:

    Fixed with patch below:
    • Invalid URL when adding users to a user group while in the User Group.
    • Invalid URL when using script_ex on the dashboard (ping, traceroute,etc)
    • When clicking on a host and selecting "latest data" from the pop menu in last 20 events on the dashboard, the sid identifier is missing and so is the groupid.
    Still broken:
    • A user with only access (limited access) to certain groups, the user is given permission denied message when trying to build a bar report when selecting an item for the report.
    Fix for adding user while view user_group:
    Code:
    diff -ruN zabbix-original/frontends/php/popup_users.php zabbix/frontends/php/popup_users.php
    --- zabbix-original/frontends/php/popup_users.php       2008-01-21 10:44:31.000000000 -0500
    +++ zabbix/frontends/php/popup_users.php        2009-02-26 01:22:59.000000000 -0500
    @@ -88,8 +88,8 @@
            $result = DBselect('select * from users where '.DBin_node('userid').' order by name');
            while($row = DBfetch($result))
            {
    -               $name = new CLink($row["alias"],"#","action");
    -               $name->SetAction('return add_user("'.$dstfrm.'","'.$row['userid'].'","'.$row['alias'].'");');
    +               $name = new CSpan($row['alias'],'link');
    +               $name->addAction('onclick',"return add_user('".$dstfrm."','".$row['userid']."','".$row['alias']."');");
                    $table->addRow(array($name, $row['name'], $row['surname'], user_type2str($row['type'])));
            }
            $table->show();
    Fix for script_ex tools and latest data from dashboard:
    Code:
    diff -ruN zabbix-original/frontends/php/include/blocks.inc.php zabbix/frontends/php/include/blocks.inc.php
    --- zabbix-original/frontends/php/include/blocks.inc.php        2009-02-17 10:47:40.000000000 -0500
    +++ zabbix/frontends/php/include/blocks.inc.php 2009-02-26 01:30:23.000000000 -0500
    @@ -455,7 +455,7 @@
                    S_ACTIONS
                    ));
    
    -       $sql = 'SELECT DISTINCT t.triggerid,t.status,t.description,t.priority,t.lastchange,t.value,h.host,h.hostid '.$sql_select.
    +       $sql = 'SELECT DISTINCT t.triggerid,t.status,t.description,t.priority,t.lastchange,t.value,h.host,h.hostid,hg.groupid '.$sql_select.
                                    ' FROM triggers t,hosts h,items i,functions f,hosts_groups hg '.$sql_from.
                                    ' WHERE f.itemid=i.itemid '.
                                            ' AND h.hostid=i.hostid '.
    @@ -480,11 +480,11 @@
                    foreach($scripts_by_hosts[$row['hostid']] as $id => $script){
                            $script_nodeid = id2nodeid($script['scriptid']);
                            if( (bccomp($host_nodeid ,$script_nodeid ) == 0))
    -                               $menus.= "['".$script['name']."',\"javascript: openWinCentered('scripts_exec.php?execute=1&hostid=".$row['hostid']."&scriptid=".$script['scriptid']."','".S_TOOLS."',760,540,'titlebar=no, resizable=yes, scrollbars=yes, dialog=no');\", null,{'outer' : ['pum_o_item'],'inner' : ['pum_i_item']}],";
    +                               $menus.= "['".$script['name']."',\"javascript: openWinCentered('scripts_exec.php?execute=1&hostid=".$row['hostid']."&scriptid=".$script['scriptid']."&sid=".$_REQUEST['sid']."','".S_TOOLS."',760,540,'titlebar=no, resizable=yes, scrollbars=yes, dialog=no');\", null,{'outer' : ['pum_o_item'],'inner' : ['pum_i_item']}],";
                    }
    
                    $menus.= "[".zbx_jsvalue(S_LINKS).",null,null,{'outer' : ['pum_oheader'],'inner' : ['pum_iheader']}],";
    -               $menus.= "['".S_LATEST_DATA."',\"javascript: redirect('latest.php?hostid=".$row['hostid']."')\", null,{'outer' : ['pum_o_item'],'inner' : ['pum_i_item']}],";
    +               $menus.= "['".S_LATEST_DATA."',\"javascript: redirect('latest.php?groupid=".($row['groupid'])."&hostid=".$row['hostid']."&sid=".$_REQUEST['sid']."')\", null,{'outer' : ['pum_o_item'],'inner' : ['pum_i_item']}],";
    
                    $menus = rtrim($menus,',');
                    $menus="show_popup_menu(event,[[".zbx_jsvalue(S_TOOLS).",null,null,{'outer' : ['pum_oheader'],'inner' : ['pum_iheader']}],".$menus."],180);";
    @@ -1008,4 +1008,4 @@
     return $screenids;
     }
    
    -?>
    \ No newline at end of file
    +?>
    Last edited by Palmertree; 26-02-2009, 09:44.
  • Aly
    ZABBIX developer
    • May 2007
    • 1126

    #2
    Thank you Palmertree, we'll check it
    Zabbix | ex GUI developer

    Comment

    • Vedmak
      Member
      • Feb 2009
      • 34

      #3
      Originally posted by Palmertree
      Still broken:
      • A user with only access (limited access) to certain groups, the user is given permission denied message when trying to build a bar report when selecting an item for the report.
      We fixed other issues, but cannot reproduce this one, could You please give us more info about it.

      Comment

      Working...