You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@warble.apache.org by hu...@apache.org on 2018/07/01 14:58:23 UTC
[incubator-warble-server] 03/05: regen js
This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-warble-server.git
commit ccdd6caba131c76e0997c5bcf371ef5070f4dcc2
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sat Jun 30 12:06:02 2018 -0500
regen js
---
ui/js/warble.v1.js | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/ui/js/warble.v1.js b/ui/js/warble.v1.js
index 6145c43..e3865bb 100644
--- a/ui/js/warble.v1.js
+++ b/ui/js/warble.v1.js
@@ -4714,7 +4714,7 @@ nodeStatusSort = (function(_this) {
})(this);
clientlist = function(json, state) {
- var banner, btn, card, d, hn, len, line, lline, lp, q, retval, rline, slist, source, sources, vlist, vrf;
+ var banner, btn, card, d, hn, len, line, lline, lp, now, q, retval, rline, slist, source, sources, vlist, vrf;
slist = mk('div');
vlist = new HTML('div');
if (json.nodes) {
@@ -4858,8 +4858,14 @@ clientlist = function(json, state) {
"class": 'clientcardline'
});
lp = new Date(source.lastping * 1000.0);
+ now = new Date();
line.inject([new HTML('b', {}, "Last Active: "), txt(moment(lp).fromNow() + " (" + lp.ISOBare() + ")")]);
d.inject(line);
+ if (moment(now).unix() - moment(lp).unix() > 900) {
+ card.setAttribute("class", "clientcard red");
+ line.inject(txt(" - Node dead?!"));
+ lline.inject(txt(" - (no contact for > 15 minutes!)"));
+ }
}
}
state.widget.inject(slist, true);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@warble.apache.org
For additional commands, e-mail: commits-help@warble.apache.org