diff --git a/hystrix-dashboard/src/main/webapp/index.html b/hystrix-dashboard/src/main/webapp/index.html index 38e7698d9..ac893ce86 100644 --- a/hystrix-dashboard/src/main/webapp/index.html +++ b/hystrix-dashboard/src/main/webapp/index.html @@ -46,21 +46,30 @@ } }); }); - - $.get( "http://127.0.0.1:8080/eureka/v2/apps", function( data ) { - $.each(data, function(i, item){ - $('#eurekaApp').append($("") - .attr("value",item.name) - .text(item.name)); - $('#repos').bind('change',function(item){ - var $this = $(this), - $value = $this.val(); - $('#eurekaApp').text($value) - }); + $.get("http://127.0.0.1:8080/eureka/v2/apps/", function( data ) { - }); - }); + app = $(data.children).find("application").each(function(index,item){ + appName = $(item).find("name")[0].innerHTML + + ip = null; + $($(item).find("instance")).each(function(i,d){ + ip = $(d).find("ipAddr")[0].innerHTML; + }); + + $('#eurekaApp').append($("") + .attr("value",ip) + .text(appName)); + + $('#eurekaApp').bind('change',function(item){ + var $this = $(this), + $value = $this.val(); + $('#stream').val("http://" + $value + ":7001/turbine.stream?cluster=default"); + }); + + }); + + }); @@ -73,7 +82,7 @@

Hystrix Dashboard

- + Eureka Application:

Cluster via Turbine (default cluster): http://turbine-hostname:port/turbine.stream