[Reconnoiter-devel] [reconnoiter commit] r768 - in trunk/ui/web/htdocs: . js

svn-commit at lists.omniti.com svn-commit at lists.omniti.com
Wed Jun 24 15:26:38 EDT 2009


Author: umar
Date: 2009-06-24 15:26:38 -0400 (Wed, 24 Jun 2009)
New Revision: 768

Modified:
   trunk/ui/web/htdocs/drawing_board.php
   trunk/ui/web/htdocs/js/recon.js
Log:
 match default granularity for plots, the initial blank worksheet is now editable, as it should be

Modified: trunk/ui/web/htdocs/drawing_board.php
===================================================================
--- trunk/ui/web/htdocs/drawing_board.php	2009-06-23 19:41:24 UTC (rev 767)
+++ trunk/ui/web/htdocs/drawing_board.php	2009-06-24 19:26:38 UTC (rev 768)
@@ -90,17 +90,17 @@
 	  end = end.toUTCString();
        }
        else end = "";
+       var gran = <?php echo "\"$gran\"";?>;
 
        if(otype == 'graph') {
-	  var gran = <?php echo "\"$gran\"";?>;
 	  $('#drawing_board').width('780px');
 	  $('#drawing_board').height('400px');
-	  worksheet.render_graph_inpage('drawing_board', id, start, end);
+	  worksheet.render_graph_inpage('drawing_board', id, start, end, gran);
        }
        else if(otype == 'wsheet') {
      	  $('#drawing_board').width('1200px');
 	  $('#drawing_board').height('800px');
-	  worksheet.render_ws_inpage('drawing_board', id, start, end);
+	  worksheet.render_ws_inpage('drawing_board', id, start, end, gran);
        }
 }
 </script>

Modified: trunk/ui/web/htdocs/js/recon.js
===================================================================
--- trunk/ui/web/htdocs/js/recon.js	2009-06-23 19:41:24 UTC (rev 767)
+++ trunk/ui/web/htdocs/js/recon.js	2009-06-24 19:26:38 UTC (rev 768)
@@ -813,7 +813,7 @@
 var worksheet = (function($) {
   var ws_displayinfo = { start : 14*86400, cnt: '100', end: '' };
   var wsinfo = {};
-  var locked = true;
+  var locked = false;
   streaming = false;  //precautionary...should be set to false wherever we use it when weere done
   var stream_graph;
 
@@ -864,9 +864,10 @@
     return o;
   }
 
-  function render_ws_inpage(divid, id, start, end) {
+  function render_ws_inpage(divid, id, start, end, gran) {
       ws_displayinfo.start = start;
       ws_displayinfo.end = end;
+      if(gran) ws_displayinfo.cnt = gran;
 
       plot_board = $('#'+divid);
 
@@ -913,12 +914,13 @@
       lock_wforms();
   }
 
-  function render_graph_inpage(divid, id, start, end) {
+  function render_graph_inpage(divid, id, start, end, gran) {
 
 $.getJSON("json/graph/info/" + id, function (ginfo) {
+
 	      streaming = false;  //precautionary
 	      stream_graph = $('#'+divid);
-	      stream_graph.ReconGraph({graphid: ginfo.id, type: ginfo.type});
+	      stream_graph.ReconGraph({graphid: ginfo.id, type: ginfo.type, width: (gran) ? gran : 780});
 	      stream_graph.ReconGraphRefresh({graphid: ginfo.id, start: start, end: end, stacks: ginfo.stacks});
 
     var dtool =  $("<div id='mini_ws_datetool'>");
@@ -986,7 +988,7 @@
   if(id) $.getJSON("json/graph/info/" + id, function (ginfo) {
 
     streaming = false;  //precautionary
-    stream_graph = $('<div></div>').ReconGraph({graphid: ginfo.id, type: ginfo.type});
+    stream_graph = $('<div></div>').ReconGraph({graphid: ginfo.id, type: ginfo.type, width:780});
     var smod = stream_graph.modal({
       containerId: 'StreamingModalContainer',
       close: 'true',
@@ -1151,6 +1153,7 @@
                    if(r.error) wsinfo.saved = false;
                    else {
                       $(".rememberWorksheet").html('Remebered').fadeOut('slow');
+	      	      if(wsinfo.id) update_worksheet_permalink(wsinfo.id, "", "", "");
                       unlock_wforms();
                    }
                  });
@@ -1187,7 +1190,7 @@
             wsinfo.graphs.push(g.graphid);
          });
       }
-      update_worksheet_permalink(wsinfo.id, "", "", "");
+      update_worksheet_permalink(wsinfo.id, "", "", ws_displayinfo.cnt);
       ul.sortable("refresh");
   }
 
@@ -1225,7 +1228,7 @@
     ws_displayinfo.start = start;
     ws_displayinfo.end = end;
     if(cnt) ws_displayinfo.cnt = cnt;
-    update_worksheet_permalink(wsinfo.id, ws_displayinfo.start, ws_displayinfo.end, "");
+    update_worksheet_permalink(wsinfo.id, ws_displayinfo.start, ws_displayinfo.end, ws_displayinfo.cnt);
   }
   function refresh_worksheet() {
     var g = { start: ws_displayinfo.start,



More information about the Reconnoiter-devel mailing list