Permalink
Cannot retrieve contributors at this time
Fetching contributors…

<html> | |
<head> | |
<title>Cluster VBucket Distribution</title> | |
<script type="text/javascript" src="/static/jquery.min.js"></script> | |
<script type="text/javascript" src="/static/d3.v2.min.js"></script> | |
<script type="text/javascript" src="/static/vbmap.js"></script> | |
<style type="text/css"> | |
#center { | |
text-align: center; | |
} | |
#replicas, #cluster, #queue { | |
display: inline; | |
font: 10px sans-serif; | |
} | |
.chord path { | |
fill-opacity: .67; | |
stroke: #000; | |
stroke-width: .5px; | |
} | |
.nodes { | |
stroke: black; | |
} | |
.nodes path { | |
fill: grey; | |
} | |
.nodes path.bad { | |
fill: red; | |
} | |
#clusterform { | |
clear: left; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="center"> | |
<div id="loading">Loading...</div> | |
<div id="cluster"></div> | |
<div id="replicas"></div> | |
<div id="queue"></div> | |
</div> | |
<div> | |
<form id="clusterform" method="GET" action="/" style="display: none"> | |
Cluster: <input id="clusterid" type="text" size="40" name="cluster"/><br/> | |
Bucket: <input id="bucketid" type="text" size="20" name="bucket" value="default"/><br/> | |
<input type="submit" value="Go" /> | |
</form> | |
</div> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
var clusterInfo = getClusterParams(); | |
$("#clusterid").val(clusterInfo.cluster); | |
$("#bucketid").val(clusterInfo.bucket || 'default'); | |
var imgdim = Math.min( | |
Math.round((window.innerWidth / 2) - 20), | |
Math.round(window.innerHeight - 260)); | |
var state = makeState(imgdim, imgdim, '#cluster'); | |
var chord = makeChord(imgdim, imgdim, '#replicas').fill('grey'); | |
var queues = makeVBStatThing(imgdim * 2, 240, '#queue'); | |
function updateGraphs(json) { | |
state(json); | |
chord(json); | |
$("#loading").hide(); | |
} | |
function updateQueue(json) { | |
queues(json, 'queue_size'); | |
} | |
doMapRequest(clusterInfo, updateGraphs, function() { | |
$("#loading").text("Problems initializing data, will keep retrying..."); | |
}, function() { $("#clusterform").show(); }); | |
doVBStatRequest(clusterInfo, updateQueue); | |
setInterval(function() { | |
doMapRequest(clusterInfo, updateGraphs); | |
doVBStatRequest(clusterInfo, updateQueue); | |
}, 5000); | |
}); | |
</script> | |
</body> | |
</html> |