Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lots of new viz stuff for the interface
- Loading branch information
Cliff Moon
committed
Oct 24, 2008
1 parent
43f9aa2
commit 808acc7
Showing
6 changed files
with
400 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
function hsv2rgb(h, s, v) { | ||
var hi = Math.floor(h/60) % 6; | ||
var f = h / 60 - Math.floor(h/60); | ||
var p = Math.round(255 * v * (1-s)); | ||
var q = Math.round(255 * v * (1-f*s)); | ||
var t = Math.round(255 * v * (1-(1-f)*s)); | ||
v = Math.round(v * 255); | ||
switch (hi) { | ||
case 0: return [v,t,p]; | ||
case 1: return [q,v,p]; | ||
case 2: return [p,v,t]; | ||
case 3: return [p,q,v]; | ||
case 4: return [t,p,v]; | ||
case 5: return [v,p,q]; | ||
} | ||
} | ||
|
||
function hsv2rgba(h, s, v) { | ||
var color = hsv2rgb(h, s, v); | ||
return "rgba(" + color[0] + "," + color[1] + "," + color[2] + ",1)"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<html> | ||
<head> | ||
<link href="/stylesheets/master.css" rel="stylesheet" type="text/css"/> | ||
<script type="text/javascript" src="/javascripts/jquery-1.2.6.js"></script> | ||
<script type="text/javascript" src="/javascripts/domec.js"></script> | ||
<script type="text/javascript" src="/javascripts/jquery.timer.js"></script> | ||
<script type="text/javascript" src="/javascripts/canvastext.js"></script> | ||
<script type="text/javascript" src="/javascripts/drawarrows.js"></script> | ||
<script type="text/javascript" src="/javascripts/color.js"></script> | ||
<script type="text/javascript" src="/javascripts/viz.js"></script> | ||
<script type="text/javascript"> | ||
$(document).ready(function(data) { | ||
$.getJSON("/rpc/info/stats", function(stats) { | ||
$("#node").text(stats.node); | ||
}); | ||
|
||
$.getJSON("/rpc/rates/nodes", function(node_rates) { | ||
var canvas = document.getElementById("canvas"); | ||
drawRates(node_rates, canvas); | ||
}); | ||
|
||
$.timer(1000, function(timer) { | ||
$.getJSON("/rpc/rates/nodes", function(node_rates) { | ||
var canvas = document.getElementById("canvas"); | ||
drawRates(node_rates, canvas); | ||
}); | ||
}); | ||
}); | ||
</script> | ||
</head> | ||
<body> | ||
<div class="header"><!-- <img src="/images/dynomite_logo.png" style="float: right;"/> --> | ||
<h1>Dynomite</h1> | ||
<h2>Load for <span id="node"></span></h2> | ||
</div> | ||
<ul id="menu"> | ||
<li><a href="/index.html">Health</a></li> | ||
<li>Load</li> | ||
<li><a href="/sync.html">Replication</a></li> | ||
<li><a href="/partitions.html">Partitioning</a></li> | ||
</ul> | ||
<canvas id="canvas" width="800" height="600"></canvas> | ||
</ul> | ||
|
||
</body> | ||
</html> |
Oops, something went wrong.