Changeset 4a1704f7922449c69cdc552a031b283b02ab5fe1

Show
Ignore:
Timestamp:
06/16/09 17:24:03 (9 years ago)
Author:
Umar Farooq <umar@omniti.com>
git-committer:
Umar Farooq <umar@omniti.com> 1245173043 +0000
git-parent:

[1fa32a0fe64c969c502d0a488ffbc31f55667404]

git-author:
Umar Farooq <umar@omniti.com> 1245173043 +0000
Message:

taking out debugging, and fixes for permalink streaming, refs #144 and #100

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • ui/web/htdocs/drawing_board.php

    r1fa32a0 r4a1704f  
    1919<link href="css/colorpicker.css" rel="stylesheet" type="text/css" /> 
    2020<link rel="icon" type="image/vnd.microsoft.icon" href="images/favicon.ico" /> 
    21 <script>document.domain='omniti.com';</script> 
     21<script>document.domain='<?php echo $db->realtime_config('document_domain'); ?>';</script> 
    2222<script src="js/htmlentities.js"></script> 
    2323<script src="js/json2.js"></script> 
  • ui/web/htdocs/graph_panel.inc

    r1fa32a0 r4a1704f  
    7878 
    7979maingraph.everyTime(1000, function() { 
    80  
    81 console.log("checking if stream dirty"); 
    8280                           
    8381    if(!gstreaming) {    
     
    9391}); 
    9492 
    95 console.log("sids requestd from noit server = ", sids); 
     93//console.log("sids requestd from noit server = ", sids); 
    9694 
    9795$('#gstreambox').html('<iframe src="http://' + recon_realtime_hostname + '/data'+sids+'"></iframe>'); 
  • ui/web/htdocs/js/recon.js

    r1fa32a0 r4a1704f  
    1010// and init,update the global streaming boolean to then call this from a server 
    1111function plot_iframe_data(xdata, uuid, metric_name, ydata) { 
    12     //    console.log("plot_iframe_date with:", metric_name, ydata); 
    13  
    1412    stream_object.ReconGraphAddPoint(xdata, uuid, metric_name, ydata); 
    1513    stream_dirty = true; 
     
    729727    stream_graph.ReconGraphPrepareStream(timewindow, polltime); 
    730728 
     729    streaming = true; 
    731730 
    732731//setup functionality so that every second check if we are streaming and dirty, plot if true 
    733732    stream_graph.everyTime(1000, function() { 
    734             console.log("checking if stream dirty"); 
    735733      if(!streaming) { 
    736734       $('#streambox').html(''); 
     
    760758          sids+= "/"+sid+"@"+sidneed[sid]; 
    761759        } 
    762  
    763         console.log("sids requestd from noit server = ", sids); 
     760        //console.log("sids request: http://" +recon_realtime_hostname+"/data"+sids); 
     761 
    764762        $('#streambox').html('<iframe src="http://' + recon_realtime_hostname + '/data'+sids+'"></iframe>'); 
    765763     }); 
     
    855853$.getJSON("json/graph/info/" + id, function (ginfo) { 
    856854              var streaming = false; 
    857               plot_board = $('#'+divid); 
    858               stream_graph = plot_board; 
    859               plot_board.ReconGraph({graphid: ginfo.id, type: ginfo.type}); 
    860               plot_board.ReconGraphRefresh({graphid: ginfo.id, start: start, end: end, stacks: ginfo.stacks}); 
     855              stream_graph = $('#'+divid); 
     856              stream_graph.ReconGraph({graphid: ginfo.id, type: ginfo.type}); 
     857              stream_graph.ReconGraphRefresh({graphid: ginfo.id, start: start, end: end, stacks: ginfo.stacks}); 
    861858 
    862859var dtool =  $("<div id='mini_ws_datetool'>"); 
     
    874871                  </div>'); 
    875872 
    876 var mheader = $("<div id='stream-header'>").append(dtool); 
    877     mheader.append("<span class='zoomStream'>Stream Data</span><br>"); 
    878     plot_board.prepend(mheader); 
    879     plot_board.append("<div class='stream-log' style='display:none'></div>"); 
    880     $(".zoomStream").click(function() { 
     873    var mheader = $("<div id='stream-header'>").append(dtool); 
     874    mheader.append("<span class='streamData'>Stream Data</span>"); 
     875    stream_graph.prepend(mheader); 
     876    stream_graph.append('<div id="streambox" style="display:none"></div>'); 
     877    stream_graph.append("<div class='stream-log' style='display:none'></div>"); 
     878 
     879    $(".streamData").click(function() { 
    881880      if(!streaming) { 
    882881        streaming = true; 
    883         $(".zoomStream").html('Streaming!').fadeIn('slow'); 
     882        $(this).html('Streaming!').fadeIn('slow'); 
    884883        $(".stream-log").removeAttr("style").html("stream log_"); 
    885884        stream_data(ginfo.id); 
     
    888887        streaming = false; 
    889888        $('#streambox').html(''); 
    890         $(".zoomStream").html('Stream Data').fadeIn('slow'); 
     889        $(this).html('Stream Data').fadeIn('slow'); 
    891890        $(".stream-log").attr("style", "display:none;"); 
    892         plot_board.ReconGraphRefresh({graphid: ginfo.id, stacks: ginfo.stacks}); 
     891        stream_graph.ReconGraphRefresh({graphid: ginfo.id, stacks: ginfo.stacks}); 
    893892      } 
    894893    }); //end stream click function 
     
    897896      $(".datechoice").removeClass("selected"); 
    898897      $(this).addClass("selected"); 
    899       plot_board.ReconGraphRefresh({graphid: ginfo.id, stacks: ginfo.stacks, start: time_window_to_seconds($(this).html()), end: ''}); 
     898      stream_graph.ReconGraphRefresh({graphid: ginfo.id, stacks: ginfo.stacks, start: time_window_to_seconds($(this).html()), end: ''}); 
    900899      return false; 
    901900    }); 
     
    978977  }); 
    979978  } //end zoom_modal 
    980            
    981979 
    982980  function lock_wforms() {