[rhmessaging-commits] rhmessaging commits: r3819 - mgmt/trunk/cumin/python/cumin/grid.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Tue Jan 26 11:09:26 EST 2010


Author: eallen
Date: 2010-01-26 11:09:26 -0500 (Tue, 26 Jan 2010)
New Revision: 3819

Modified:
   mgmt/trunk/cumin/python/cumin/grid/slot.py
   mgmt/trunk/cumin/python/cumin/grid/slot.strings
Log:
Change the flash slot vis to show the slot page when a slot is clicked.

Modified: mgmt/trunk/cumin/python/cumin/grid/slot.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/slot.py	2010-01-26 16:08:35 UTC (rev 3818)
+++ mgmt/trunk/cumin/python/cumin/grid/slot.py	2010-01-26 16:09:26 UTC (rev 3819)
@@ -280,6 +280,7 @@
                     el.value = records[i]["name"] and records[i]["name"] or ""
                     el.load_avg = records[i]["load_avg"] and round(records[i]["load_avg"], 2) or 0
                     el.name = "slot"
+                    el.slot_id = records[i]["id"]
                     level_list.append(el)
             return level_list
 

Modified: mgmt/trunk/cumin/python/cumin/grid/slot.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/slot.strings	2010-01-26 16:08:35 UTC (rev 3818)
+++ mgmt/trunk/cumin/python/cumin/grid/slot.strings	2010-01-26 16:09:26 UTC (rev 3819)
@@ -760,11 +760,6 @@
                     vis.fire_slot_info(click_info.index);
                 }
             }
-            function go_to_slot(id) {
-                var branch = wooly.session.branch(show_slot_url);
-                branch[branch.frame + ".id"] = id;
-                window.location.href = branch.marshal();
-            }
         }
     }
 
@@ -777,7 +772,7 @@
        return false;
     }
 
-     function doDoubleClick(e) {
+    function doDoubleClick(e) {
        var now = new Date();
        clicks.doubleclick_when = now.getTime();
        if (clicks.click_handle != null) {
@@ -787,9 +782,18 @@
        if (!e) var e = window.event;
        var posxy = get_relative_event_pos(e);
        vis.zoom_in_slots(posxy);
-     }
+    }
 }())
 
+function go_to_slot(id) {
+    var branch = wooly.session.branch(show_slot_url);
+    branch[branch.frame + ".id"] = id;
+    window.location.href = branch.marshal();
+}
+function vis_clicked(slot) {
+    go_to_slot(slot);
+}
+
 /* generic get value from cookie */
 function get_cookie(name) {
     return get_value(document.cookie, name, ";");
@@ -1091,6 +1095,7 @@
 {slot_info}
 <script type="text/javascript">
 //<![CDATA[
+    var show_slot_url = "{slot_url}";
     var flashversion = swfobject.getFlashPlayerVersion();
     if (flashversion.major < 9) {
  		var psm = document.getElementById('pngSlotMap');
@@ -1101,7 +1106,6 @@
 			theImage.src = "{image_href}";
 		}
         var slot_current_id = "{id}";
-	    var show_slot_url = "{slot_url}";
 	    var slot_job_index = "{job_index_param}";
 	    var slot_map_info = {size: 0, width: 0, height: 0, count: 0, rows: 0, cols: 0};
 	    var slot_clip_size = {slot_clip_size};



More information about the rhmessaging-commits mailing list