Commit 62b5eeaa by Johannes Stelzer

Show custom healthchecks in details

Fixes #42
parent e667c670
......@@ -24,30 +24,31 @@
<td>Application</td><td><span class="status-{{health.status}}">{{ health.status }}</span></td>
</tr>
<tr ng-if="health.db">
<td>Datasources</td>
<td><span class="status-{{health.db.status}}">{{ health.db.status }}</span><br>
{{health.db.database}}
</td>
</tr>
<tr ng-if="health.db.error" colspan="2" class="alert alert-error" >{{ health.db.error }}</td></tr>
<tr ng-repeat-start="(indicator, details) in health" ng-if="indicator != 'status'">
<td ng-if="indicator != 'db'">{{indicator | capitalize}}</td>
<td ng-if="indicator == 'db'">Datasource</td>
<tr ng-repeat-start="(dbname, db) in health.db" ng-if="dbname != 'status' && dbname != 'error' && dbname != 'database' && dbname != 'hello'" >
<td>{{ dbname | capitalize }} Datasource</td><td><span class="status-{{db.status}}">{{ db.status }}</span><br>
{{db.database}}
<td><span class="status-{{details.status}}">{{ details.status }}</span><br>
<span ng-repeat="(key, value) in details" ng-if="indicator != 'db' && indicator != 'diskSpace' && key != 'status' && key != 'error'">{{ key | capitalize }}: {{value}}<br></span>
<span ng-if="indicator == 'db' && details.database">{{ details.database }}</span>
<span ng-if="indicator == 'diskSpace'">{{ health.diskSpace.free | humanBytes }} free / {{ health.diskSpace.threshold | humanBytes }} threshold</span>
</td>
</tr>
<tr ng-repeat-end ng-if="db.error"><td colspan="2" class="alert alert-error" >{{ db.error }}</td></tr>
<tr ng-if="health.diskSpace">
<td>Diskspace</td><td><span class="status-{{health.diskSpace.status}}">{{ health.diskSpace.status }}</span><br>
{{ health.diskSpace.free | humanBytes }} free / {{ health.diskSpace.threshold | humanBytes }} threshold
<tr ng-repeat-start="(dbname, dbhealth) in details" ng-if="indicator == 'db' && dbname != 'status' && dbname != 'error' && dbname != 'database' && dbname != 'hello'" >
<td>- {{ dbname | capitalize }}</td>
<td><span class="status-{{dbhealth.status}}">{{ dbhealth.status }}</span><br>
{{dbhealth.database}}
</td>
</tr>
<tr ng-repeat-end ng-if="dbhealth.error"><td colspan="2" class="alert alert-error" >{{ dbhealth.error }}</td></tr>
<tr ng-repeat-end ng-if="details.error"><td colspan="2" class="alert alert-error" >{{ details.error }}</td></tr>
</tbody>
</table>
</div>
<div class="span6">
<table class="table">
<thead><tr><th colspan="2">Memory</th></tr></thead>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment