Skip to content

Commit

Permalink
First sample complete
Browse files Browse the repository at this point in the history
  • Loading branch information
Leonscape committed Jul 7, 2019
1 parent 79f2beb commit 01a3864
Show file tree
Hide file tree
Showing 219 changed files with 41 additions and 137,488 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -337,4 +337,7 @@ ASALocalRun/
.localhistory/

# BeatPulse healthcheck temp database
healthchecksdb
healthchecksdb

# Ignore lib files
**/wwwroot/lib/*
21 changes: 19 additions & 2 deletions samples/HRS.HealthCheckMonitor.Sample/Pages/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,30 @@

<form>
<div class="form-row">
<div class="form-group col-md-3">
<div class="form-group col-md-2">
<label for="name">Name</label>
<input type="text" readonly class="form-control" id="name" />
</div>
<div class="form-group col-md-3">
<div class="form-group col-md-2">
<label for="status">Status</label>
<input type="text" readonly class="form-control" id="status" />
</div>
<div class="form-group col-md-2">
<label for="statusStarted">Status Started</label>
<input type="text" readonly class="form-control" id="statusStarted" />
</div>
<div class="form-group col-md-2">
<label for="count">Status Count</label>
<input type="text" readonly class="form-control" id="count" />
</div>
<div class="form-group col-md-2">
<label for="lastDate">Last Evaluation Date</label>
<input type="text" readonly class="form-control" id="lastDate" />
</div>
<div class="form-group col-md-2">
<label for="duration">Duration</label>
<input type="text" readonly class="form-control" id="duration" />
</div>
</div>
</form>

Expand All @@ -23,6 +39,7 @@
<th data-field="name">Name</th>
<th data-field="status">Status</th>
<th data-field="description">Description</th>
<th data-field="duration">Duration</th>
</tr>
</thead>
</table>
2 changes: 1 addition & 1 deletion samples/HRS.HealthCheckMonitor.Sample/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"AllowedHosts": "*",
"HealthCheckMonitor": {
"EvaluationInterval": "00:00:5",
"InitialEvaluationDelay": "00:00:01",
"InitialEvaluationDelay": "00:00:05",
"HealthCheckTimeout": "00:00:05",
"HealthChecksDirectory": "",
"ApiEndpoint": "/monitor-api",
Expand Down
3 changes: 2 additions & 1 deletion samples/HRS.HealthCheckMonitor.Sample/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
var deps = {
"jquery": { "dirs": { "dist": "" } },
"bootstrap": { "dirs": { "dist": "" } },
"bootstrap-table": { "dirs": { "dist": "" } }
"bootstrap-table": { "dirs": { "dist": "" } },
"moment": { "dirs": { "min": "" } }
};

gulp.task("copyLibs", function () {
Expand Down
3 changes: 2 additions & 1 deletion samples/HRS.HealthCheckMonitor.Sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"dependencies": {
"bootstrap": "4.3.1",
"bootstrap-table": "1.15.2",
"jquery": "3.4.1"
"jquery": "3.4.1",
"moment": "2.24.0"
}
}
14 changes: 13 additions & 1 deletion samples/HRS.HealthCheckMonitor.Sample/wwwroot/js/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,24 @@ function gatherData() {
var hc = data.siteHealth;
$("#name").val(hc.name);
$("#status").val(hc.status);
$("#statusStarted").val(date(hc.currentStatusStarted).getTime());
$("#statusCount").val(hc.currentStatusCount);
$("#lastDate").val(hc.lastEvaluationDate);
$("#duration").val(hc.evaluationDuration);
setTable(hc.entries);
});
}

function setTable(entries) {
if (entries == null) {
return;
}
var data = [];
for (var c in entries) {
entries[c].name = c;
data.push(entries[c]);
}
$("#entries").bootstrapTable({
data: entries
data: data
});
}
Loading

0 comments on commit 01a3864

Please sign in to comment.