From 86760bdc9c7f977bbf9d64596ad0fa92afe69376 Mon Sep 17 00:00:00 2001 From: Kennedy Oliveira Date: Sun, 28 Aug 2016 00:53:40 -0300 Subject: [PATCH 1/2] Improving dashboard eureka integration - Refactoring code - Grouping instances by services - Added a new group for the first instance of each server - Updating url on chaning stream type - Update title for with application name --- hystrix-dashboard/src/main/webapp/index.html | 126 ++++++++++++------- 1 file changed, 81 insertions(+), 45 deletions(-) diff --git a/hystrix-dashboard/src/main/webapp/index.html b/hystrix-dashboard/src/main/webapp/index.html index f7288893d..631c9c1ef 100644 --- a/hystrix-dashboard/src/main/webapp/index.html +++ b/hystrix-dashboard/src/main/webapp/index.html @@ -13,8 +13,8 @@
- +


- +

Hystrix Dashboard

- + Eureka URL:
- Eureka Application: + Eureka Application: + Stream Type: - Hystrix + Hystrix Turbine

@@ -110,8 +146,8 @@

Hystrix Dashboard


Single Hystrix App: http://hystrix-app:port/hystrix.stream

- Delay: ms -      + Delay: ms +      Title:

Authorization:

@@ -122,7 +158,7 @@

Hystrix Dashboard



- +
From 417b2490dba57e8ac19892c946f6eb3cc55f9e2e Mon Sep 17 00:00:00 2001 From: Kennedy Oliveira Date: Sun, 28 Aug 2016 01:04:34 -0300 Subject: [PATCH 2/2] Add remove button for streams --- hystrix-dashboard/src/main/webapp/index.css | 2 +- hystrix-dashboard/src/main/webapp/index.html | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/hystrix-dashboard/src/main/webapp/index.css b/hystrix-dashboard/src/main/webapp/index.css index 0b6344e04..a3fc74e84 100644 --- a/hystrix-dashboard/src/main/webapp/index.css +++ b/hystrix-dashboard/src/main/webapp/index.css @@ -1,5 +1,5 @@ table { - width: 80%; + width: 100%; border-collapse: collapse; } diff --git a/hystrix-dashboard/src/main/webapp/index.html b/hystrix-dashboard/src/main/webapp/index.html index 631c9c1ef..2fbc86395 100644 --- a/hystrix-dashboard/src/main/webapp/index.html +++ b/hystrix-dashboard/src/main/webapp/index.html @@ -24,7 +24,7 @@ streams.push(s); $('#streams').html('' + _.reduce(streams, function(html, s) { - return html + ''; + return html + ''; }, '') + '
' + s.name + '' + s.stream + '
' + s.name + '' + s.stream + ' Remove
'); $('#message').html(""); @@ -64,6 +64,20 @@ $("#title").val(appName); }; + var removeStream = function(element) { + var $tr = $(element).closest("tr"); + var url = $tr.find("td:nth-child(2)").text(); + + for (var i = 0; i < streams.length; i++) { + if(streams[i].stream === url) { + streams.splice(i, 1); + break; + } + } + + $tr.remove(); + }; + var fetchEurekaAppList = function (e) { var url = window.location.pathname + "eureka?url=" + $('#eurekaURL').val(); var $eurekaApp = $('#eurekaApp');