Sort cluster nodes by breaks UI with unassigned replicas #26

mattijsf opened this Issue Jul 14, 2012 · 3 comments


None yet

2 participants


When ElasticSearch is running with one or more unassigned replicas the Cluster Overview page breaks with a javascript error:

Uncaught TypeError: Cannot read property 'name' of undefined 

Can be reproduced using ElasticSearch 0.19.8 with the following index:

$ curl -XPUT 'http://localhost:9200/twitter/' -d '{
    "settings" : {
        "number_of_shards" : 3,
        "number_of_replicas" : 2

I could fix this by making the following change inside /lib/es/widget.js:

b =;into:
b = (typeof second.cluster !== "undefined") ? :;

Or maybe it is better to guarantee to have the unassigned clusters sorted on the bottom:

if ((typeof second.cluster === "undefined")) return 0;
mobz commented Jul 14, 2012

preferably the order would be

  • master node (at the top)
  • data nodes (in alpha order)
  • client nodes (in alpha order)
  • unassigned ( if any )

I'm on holiday at the moment - would appreciate a patch!

@mobz mobz closed this Jul 16, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment