Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort cluster nodes by node.name breaks UI with unassigned replicas #26

Closed
mattijsf opened this issue Jul 14, 2012 · 3 comments
Closed

Comments

@mattijsf
Copy link

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
    }
}'
@mattijsf
Copy link
Author

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

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

@mattijsf
Copy link
Author

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

if ((typeof second.cluster === "undefined")) return 0;

@mobz
Copy link
Owner

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 as completed Jul 16, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants