Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Hystrix Dashboard</title>

	<!-- Javascript to monitor and display -->
	<script src="./js/jquery.min.js" type="text/javascript"></script>
		function sendToMonitor() {
			if($('#stream').val().length > 0) {
				var url = "./monitor/monitor.html?stream=" + encodeURIComponent($('#stream').val()) + "";
				if($('#delay').val().length > 0) {	
					url += "&delay=" + $('#delay').val();
				if($('#title').val().length > 0) {	
					url += "&title=" + encodeURIComponent($('#title').val());
				location.href= url;
			} else {
				$('#message').html("The 'stream' value is required.");
<div style="width:800px;margin:0 auto;">
	<img width="264" height="233" src="./images/hystrix-logo.png">
	<h2>Hystrix Dashboard</h2>
	<input id="stream" type="textfield" size="120" placeholder="http://hostname:port/turbine/"></input>
	<i>Cluster via Turbine (default cluster):</i> http://turbine-hostname:port/
	<i>Cluster via Turbine (custom cluster):</i> http://turbine-hostname:port/[clusterName]
	<i>Single Hystrix App:</i> http://hystrix-app:port/
	Delay: <input id="delay" type="textfield" size="10" placeholder="2000"></input>ms 
	Title: <input id="title" type="textfield" size="60" placeholder="Example Hystrix App"></input><br>
	<button onclick="sendToMonitor()">Monitor Stream</button>
	<div id="message" style="color:red"></div>
New to GrepCode? Check out our FAQ X