Changeset 3cdcc0696b3548d1e797b7cca775f824e1f3038d

Show
Ignore:
Timestamp:
10/15/08 19:08:35 (6 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1224097715 +0000
git-parent:

[6f65b602add1372fe24881cc8c62d7339d220045]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1224097715 +0000
Message:

encapsulate the graphing stuff, refs #22

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • ui/web/htdocs/css/style.css

    r33c2ab0 r3cdcc06  
    556556div.tooltip { 
    557557background:white none repeat scroll 0 0; 
    558 border:1px solid #999999; 
    559 opacity:0.9; 
     558border:1px solid #333; 
    560559padding:0 3px; 
    561560} 
  • ui/web/htdocs/index.php

    r42e228b r3cdcc06  
    1717<script src="js/jquery.treeview.js" type="text/javascript"></script> 
    1818<script src="js/jquery.treeview.async.js" type="text/javascript"></script> 
     19<script src="js/recon.js" type="text/javascript"></script> 
    1920 
    2021<!-- color picker --> 
  • ui/web/htdocs/worksheet_panel.inc

    re13244c r3cdcc06  
    55<!-- 
    66var ws_displayinfo = { start : 14*86400, cnt: '100', end: '' }; 
    7 function ws_redraw_graph(info, domid) { 
    8   if(info.datapoints.length > 0) { 
    9     var url = "flot/graph/settings/" + info.graphid; 
    10     $(domid + " .plot-area").html('<div class="centered"><div class="loading">&nbsp;</div></div>'); 
    11     $.getJSON(url, {'cnt':ws_displayinfo.cnt, 
    12                     'start':ws_displayinfo.start, 
    13                     'end':ws_displayinfo.end}, 
    14               function (r) { plot_id(r,domid, function() { ws_displayinfo = displayinfo; load_worksheet(); }); }); 
    15   } 
    16   else { 
    17     $(domid + " .plot-area").html('<div class="centered">No data</div>'); 
    18   } 
    19 } 
    20 function ws_refresh_graph_from_json(info, domid) { 
    21   if(info.datapoints == undefined) info.datapoints = Array(); 
    22   $(domid + " h3.graphTitle").html(info.title); 
    23   ws_redraw_graph(info, domid); 
    24 } 
    25 function ws_fetch_graph_info(id, domid) { 
    26   $.getJSON("json/graph/info/" + id, 
    27             function(r) { ws_refresh_graph_from_json(r, domid); }); 
    28 } 
    297function process_worksheet_json(r) { 
    308  var ul = $("ul#worksheet-graphs"); 
    319  ul.empty(); 
    3210  for(var i = 0; i < r.graphs.length; i++) { 
    33     var o = $("#maingraph-template").clone(); 
    34     o.attr("id", r.graphs[i].graphid); 
     11    r.graphs[i].start = ws_displayinfo.start; 
     12    r.graphs[i].end = ws_displayinfo.end; 
     13    r.graphs[i].cnt = ws_displayinfo.cnt; 
     14    var o = $('<div></div>').ReconGraph( r.graphs[i] ); 
    3515    ul.append($('<li/>').append(o)); 
    36     ws_refresh_graph_from_json(r.graphs[i], "#" + r.graphs[i].graphid); 
     16    o.ReconGraphRefresh(); 
    3717  } 
    3818  ul.sortable({ handle: '.graphTitle', 
     
    4424                      function(i) { ol.push($(this).attr("id")); } 
    4525                    ); 
     26                    // Store new worksheet order here 
    4627                    console.log(ol); 
    4728                  }