Skip to content

Commit 184a3fe

Browse files
authored
Display Version Info from API (#20)
1 parent 6cafec1 commit 184a3fe

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

static/css/dataspace.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ body {
1717
line-height: 60px;
1818
}
1919

20+
#versionStatus {
21+
margin-right: 2px;
22+
}
23+
2024
body > .container {
2125
padding: 40px 15px 0;
2226
}

static/js/dataspace.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,22 @@ class Dataspace {
224224

225225
return grid;
226226
}
227+
}
227228

229+
function versionCheck() {
230+
$.get("/status").then((data) => {
231+
console.log(data);
232+
if (data.status == 'ok') {
233+
$("#versionStatus").removeClass("text-danger").addClass("text-success");
234+
$("#versionInfo").text(data.version);
235+
}
236+
});
228237
}
229238

230239
$(document).ready(function() {
240+
// Perform version check
241+
versionCheck();
242+
231243
// Create the dataspace app
232244
app = new Dataspace("#dataspace");
233245

templates/index.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@
425425
Made with &spades; by <a href="https://github.com/bbengfort">@bbengfort</a>
426426
for the Georgetown Data Science Certificate
427427
</span>
428-
<span class="text-muted pull-right">For Demonstration Purposes Only.</span>
428+
<span class="text-muted pull-right"><span id="versionStatus" class="text-danger">&#9679;</span><span id="versionInfo"></span></span>
429429
</div>
430430
</footer>
431431

@@ -447,10 +447,15 @@ <h5 class="modal-title" id="aboutModalLabel">About Data Space</h5>
447447
selecting a dataset or by creating one of your own, you can fit a model to the data
448448
and see how the model would make decisions based on the data it has been trained on.
449449
The fitted contours display the highest likelihoods of the class the model would select.
450+
</p>
451+
<p>
450452
Although this is a toy example, hopefully it helps give you the intuition that the
451453
machine learning process is a model selection search for the best combination of features,
452454
algorithm, and hyperparameter that generalize well in a bounded feature space.
453455
</p>
456+
<p>
457+
This application is for demonstration purposes only.
458+
</p>
454459
</div>
455460
<div class="modal-footer">
456461
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>

0 commit comments

Comments
 (0)