samples/consul-ui/js/utils.js in consul-templaterb-1.8.2 vs samples/consul-ui/js/utils.js in consul-templaterb-1.8.3
- old
+ new
@@ -10,9 +10,18 @@
}
return serviceStatus;
}
+function padDateUnit(x) {
+ return x > 9 ? x : '0' + x;
+}
+
+function formatDate(date) {
+ return padDateUnit(date.getMonth()+1) + "/" + padDateUnit(date.getDate()) + " " + padDateUnit(date.getHours()) + ':' + padDateUnit(date.getMinutes()) + ':' + padDateUnit(date.getSeconds());
+}
+
+
function nodeState(checks) {
status='passing';
for (var checkKey in checks) {
switch(checks[checkKey]['status']) {
case 'passing': break;