Announcement

Collapse
No announcement yet.

bonsai zoom function

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • bonsai zoom function

    There have been updates to the code. Goto the link below
    http://forum.oreon-project.org/showt...?t=3202&page=2


    Is the zoom function still in dev? I see the code is partially there but it dosen't work.

    Thanks,

    Justin
    Last edited by breakintheweb; 24 April 2007, 18:02.

  • #2
    Like Cacti ? Not yet, but it's just because we didn't have enought time to do it, maybe one hour is enough to include it... Wanna try ?
    Romain Le Merlus
    Centreon Forge
    MERETHIS

    Comment


    • #3
      Originally posted by rom View Post
      Like Cacti ? Not yet, but it's just because we didn't have enought time to do it, maybe one hour is enough to include it... Wanna try ?

      I'll give it a shot, just wanted to make sure someone else wasn't working on it. Javscript isn't a one of my strong points.

      Comment


      • #4
        I got it working. I'll post the code after testing it a bit more

        see attached image
        Attached Files

        Comment


        • #5
          Originally posted by breakintheweb View Post
          I got it working. I'll post the code after testing it a bit more

          see attached image
          open the following file:
          /include/views/graphs/graphODS/graphODSServiceZoom.php

          Find the following at the begining:
          if (!isset($oreon))
          exit();

          add the following after the previos code
          # include js for zoombox
          include('zoombox.php');
          include('javascript.php');

          Copy zipped files into /include/views/graphs/graphODS/

          NOTE: I've only tested this code in IE7

          Questions or comments are welcomed.
          Attached Files

          Comment


          • #6
            Great !! I'll test it in the morning !!!
            Romain Le Merlus
            Centreon Forge
            MERETHIS

            Comment


            • #7
              Originally posted by breakintheweb View Post
              I got it working. I'll post the code after testing
              Intel(R) Xeon(TM) CPU 3.4GHz - MemTotal : 1034476 kB
              Centreon 2.4.1 - Nagios 3.2.1 - Nagios Plugins 1.4.15 - Manubulon Plugins tuné
              Fedora Core 5 - 2.6.20-1.2320

              Comment


              • #8
                That's a nice idea!
                Indeed in firefox it doesn't seem to work yet, the zoom-out (right-click) works, but zoom-in not (I don't get a cross cursor).
                In IE6 I have the effect that the zoom-function shows the graph 1 to 2 hours later then I selected. Maybe it has something to do with the GMT oreon option?

                Regards
                Menno

                Comment


                • #9
                  I'm not sure why it's not working in firefox. Javascript isn't a strong area for me. As for the ie6 issue, i have my gmt set to 0 and the zoom function is right. It might be a GMT issue.

                  Thanks for giving feedback.

                  Originally posted by Menno View Post
                  That's a nice idea!
                  Indeed in firefox it doesn't seem to work yet, the zoom-out (right-click) works, but zoom-in not (I don't get a cross cursor).
                  In IE6 I have the effect that the zoom-function shows the graph 1 to 2 hours later then I selected. Maybe it has something to do with the GMT oreon option?

                  Regards
                  Menno

                  Comment


                  • #10
                    The issue was with div values that didn't meet xhtml spec. Attached are the updated files.

                    It now works in Firefox 2.0, IE6, IE7

                    I will probably make one more post with the final package. I would like to follow oreon standards of calling .js files from the topology_js table as opposed to include file calls.

                    Any feedback is appreciated.

                    -Justin
                    Attached Files
                    Last edited by breakintheweb; 24 April 2007, 17:17.

                    Comment


                    • #11
                      Final Install Directions.

                      First, Undo anything you've done above

                      Next insert sql, statement

                      Code:
                      INSERT INTO `topology_JS` (`id_t_js`, `id_page`, `o`, `PathName_js`, `Init`) VALUES 
                      ('', 4, 'vz', './include/common/javascript/zoom.js', 'initBonsai');
                      
                      INSERT INTO `topology_JS` (`id_t_js`, `id_page`, `o`, `PathName_js`, `Init`) VALUES 
                      ('', 40207, 'vz', './include/common/javascript/zoom.js', 'initBonsai');
                      Finally copy zoom.js into

                      www/include/common/javascript/

                      and copy graphODSServiceZoom.ihtml into:

                      www/include/views/graphs/graphODS/
                      Attached Files
                      Last edited by breakintheweb; 16 May 2007, 15:36.

                      Comment


                      • #12
                        In my topology_JS file I already have an id_t_js 166. But even when I overwrite that or when I use the next free id_t_js (171) the zoom is not working. No cross, no zoomout with rightclick. Used IE6.1 and FF1.5.

                        Regards
                        Menno

                        Comment


                        • #13
                          In the sql insert statement, take the 166 out and replace it with ''. I edited my above post to reflect this.


                          Originally posted by Menno View Post
                          In my topology_JS file I already have an id_t_js 166. But even when I overwrite that or when I use the next free id_t_js (171) the zoom is not working. No cross, no zoomout with rightclick. Used IE6.1 and FF1.5.

                          Regards
                          Menno

                          Comment


                          • #14
                            Again a small bug. The zoom works when we from "Oreon View"...but when we from "Monitoring / And click on graph icon"...it doesn't works after.

                            Comment


                            • #15
                              I've just tested, and you are right. Add the following to sql to fix.
                              Code:
                              INSERT INTO `topology_JS` (`id_t_js`, `id_page`, `o`, `PathName_js`, `Init`) VALUES 
                              ('', 40207, 'vz', './include/common/javascript/zoom.js', 'initBonsai');

                              Comment

                              Working...
                              X