Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed server_list from cluster data.

Pushing everything to the toplevel again and making the whole thing
more simple.
  • Loading branch information...
commit 8c2f128a0acf092c841185721d95093a843d28f4 1 parent 167648a
Dustin Sallings dustin authored
4 static/vb2.html
View
@@ -95,7 +95,9 @@
function updateGraphs(json) {
chart(json, $("input[@name=stat]:checked").val());
- var legend = d3.select("#nodes").selectAll("li").data(json.server_list);
+ var nodes = d3.keys(json);
+ nodes.sort(d3.ascending);
+ var legend = d3.select("#nodes").selectAll("li").data(nodes);
legend.enter().append("li");
legend.text(String)
4 static/vbmap.js
View
@@ -898,8 +898,8 @@ function makeVBStatThing(totalWidth, h, container) {
var masters = {};
update.total = 0;
update.largeV = 0, update.largeN = 0, update.smallV = 0, update.smallN = 10000000000000;
- for (var node in json.stats) {
- var nstates = json.stats[node];
+ for (var node in json) {
+ var nstates = json[node];
for (var vbid in nstates) {
if (nstates[vbid].state === 'active') {
masters[vbid] = node;
2  testdata/cluster-static-alt.json
View
1 addition, 1 deletion not shown
2  testdata/cluster-static.json
View
1 addition, 1 deletion not shown
4 vbmap.go
View
@@ -155,9 +155,7 @@ func vbHandler(w http.ResponseWriter, req *http.Request) {
commonSuffixMC := couchbase.FindCommonSuffix(bucket.VBucketServerMap.ServerList)
- rv := map[string]interface{}{}
- rv["server_list"] = getShortServerList(bucket, commonSuffixMC)
- rv["stats"] = getVbStats(bucket, commonSuffixMC)
+ rv := getVbStats(bucket, commonSuffixMC)
req.ParseForm()
var_name := req.FormValue("name")
Please sign in to comment.
Something went wrong with that request. Please try again.