Show
Ignore:
Timestamp:
09/25/08 13:26:03 (10 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1222349163 +0000
git-parent:

[43ec19ac079e004379a4c8d8117756c8d622eff8]

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

cleanup the bw stuff. We still need to figure out how pre-fab graph templates are going to work, refs #22

Files:

Legend:

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

    r52dcc3a r668d3a3  
    77RewriteRule ^json/graph/search$ graph_search_json.php [PT,QSA] 
    88RewriteRule ^json/datapoint/search$ datapoint_search_json.php [PT,QSA] 
     9RewriteRule ^graph/template/bw/large/([^/]+)$ bw_settings.php?id=$1 [PT,QSA] 
     10RewriteRule ^graph/template/bw/small/([^/]+)$ bw_settings.php?id=$1&type=small [PT,QSA] 
    911RewriteRule ^amcharts/graph/settings/([^/]+) graph_settings.php?id=$1 [PT,QSA] 
  • ui/web/htdocs/bw_graph.php

    r6c1e4ca r668d3a3  
    1414                var so = new SWFObject("amcharts/amline/amline.swf", "amline", "780", "400", "8", "#FFFFFF"); 
    1515                so.addVariable("path", "amcharts/amline/"); 
    16                 so.addVariable("settings_file", escape("bw_settings.php?id=<?php print $_GET['id'] ?>&start=<?php print $_GET['start'] ?>&end=<?php print $_GET['end'] ?>&cnt=<?php print isset($_GET['cnt']) ? $_GET['cnt'] : 500 ?>&view=<?php print $_GET['view'] ?>")); 
     16                so.addVariable("settings_file", escape("graph/template/bw/large/<?php print $_GET['id'] ?>?start=<?php print $_GET['start'] ?>&end=<?php print $_GET['end'] ?>&cnt=<?php print isset($_GET['cnt']) ? $_GET['cnt'] : 500 ?>&view=<?php print $_GET['view'] ?>")); 
    1717                so.addVariable("preloader_color", "#999999"); 
    1818                so.write("flashcontent"); 
  • ui/web/htdocs/bw_settings.php

    rdf2e366 r668d3a3  
    3636  $driver->addDataSet($uuid, 'outoctets', true, '8,*', $settings); 
    3737  $driver->addChangeSet($uuid, 'alias'); 
    38   $driver->calcPercentile(95); 
    39   $driver->addPercentileGuide('95th', 95, array('expression' => "$math")); 
     38  if($_GET['type'] != 'small') { 
     39    $driver->calcPercentile(95); 
     40    $driver->addPercentileGuide('min', 0, array('expression' => "$math")); 
     41    $driver->addPercentileGuide('max', 100, array('expression' => "$math")); 
     42    $driver->addPercentileGuide('95th', 95, array('expression' => "$math")); 
     43  } 
    4044} 
    41 $driver->addPercentileGuide('min', 0, array('expression' => "$math")); 
    42 $driver->addPercentileGuide('max', 100, array('expression' => "$math")); 
    4345 
    4446$i = 0; 
     
    4648<settings> 
    4749<type></type> 
     50<?php if($_GET['type'] == 'small') { ?> 
     51  <legend><enabled>false</enabled></legend> 
     52  <grid><x><enabled>false</enabled></x></grid> 
     53  <plot_area> 
     54    <margins><top>20</top><right>50</right><bottom>30</bottom><left>50</left></margins> 
     55  </plot_area> 
     56<?php } ?> 
    4857<data> 
    4958<chart> 
     
    5362</chart> 
    5463</data> 
     64<labels> 
     65  <label> 
     66    <x>0</x> 
     67    <y>0</y> 
     68    <align>center</align> 
     69    <text_size><?php print ($_GET['type'] == 'small') ? 12 : 16 ?></text_size> 
     70    <text_color>#000000</text_color> 
     71    <text><![CDATA[<?php print $driver->title() ?>]]></text> 
     72  </label> 
     73</labels> 
    5574<decimals_separator>.</decimals_separator> 
    5675<values> 
     
    5877  <unit><?php print $driver->autounit() ?></unit> 
    5978 </y_left> 
     79<?php if($_GET['type'] == 'small') { ?> 
     80  <x><enabled>false</enabled></x> 
     81<?php } ?> 
    6082</values> 
    6183</settings> 
  • ui/web/htdocs/css/style.css

    rc2577bd r668d3a3  
    257257/******* GRAPH CONTROLS *******/ 
    258258 
    259 span.rememberGraph {display:none;float:right;border:1px solid #ddd;padding:0 4px 0 4px;} 
     259span.rememberGraph {display:none;float:right;border:1px solid #ddd;padding:0 4px 0 4px;margin-left:4px;} 
     260span.blankGraph {float:right;border:1px solid #ddd;padding:0 4px 0 4px;margin-left:4px;} 
    260261 
    261262div.error { width:100%; text-align:center; } 
  • ui/web/htdocs/graph_controls.inc

    r4f81059 r668d3a3  
    147147} 
    148148function fetch_graph_info(id) { 
    149  $.getJSON("json/graph/info/" + id, refresh_graph_from_json); 
     149  $.getJSON("json/graph/info/" + id, refresh_graph_from_json); 
     150  $("span.blankGraph").click(function() { 
     151    if(graphinfo.saved || confirm("I will forget the current graph.  Are you sure?")) 
     152      set_current_graph_id(''); 
     153    return false; 
     154  }); 
    150155} 
    151156--> 
    152157</script> 
    153158<!--<p><a href="">username</a> / <a href="#">worksheet</a></p>--> 
     159<p/> 
    154160<span class="rememberGraph"></span> 
     161<span class="blankGraph">New Blank</span> 
    155162<h2 id="graphTitle"></h2> 
    156163<!-- date range box --> 
  • ui/web/htdocs/graph_settings.php

    r52dcc3a r668d3a3  
    5252  <min><?php print ($driver->min() > 0) ? '0' : '' ?></min> 
    5353  <max><?php print ($driver->max() < 0) ? '0' : '' ?></max> 
    54   <unit><?php print $autounits ? $driver->autounit() : "" ?></unit> 
     54  <unit><?php print $driver->autounit() ?></unit> 
    5555 </y_left> 
    5656</values> 
  • ui/web/htdocs/main.php

    r52dcc3a r668d3a3  
    128128                        </ul><div style="clear:both;"></div> 
    129129                </div> 
    130                 <!-- buttons --> 
    131                 <div id="buttons"> 
    132                 <input name="Save" type="button" value="New Graph" /> <input name="Save" type="button" value="Save" /> <input name="Save" type="button" value="Save as" /> <input name="Save" type="button" value="Delete" />  
    133                 </div> 
    134130                <!-- graph and controls --> 
    135131                <div id="main"> 
  • ui/web/htdocs/search_saved_graphs.inc

    rc2577bd r668d3a3  
    7676  <p class="graph-search-summary"></p> 
    7777  <ul id="graph-searchresults"> 
    78     <li><a href="#">sed do eiusmod tempor incididunt ut labore</a><ul><li class="xx">theo@omniti.com</li><li>YY/MM/DD</li><li><a href="#" class="addtows" title="Add to Worksheet"><em>Add</em></a></li></ul></li> 
    7978  </ul> 
    8079</div>