Ad Widget

Collapse

Version Pre 1.7.0 Build 7280 -- Problems with "Select Node" Button

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

    #1

    Version Pre 1.7.0 Build 7280 -- Problems with "Select Node" Button

    I did the following test with a clean install of the frontend with no personal patches.

    Seeing the following 2 issues with the new "Select Nodes" button.

    Setup:
    3 Nodes: ID:1 Central (Master), ID:3 Server Prod, ID:5 Web (ID:2 and ID:4 are for future use and have been skipped)

    Note: Profile table was truncated to make sure no stale profiles existed.

    1st Issue:
    Test with FireFox. If a user goes to
    - "Monitoring"
    - "Latest Data"
    - then select the "Select Nodes" button and expand the "Central" node.
    The following error will occur after the expansion of "Central": "this.treenode[id] is undefined":

    Select Node Button:
    Click image for larger version

Name:	Select_Node_List_Firefox.JPG
Views:	1
Size:	9.4 KB
ID:	315101

    Error:
    Click image for larger version

Name:	Select_Node_Error.JPG
Views:	1
Size:	49.2 KB
ID:	315100

    2nd Issue:
    In IE6 the "Select Node" menu is long or stretched and the group and host boxes are shown through the select node box. See graphic below.

    Click image for larger version

Name:	Select_Node_List_IE6.JPG
Views:	1
Size:	17.4 KB
ID:	315102
    Last edited by Palmertree; 15-05-2009, 05:31.
  • Aly
    ZABBIX developer
    • May 2007
    • 1126

    #2
    Hi

    1. Is this behavior is seen only on the latest data screen?

    2. Ohh IE6 is just too buggy dropdown objects over popups is a known and serious bug in IE6.. I'll see what I can do here
    Zabbix | ex GUI developer

    Comment

    • Palmertree
      Senior Member
      • Sep 2005
      • 746

      #3
      Hi Aly,
      Thanks for the quick reply.

      1. I actually see this error on every screen. Just tried "Configuration" -> "Items and also "Configuration" -> "Host" and tried to expand the "Central" node by clicking on the "+" sign in the select node box and got the error "this.treenode[id] is undefined". After the error occurs, I have close the browser and relaunch Firefox because it makes it unresponsive.

      2. Thanks. I know IE6 is full of wonderfull features. I am hoping we go away from it soon.

      Thanks in advance for all of your help. As always, it is greatly appreciated. Keep up the good work!
      Last edited by Palmertree; 18-05-2009, 14:20.

      Comment

      • Aly
        ZABBIX developer
        • May 2007
        • 1126

        #4
        1. I've fixed important problem related to nodes selection, so please try latest rev. tell me if it helped

        2. In process
        Last edited by Aly; 19-05-2009, 10:55.
        Zabbix | ex GUI developer

        Comment

        • Palmertree
          Senior Member
          • Sep 2005
          • 746

          #5
          Aly,

          Thank you for the quick turn around.

          1. We will test this morning the latest SVN trunk and will report our findings on the node ID select problem.

          2. Let us know when completed and we will be glad to test IE6. Thanks in advance.

          Comment

          • Palmertree
            Senior Member
            • Sep 2005
            • 746

            #6
            Originally posted by Palmertree

            1. We will test this morning the latest SVN trunk and will report our findings on the node ID select problem.
            I am still seeing the error in the latest SVN trunk.

            Comment

            • Aly
              ZABBIX developer
              • May 2007
              • 1126

              #7
              I'll keep searching..
              Zabbix | ex GUI developer

              Comment

              • Palmertree
                Senior Member
                • Sep 2005
                • 746

                #8
                Thanks Aly.

                I will troubleshoot from my end as well.

                Here are some Firebug screenshots that might help. Let me know if you need any more information from the "watch" panel.

                Looks like the following js functions are called:
                closeSNodeX() -> OpenNode() ->getNodeStatus()

                closeSNodeX:
                Click image for larger version

Name:	closeSNodeX.JPG
Views:	1
Size:	92.8 KB
ID:	308538

                OpenNode:
                Click image for larger version

Name:	OpenNode.JPG
Views:	1
Size:	96.2 KB
ID:	308539

                getNodeStatus:
                Click image for larger version

Name:	getNodeStatus.JPG
Views:	1
Size:	101.2 KB
ID:	308540
                Last edited by Palmertree; 20-05-2009, 13:46.

                Comment

                • Aly
                  ZABBIX developer
                  • May 2007
                  • 1126

                  #9
                  Actually, I think that problem with js is a consequence of the 1st problem... The problem is that I can't reproduce it.. may be I can give you a php sript with debug info or tell you were to put it so I could "remotely" debug it?!
                  Zabbix | ex GUI developer

                  Comment

                  • Palmertree
                    Senior Member
                    • Sep 2005
                    • 746

                    #10
                    1. Found a solution for the 1st problem. See below. Beside a modification to the tree.js file, the config.inc.php file had to be modified because the selected_nodes kept loosing their focus when the menus were set to ZBX_DROPDOWN_FIRST_NONE.

                    Code:
                    diff -ruN php.backup/include/config.inc.php php/include/config.inc.php
                    --- php.backup/include/config.inc.php   2009-05-21 09:01:13.000000000 -0400
                    +++ php/include/config.inc.php  2009-05-22 00:23:14.000000000 -0400
                    @@ -340,7 +340,7 @@
                                            switch($dd_first_entry) {
                                                    case ZBX_DROPDOWN_FIRST_NONE: // NONE
                                                            if($switch_node == 0) {
                    -                                               $result['nodeids'] = array();
                    +                                               $result['nodeids'] = $nodeids;
                                                            }
                                                    break;
                                                    case ZBX_DROPDOWN_FIRST_ALL:
                    diff -ruN php.backup/js/tree.js php/js/tree.js
                    --- php.backup/js/tree.js       2009-05-21 09:01:13.000000000 -0400
                    +++ php/js/tree.js      2009-05-22 00:17:16.000000000 -0400
                    @@ -97,9 +97,10 @@
                                    var c = nodelist.length-1;
                                    for(var i=0; i<c; i++){
                                            document.getElementById('id_'+nodelist[i]).style.display = (IE)?('block'):('table-row');
                    +                               if(this.checkParent(nodelist[i])){
                                            if(this.getNodeStatus(nodelist[i]) == 'open'){
                                                    this.OpenNode(this.treenode[nodelist[i]].nodelist.split(','));
                    -                       }
                    +                       }}
                                    }
                            } catch(e){
                                    throw('JSTree ERROR [OpenNode]: '+e);
                    @@ -111,9 +112,10 @@
                                    var c = nodelist.length-1;
                                    for(var i=0; i<c; i++){
                                            document.getElementById('id_'+nodelist[i]).style.display = 'none';
                    +                               if(this.checkParent(nodelist[i])){
                                            if(this.getNodeStatus(nodelist[i]) == 'open'){
                                                    this.CloseNode(this.treenode[nodelist[i]].nodelist.split(','));
                    -                       }
                    +                       }}
                                    }
                            } catch(e){
                                    throw('JSTree ERROR [CloseNode]: '+e);
                    2. Looks like IE6 has an issue with "select" drop downs because they do not play by the rules even when using z-index values. IE6 puts "select" boxes on top of everything. Looks like the only way to fix it is by using an iframe with -1 z-index over the select box or temporarily converting the select boxes to span type and back to select.

                    Here is an interesting article about it:
                    Fixing Overlaying Layers with Dropdowns in IE


                    I hope this helps. Not sure what is the best method to use in Zabbix.
                    Last edited by Palmertree; 22-05-2009, 06:42.

                    Comment

                    • Aly
                      ZABBIX developer
                      • May 2007
                      • 1126

                      #11
                      We've changed nodes dropdown behavior, but still guessing on why there were js errors.. Please report if you'll have problems with JS, after update
                      Zabbix | ex GUI developer

                      Comment

                      • Palmertree
                        Senior Member
                        • Sep 2005
                        • 746

                        #12
                        IE Select Box Fix and Treenode ID Undefined

                        We were still having JS errors with the latest SVN. Had to still apply the patch to the tree.js file to stop the js errors. The following patch below includes a fix for IE and the select boxes showing through the div object. I hope it is useful to someone. Tested on SVN zabbix-1.7.7334 with IE6 and Firefox 3.0.10.

                        patch (IE select fix).txt

                        Note: The only problem left is to fix the large div_node_tree box that is created in IE using div block type. It expands the whole table cell creating large node_select box unlike Firefox which is neat, trimmed box.
                        Last edited by Palmertree; 02-06-2009, 07:52.

                        Comment

                        Working...