Skip to content

Commit f97494e

Browse files
committed
euerka
1 parent 9d9b6f8 commit f97494e

File tree

4 files changed

+155
-16
lines changed

4 files changed

+155
-16
lines changed

springboot-custom-eureka/src/main/resources/templates/eureka/header.ftlh renamed to springboot-custom-eureka/src/main/resources/templates/eureka/header.ftl

File renamed without changes.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<#import "/spring.ftl" as spring />
2+
<!doctype html>
3+
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
4+
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
5+
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
6+
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
7+
<head>
8+
<base href="<@spring.url basePath/>">
9+
<title>Eureka - Last N events</title>
10+
<link rel="stylesheet" type="text/css" href="eureka/css/wro.css">
11+
</head>
12+
<body id="three">
13+
14+
<!--[if lt IE 7]>
15+
<p>You are using an <strong>outdated</strong> browser. Please upgrade your browser to improve your experience.</p>
16+
<![endif]-->
17+
18+
<#include "header.ftl">
19+
20+
<div class="container-fluid xd-container">
21+
<#include "navbar.ftl">
22+
23+
<div id="xd-jobs" class="tab-pane active col-md-12">
24+
<ul class="nav nav-tabs" role="tablist" id="myTab">
25+
<li class="active"><a data-toggle="tab" href="#cancelled">Last 1000 cancelled leases</a></li>
26+
<li><a data-toggle="tab" href="#registered">Last 1000 newly registered leases</a></li>
27+
</ul>
28+
<div class="tab-content">
29+
<div class="tab-pane" id="cancelled">
30+
<table id='lastNCanceled' class="table table-striped table-hover">
31+
<thead>
32+
<tr><th>Timestamp</th><th>Lease</th></tr>
33+
</thead>
34+
<tbody>
35+
<#if lastNCanceled?has_content>
36+
<#list lastNCanceled as entry>
37+
<tr><td>${entry.date?datetime}</td><td>${entry.id}</td></tr>
38+
</#list>
39+
<#else>
40+
<tr><td colspan="2">No results available</td></tr>
41+
</#if>
42+
<tbody>
43+
</table>
44+
</div>
45+
<div class="tab-pane" id="registered">
46+
<table id='lastNRegistered' class="table table-striped table-hover">
47+
<thead>
48+
<tr><th>Timestamp</th><th>Lease</th></tr>
49+
</thead>
50+
<tbody>
51+
<#if lastNRegistered?has_content>
52+
<#list lastNRegistered as entry>
53+
<tr><td>${entry.date?datetime}</td><td>${entry.id}</td></tr>
54+
</#list>
55+
<#else>
56+
<tr><td colspan="2">No results available</td></tr>
57+
</#if>
58+
</tbody>
59+
</table>
60+
</div>
61+
</div>
62+
</div>
63+
</div>
64+
<script type="text/javascript" src="eureka/js/wro.js" ></script>
65+
<script type="text/javascript">
66+
$(function () {
67+
$('#myTab a:last').tab('show')
68+
})
69+
</script>
70+
</body>
71+
</html>
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<h1>System Status</h1>
2+
<div class="row">
3+
<div class="col-md-6">
4+
<table id='instances' class="table table-condensed table-striped table-hover">
5+
<#if amazonInfo??>
6+
<tr>
7+
<td>EUREKA SERVER</td>
8+
<td>AMI: ${amiId!}</td>
9+
</tr>
10+
<tr>
11+
<td>Zone</td>
12+
<td>${availabilityZone!}</td>
13+
</tr>
14+
<tr>
15+
<td>instance-id</td>
16+
<td>${instanceId!}</td>
17+
</tr>
18+
</#if>
19+
<tr>
20+
<td>Environment</td>
21+
<td>${environment!}</td>
22+
</tr>
23+
<tr>
24+
<td>Data center</td>
25+
<td>${datacenter!}</td>
26+
</tr>
27+
</table>
28+
</div>
29+
<div class="col-md-6">
30+
<table id='instances' class="table table-condensed table-striped table-hover">
31+
<tr>
32+
<td>Current time</td>
33+
<td>${currentTime}</td>
34+
</tr>
35+
<tr>
36+
<td>Uptime</td>
37+
<td>${upTime}</td>
38+
</tr>
39+
<tr>
40+
<td>Lease expiration enabled</td>
41+
<td>${registry.leaseExpirationEnabled?c}</td>
42+
</tr>
43+
<tr>
44+
<td>Renews threshold</td>
45+
<td>${registry.numOfRenewsPerMinThreshold}</td>
46+
</tr>
47+
<tr>
48+
<td>Renews (last min)</td>
49+
<td>${registry.numOfRenewsInLastMin}</td>
50+
</tr>
51+
</table>
52+
</div>
53+
</div>
54+
55+
<#if isBelowRenewThresold>
56+
<#if !registry.selfPreservationModeEnabled>
57+
<h4 id="uptime"><font size="+1" color="red"><b>RENEWALS ARE LESSER THAN THE THRESHOLD. THE SELF PRESERVATION MODE IS TURNED OFF. THIS MAY NOT PROTECT INSTANCE EXPIRY IN CASE OF NETWORK/OTHER PROBLEMS.</b></font></h4>
58+
<#else>
59+
<h4 id="uptime"><font size="+1" color="red"><b>EMERGENCY! EUREKA MAY BE INCORRECTLY CLAIMING INSTANCES ARE UP WHEN THEY'RE NOT. RENEWALS ARE LESSER THAN THRESHOLD AND HENCE THE INSTANCES ARE NOT BEING EXPIRED JUST TO BE SAFE.</b></font></h4>
60+
</#if>
61+
<#elseif !registry.selfPreservationModeEnabled>
62+
<h4 id="uptime"><font size="+1" color="red"><b>THE SELF PRESERVATION MODE IS TURNED OFF. THIS MAY NOT PROTECT INSTANCE EXPIRY IN CASE OF NETWORK/OTHER PROBLEMS.</b></font></h4>
63+
</#if>
64+
65+
<h1>DS Replicas</h1>
66+
<ul class="list-group">
67+
<#list replicas as replica>
68+
<li class="list-group-item"><a href="${replica.value}">${replica.key}</a></li>
69+
</#list>
70+
</ul>
71+

springboot-custom-eureka/src/main/resources/templates/eureka/status.ftlh renamed to springboot-custom-eureka/src/main/resources/templates/eureka/status.ftl

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
</head>
1818

1919
<body id="one">
20-
<#include "header.ftlh">
20+
<#include "header.ftl">
2121
<div class="container-fluid xd-container">
22-
<#include "navbar.ftlh">
22+
<#include "navbar.ftl">
2323
<h1>Instances currently registered with Eureka</h1>
2424
<table id='instances' class="table table-striped table-hover">
2525
<thead>
@@ -102,21 +102,18 @@
102102
</tbody>
103103
</table>
104104

105-
<h1>CopyRight Info</h1>
106-
107-
<table id='copyright' class="table table-striped table-hover">
108-
<thead>
109-
<tr><th>Company</th><th>Organization</th></tr>
110-
<thead>
111-
<tbody>
112-
<tr>
113-
<td><a href="https://github.com/lyb-geek/springboot-learning" target="_blank">LYBGEEK</a></td><td>LYBGEEK PLATFORM</td>
114-
</tr>
115-
</tbody>
116-
</table>
117-
</div>
118-
105+
<h1>CopyRight Info</h1>
119106

107+
<table id='copyright' class="table table-striped table-hover">
108+
<thead>
109+
<tr><th>Company</th><th>Organization</th></tr>
110+
<thead>
111+
<tbody>
112+
<tr>
113+
<td><a href="https://github.com/lyb-geek/springboot-learning" target="_blank">LYBGEEK</a></td><td>LYBGEEK PLATFORM</td>
114+
</tr>
115+
</tbody>
116+
</table>
120117
</div>
121118
<script type="text/javascript" src="eureka/js/wro.js" ></script>
122119
<script type="text/javascript">

0 commit comments

Comments
 (0)