Changeset 21720f443fc4436e839bfadf21de9c6fd47366e0

Show
Ignore:
Timestamp:
06/26/09 22:13:28 (5 years ago)
Author:
Umar Farooq <umar@omniti.com>
git-committer:
Umar Farooq <umar@omniti.com> 1246054408 +0000
git-parent:

[fc135b6df3a423a695466e40796a578b97d92cc9]

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

upgrading jquery to 1.3.2, and jquery-ui to 1.7.2.
adding slider to allow toggling of polltimerefs #147

Files:

Legend:

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

    r0dc2054 r21720f4  
    762762margin-left: auto; 
    763763margin-right: auto; 
     764margin-top: 50px;              
    764765} 
    765766#drawing_board div.plot-area { 
    766767height:400px; 
    767768width:780px; 
     769margin-top: 50px; 
    768770} 
    769771#drawing_board ul#worksheet-graphs div.plot-area { 
    770772height:180px; 
    771773width:380px; 
     774margin-top: 0px; 
    772775} 
    773776#drawing_board h2.ws_title { 
     
    908911color:#660000; 
    909912} 
    910 span.stream_controls { 
     913.stream_controls { 
    911914border:1px solid #DDDDDD; 
    912915float:right; 
     
    915918font-weight: bold; 
    916919color:#660000; 
    917 
    918 span.stream_controls #play_pause{ 
     920width: 290px; 
     921height: 20px; 
     922
     923.stream_controls #play_pause{ 
    919924padding: 10px; 
    920925} 
    921 span.stream_controls #stopstream{ 
     926.stream_controls #stopstream{ 
    922927padding: 10px; 
    923928} 
    924 span.stream_controls #play_pause_graph{ 
     929.stream_controls #play_pause_graph{ 
    925930padding: 10px; 
    926931} 
    927 span.stream_controls #stopstream_graph{ 
     932.stream_controls #stopstream_graph{ 
    928933padding: 10px; 
     934} 
     935.stream_controls #oslider{ 
     936position: relative; 
     937left:120px; 
     938top:-14px; 
     939} 
     940.stream_controls div#oslider div#polltime{ 
     941position: relative; 
     942left:120px; 
     943top:-14px; 
     944} 
     945.stream_controls div.ui-slider-horizontal{ 
     946width: 100px; 
    929947} 
    930948span.editGraph { 
  • ui/web/htdocs/drawing_board.php

    rfc135b6 r21720f4  
    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<link href="js/jquery-ui-1.7.2/themes/base/ui.all.css" rel="stylesheet" type="text/css" /> 
    2122<script>document.domain='<?php echo $db->realtime_config('document_domain'); ?>';</script> 
    2223<script src="js/htmlentities.js"></script> 
    2324<script src="js/json2.js"></script> 
    24 <script src="js/jquery.min.js"></script> 
     25<script src="js/jquery-1.3.2.min.js"></script> 
    2526<script src="js/jquery.flot.js"></script> 
    2627<script src="js/jquery.jeditable.pack.js"></script> 
    27 <script src="js/ui.core.min.js"></script> 
    28 <script src="js/ui.sortable.min.js"></script> 
     28<script src="js/jquery-ui-1.7.2/ui/ui.core.js"></script> 
     29<script src="js/jquery-ui-1.7.2/ui/ui.sortable.js"></script> 
     30<script src="js/jquery-ui-1.7.2/ui/ui.slider.js"></script> 
    2931<script src="js/jquery.cookie.js" type="text/javascript"></script> 
    3032<script src="js/jquery.treeview.js" type="text/javascript"></script> 
     
    3840<script src="js/recon.js" type="text/javascript"></script> 
    3941<script src="js/reconui.js" type="text/javascript"></script> 
    40  
    4142<script type="text/javascript"> 
    4243<!-- 
  • ui/web/htdocs/graph_panel.inc

    rd614dd6 r21720f4  
    1919 
    2020function lock_forms() { 
    21         $("input[@name='math1']").attr("disabled", "true"); 
    22         $("input[@name='math2']").attr("disabled", "true"); 
    23         $("input[@name='view']").attr("disabled", "true"); 
    24         $("input[@class='graphType']").attr("disabled", "true"); 
    25         $("select[@name='derive']").attr("disabled", "true"); 
    26         $("select[@class='av_stacks']").attr("disabled", "true"); 
     21        $("input[name='math1']").attr("disabled", "true"); 
     22        $("input[name='math2']").attr("disabled", "true"); 
     23        $("input[name='view']").attr("disabled", "true"); 
     24        $("input[class='graphType']").attr("disabled", "true"); 
     25        $("select[name='derive']").attr("disabled", "true"); 
     26        $("select[class='av_stacks']").attr("disabled", "true"); 
    2727 
    2828        $("h2#graphTitle").unbind(); 
     
    3232function unlock_forms() { 
    3333 
    34         $("input[@name='math1']").removeAttr("disabled"); 
    35         $("input[@name='math2']").removeAttr("disabled"); 
    36         $("input[@name='view']").removeAttr("disabled"); 
     34        $("input[name='math1']").removeAttr("disabled"); 
     35        $("input[name='math2']").removeAttr("disabled"); 
     36        $("input[name='view']").removeAttr("disabled"); 
    3737        //leave the graph type disabled, since we dont use it anywhere rightnow 
    38         //$("input[@class='graphType']").removeAttr("disabled"); 
    39         $("select[@name='derive']").removeAttr("disabled"); 
    40         $("select[@class='av_stacks']").removeAttr("disabled"); 
     38        //$("input[class='graphType']").removeAttr("disabled"); 
     39        $("select[name='derive']").removeAttr("disabled"); 
     40        $("select[class='av_stacks']").removeAttr("disabled"); 
    4141 
    4242        $("h2#graphTitle").editable(function(value, settings) {  
     
    230230  }); 
    231231 
    232   if(!d.hidden){o.find('input[@name="view"]').attr("checked","checked");} 
    233   o.find('input[@name="view"]').change(function(){ 
     232  if(!d.hidden){o.find('input[name="view"]').attr("checked","checked");} 
     233  o.find('input[name="view"]').change(function(){ 
    234234    d.hidden = !($(this).attr("checked")); 
    235235    update_current_graph(true); 
    236236  }).change(); 
    237237 
    238   o.find('select[@id="datastack"]').change(function(){ 
     238  o.find('select[id="datastack"]').change(function(){ 
    239239      var si = find_in_stacks($(".av_stacks").index(this)); 
    240240       if(si != -1) graphinfo.stacks[si.i].splice(si.j, 1); 
     
    283283  if(d.metric_type == 'text') { 
    284284    o.find('tr.mathbox').remove(); 
    285     o.find('select[@name="derive"]').val('false'); 
     285    o.find('select[name="derive"]').val('false'); 
    286286  } 
    287287  else { 
    288288    if(d.derive){ 
    289       o.find('select[@name="derive"]').val(d.derive); 
     289      o.find('select[name="derive"]').val(d.derive); 
    290290    } 
    291     o.find('select[@name="derive"]').change(function(){ 
     291    o.find('select[name="derive"]').change(function(){ 
    292292      d.derive = $(this).find(":selected").val(); 
    293293      update_current_graph(true); 
    294294    }).change(); 
    295295 
    296     o.find('input[@name="math1"]').val(d.math1); 
    297     o.find('input[@name="math1"]').change(function(){ 
     296    o.find('input[name="math1"]').val(d.math1); 
     297    o.find('input[name="math1"]').change(function(){ 
    298298      d.math1 = $(this).val(); 
    299299      update_current_graph(true); 
    300300    }); 
    301     o.find('input[@name="math2"]').val(d.math2); 
    302     o.find('input[@name="math2"]').change(function(){ 
     301    o.find('input[name="math2"]').val(d.math2); 
     302    o.find('input[name="math2"]').change(function(){ 
    303303      d.math2 = $(this).val(); 
    304304      update_current_graph(true); 
     
    343343  $("h2#graphTitle").html(graphinfo.title ? graphinfo.title : 'Graph Title (click to edit)'); 
    344344 
    345   $("input[@name='graphtype']:checked").removeAttr("checked"); 
    346   $("input[@name='graphtype']") 
     345  $("input[name='graphtype']:checked").removeAttr("checked"); 
     346  $("input[name='graphtype']") 
    347347    .filter(function(i){return $(this).val() == graphinfo.type;}) 
    348348    .attr("checked","checked"); 
     
    365365  } 
    366366 
    367   $('select[@id="datastack"]').each( function()  {     
     367  $('select[id="datastack"]').each( function()  {     
    368368    var si = find_in_stacks($(".av_stacks").index(this)); 
    369369    if(si != -1) $(this).val(si.i); 
  • ui/web/htdocs/index.php

    rfc135b6 r21720f4  
    1212<link href="css/colorpicker.css" rel="stylesheet" type="text/css" /> 
    1313<link rel="icon" type="image/vnd.microsoft.icon" href="images/favicon.ico" /> 
     14<link href="js/jquery-ui-1.7.2/themes/base/ui.all.css" rel="stylesheet" type="text/css" /> 
    1415<script>document.domain='<?php echo $db->realtime_config('document_domain'); ?>';</script> 
    1516<script src="js/htmlentities.js"></script> 
    1617<script src="js/json2.js"></script> 
    17 <script src="js/jquery.min.js"></script> 
     18<script src="js/jquery-1.3.2.min.js"></script> 
     19<script src="js/jquery-ui-1.7.2/ui/ui.core.js"></script> 
     20<script src="js/jquery-ui-1.7.2/ui/ui.sortable.js"></script> 
     21<script src="js/jquery-ui-1.7.2/ui/ui.slider.js"></script> 
    1822<script src="js/jquery.flot.js"></script> 
    1923<script src="js/jquery.jeditable.pack.js"></script> 
    20 <script src="js/ui.core.min.js"></script> 
    21 <script src="js/ui.sortable.min.js"></script> 
    2224<script src="js/jquery.cookie.js" type="text/javascript"></script> 
    2325<script src="js/jquery.treeview.js" type="text/javascript"></script> 
    2426<script src="js/jquery.treeview.async.js" type="text/javascript"></script> 
     27<script src="js/jquery.timers.js" type="text/javascript"></script> 
     28<script src="js/jquery.ajaxq-0.0.1.js" type="text/javascript"></script> 
    2529<script src="js/eye/datepicker.js" type="text/javascript"></script> 
    2630<script src="js/eye/colorpicker.js" type="text/javascript"></script> 
    2731<script src="js/eye/eye.js" type="text/javascript"></script> 
    2832<script src="js/eye/utils.js" type="text/javascript"></script> 
    29 <script src="js/jquery.timers.js" type="text/javascript"></script> 
    30 <script src="js/jquery.ajaxq-0.0.1.js" type="text/javascript"></script> 
    3133<script src="js/recon.js" type="text/javascript"></script> 
    3234<script type="text/javascript"> 
  • ui/web/htdocs/js/recon.js

    re83480b r21720f4  
    55var stream_object; 
    66var stream_dirty; 
     7var polltime = 2000; // (ms) how often we want data from the stream 
     8var timewindow = 300000;  // (ms) width of the stream window 
    79var recon_realtime_hostname = ''; 
    810var streaming = false; 
     
    753755    play_pause = $("<span id='play_pause'>PLAY</span>"); 
    754756    stop = $("<span id='stopstream'>STOP</span>"); 
    755     stream_controls = $("<span class='stream_controls'></span>").append(play_pause).append(stop); 
     757    oslider = $("<div id='oslider'><div id='pollslider'></div><div id='polltime'>"+polltime+" ms</div></div>"); 
     758    stream_controls = $("<div class='stream_controls'></div>").append(play_pause).append(stop).append(oslider); 
    756759    return stream_controls; 
    757760} 
     
    761764//stream_graph: the dom element to update with the stream 
    762765//streambox: the hidden element to insert the iframe remote calls 
    763 function stream_data(graph_id, stream_graph, streambox) { 
     766    function stream_data(graph_id, stream_graph, streambox) { 
    764767    if(!streaming) { 
    765         polltime = 2000; 
    766         timewindow = 300000; 
    767768        stream_object = stream_graph; 
    768769        stream_dirty = false; 
     
    793794        var sidneed = new Object(); 
    794795 
     796        //we could set a polltime for each dataset, but for now we make them the same 
    795797        for(var i=0; i<g.datapoints.length; i++) { 
    796798          if(g.datapoints[i].sid) { 
     
    801803          sids+= "/"+sid+"@"+sidneed[sid]; 
    802804        } 
    803         //console.log("sids request: http://" +recon_realtime_hostname+"/data"+sids); 
     805        //     console.log("sids request: http://" +recon_realtime_hostname+"/data"+sids); 
    804806        streambox.html('<iframe src="http://' + recon_realtime_hostname + '/data'+sids+'"></iframe>'); 
    805807     }); 
     
    941943    stream_controls = get_stream_controls(); 
    942944    mheader.append(stream_controls); 
    943     mheader.append("<br/>"); 
    944945 
    945946    stream_graph.prepend(mheader); 
     
    974975   }); 
    975976 
    976 $("#mini_ws_datetool .datechoice").click(function(){ 
    977       $(".datechoice").removeClass("selected"); 
    978       $(this).addClass("selected"); 
    979       stream_graph.ReconGraphRefresh({graphid: ginfo.id, stacks: ginfo.stacks, start: time_window_to_seconds($(this).html()), end: ''}); 
    980       return false; 
     977              $("#pollslider").slider({orientation: 'horizontal', value: polltime, max: 10000, min: 1000, step: 1000, 
     978                    change: function (event, ui) {   
     979                        polltime = $(this).slider('option', 'value');  
     980                        $("#polltime").html(polltime+" ms"); 
     981                        if(streaming) { 
     982                            streaming = false; 
     983                            $('#streambox').html(''); 
     984                            $("#play_pause").html('PAUSE'); 
     985                            stream_data(ginfo.id, stream_graph, $('#streambox')); 
     986                        } 
     987                      }                  
     988            }); 
     989 
     990   $("#mini_ws_datetool .datechoice").click(function(){ 
     991        $(".datechoice").removeClass("selected"); 
     992        $(this).addClass("selected"); 
     993        stream_graph.ReconGraphRefresh({graphid: ginfo.id, stacks: ginfo.stacks, start: time_window_to_seconds($(this).html()), end: ''}); 
     994        return false; 
    981995    }); 
    982996 
     
    10231037 
    10241038    var mheader = $("<div id='stream-modal-header'>").append(dtool); 
    1025     mheader.append("<span class='zoomClose'>x</span>"); 
     1039 
    10261040    mheader.append(get_stream_controls()); 
    1027     mheader.append($("<br/>")); 
     1041    mheader.append("<span class='zoomClose'>x</span>") 
    10281042 
    10291043    stream_graph.prepend(mheader); 
    1030  
    10311044    stream_graph.append("<div class='stream-log' style='display:none'></div>"); 
     1045 
     1046 
    10321047    $(".zoomClose").click(function() { 
    10331048      streaming = false; 
     
    10351050      smod.close(); 
    10361051    }); 
     1052 
    10371053 
    10381054    $("#play_pause").click(function() { 
     
    10621078        stream_graph.ReconGraphRefresh({graphid: ginfo.id, stacks: ginfo.stacks}); 
    10631079     }); 
     1080 
     1081    $("#pollslider").slider({orientation: 'horizontal', value: polltime, max: 10000, min: 1000, step: 1000, 
     1082                    change: function (event, ui) {   
     1083                        polltime = $(this).slider('option', 'value');  
     1084                        $("#polltime").html(polltime+" ms"); 
     1085                        if(streaming) { 
     1086                            streaming = false; 
     1087                            $('#streambox').html(''); 
     1088                            $("#play_pause").html('PAUSE'); 
     1089                            stream_data(ginfo.id, stream_graph, $('#streambox')); 
     1090                        } 
     1091                      }                  
     1092    }); 
    10641093 
    10651094    $("#mini_ws_datetool .datechoice").click(function(){ 
  • ui/web/htdocs/template_browse_json.php

    r504c244 r21720f4  
    146146var template_e = $("#"+templateid); 
    147147 
    148 template_e.find("input[@id='textvar']").each ( function (i) { 
     148template_e.find("input[id='textvar']").each ( function (i) { 
    149149        textvars[i] = $(this).attr('name'); 
    150150        if($(this).val() != '') {