|
5 | 5 | <div class="container-fluid" style="margin: 0 auto; width: 960px;"> |
6 | 6 | <div class="span6"> |
7 | 7 | <table class="table"> |
8 | | - <thead><tr><th>Application</th><th><small class="pull-right"><a href="{{ application.url }}/info">raw JSON</a></small></th></tr></thead> |
| 8 | + <thead><tr><th colspan="2">Application <small class="pull-right"><a href="{{ application.url }}/info">raw JSON</a></small></th></tr></thead> |
9 | 9 | <tbody> |
10 | 10 | <tr ng-repeat="(key, value) in info" > |
11 | 11 | <td>{{ key }}</td><td>{{ value }}</td> |
|
17 | 17 | <div class="span6"> |
18 | 18 | <table class="table"> |
19 | 19 | <thead> |
20 | | - <tr><th>Health Checks</th><th><small class="pull-right"><a href="{{ application.url }}/health">raw JSON</a></small></th></tr> |
| 20 | + <tr><th colspan="2">Health Checks <small class="pull-right"><a href="{{ application.url }}/health">raw JSON</a></small></th></tr> |
21 | 21 | </thead> |
22 | 22 | <tbody> |
23 | | - <tr> |
24 | | - <td>Application</td><td><span class="status-{{health.status}}">{{ health.status }}</span></td> |
25 | | - </tr> |
26 | | - |
27 | | - <tr ng-repeat-start="(indicator, details) in health" ng-if="indicator != 'status'"> |
28 | | - <td ng-if="indicator != 'db'">{{indicator | capitalize}}</td> |
29 | | - <td ng-if="indicator == 'db'">Datasource</td> |
30 | | - |
31 | | - <td><span class="status-{{details.status}}">{{ details.status }}</span><br> |
32 | | - <span ng-repeat="(key, value) in details" ng-if="indicator != 'db' && indicator != 'diskSpace' && key != 'status' && key != 'error'">{{ key | capitalize }}: {{value}}<br></span> |
33 | | - <span ng-if="indicator == 'db' && details.database">{{ details.database }}</span> |
34 | | - <span ng-if="indicator == 'diskSpace'">{{ health.diskSpace.free | humanBytes }} free / {{ health.diskSpace.threshold | humanBytes }} threshold</span> |
35 | | - </td> |
36 | | - </tr> |
37 | | - |
38 | | - <tr ng-repeat-start="(dbname, dbhealth) in details" ng-if="indicator == 'db' && dbname != 'status' && dbname != 'error' && dbname != 'database' && dbname != 'hello'" > |
39 | | - <td>- {{ dbname | capitalize }}</td> |
40 | | - <td><span class="status-{{dbhealth.status}}">{{ dbhealth.status }}</span><br> |
41 | | - {{dbhealth.database}} |
42 | | - </td> |
43 | | - </tr> |
44 | | - <tr ng-repeat-end ng-if="dbhealth.error"><td colspan="2" class="alert alert-error" >{{ dbhealth.error }}</td></tr> |
45 | | - |
46 | | - <tr ng-repeat-end ng-if="details.error"><td colspan="2" class="alert alert-error" >{{ details.error }}</td></tr> |
47 | | - |
| 23 | + <tr><td ng-init="name= 'Application'" ng-include="'health.html'"></td></tr> |
48 | 24 | </tbody> |
49 | 25 | </table> |
50 | 26 | </div> |
|
88 | 64 |
|
89 | 65 | <div class="span6"> |
90 | 66 | <table class="table"> |
91 | | - <thead><tr><th>JVM</th><th><small class="pull-right"><a href="{{ application.url }}/metrics">raw JSON</a></small></th></tr></thead> |
| 67 | + <thead><tr><th colspan="2">JVM <small class="pull-right"><a href="{{ application.url }}/metrics">raw JSON</a></small></th></tr></thead> |
92 | 68 | <tbody> |
93 | 69 | <tr ng-if="metrics['systemload.average'] != null && metrics['systemload.average'] >= 0.0"> |
94 | 70 | <td>Systemload</td> |
|
171 | 147 | </div> |
172 | 148 | </div> |
173 | 149 | </div> |
| 150 | + |
| 151 | +<script type="text/ng-template" id="health.html"> |
| 152 | +<dl class="health-status"> |
| 153 | + <dt>{{name | capitalize}} <span class="status-{{health.status}} pull-right">{{ health.status }}</span></dt> |
| 154 | + |
| 155 | + <dd> |
| 156 | + <table style="width:100%;"> |
| 157 | + <tr ng-repeat="(key, value) in health" ng-if="isHealthDetail(key, value)" ng-class="{'error': key == 'error'}"> |
| 158 | + <td>{{key | capitalize}}</td><td>{{value | joinArray:', '}}</td> |
| 159 | + </tr> |
| 160 | + </table> |
| 161 | + </dd> |
| 162 | + |
| 163 | + <dd ng-repeat="(name, health) in health" ng-if="isChildHealth(name, health)" > |
| 164 | + <ng-include src="'health.html'" ng-if="name != 'diskSpace'"></ng-include> |
| 165 | + <ng-include src="'health-diskSpace.html'" ng-if="name == 'diskSpace'"></ng-include> |
| 166 | + </dd> |
| 167 | +</dl> |
| 168 | +</script> |
| 169 | + |
| 170 | +<script type="text/ng-template" id="health-diskSpace.html"> |
| 171 | +<dl class="health-status"> |
| 172 | + <dt>{{name | capitalize}} <span class="status-{{health.status}} pull-right">{{ health.status }}</span></dt> |
| 173 | + <dd> |
| 174 | + <table style="width:100%;"> |
| 175 | + <tr> |
| 176 | + <td>Free</td><td>{{ health.free | humanBytes }}</td> |
| 177 | + </tr> |
| 178 | + <tr> |
| 179 | + <td>Threshold</td><td>{{ health.threshold | humanBytes }}</td> |
| 180 | + </tr> |
| 181 | + </table> |
| 182 | + </dd> |
| 183 | +</dl> |
| 184 | +</script> |
0 commit comments