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:20 UTC
[incubator-warble-server] branch master updated (5dc16da -> fa26696)
This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-warble-server.git.
from 5dc16da regen JS
new e3afbf6 when a node asks for tasks, that should count as acitivty
new 7379a1c start noting when a node hasn't responded in a while
new ccdd6ca regen js
new a8d0e9b only bork if the node is active
new fa26696 regen JS
The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
api/pages/node/tasks.py | 5 +++++
ui/css/warble.min.css | 6 ++++++
ui/js/coffee/warble_clientlist.coffee | 8 ++++++++
ui/js/warble.v1.js | 8 +++++++-
4 files changed, 26 insertions(+), 1 deletion(-)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@warble.apache.org
For additional commands, e-mail: commits-help@warble.apache.org
[incubator-warble-server] 03/05: regen js
Posted by hu...@apache.org.
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
[incubator-warble-server] 02/05: start noting when a node hasn't
responded in a while
Posted by hu...@apache.org.
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 7379a1c45164cff0c114f1e96df957d4d8c4069f
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sat Jun 30 12:05:58 2018 -0500
start noting when a node hasn't responded in a while
all nodes should keep in touch with the master at least every 15 minutes
(preferably every 5!), so if they don't, something is probably wrong
---
ui/css/warble.min.css | 6 ++++++
ui/js/coffee/warble_clientlist.coffee | 8 ++++++++
2 files changed, 14 insertions(+)
diff --git a/ui/css/warble.min.css b/ui/css/warble.min.css
index 4bb27c5..395e956 100644
--- a/ui/css/warble.min.css
+++ b/ui/css/warble.min.css
@@ -3110,6 +3110,12 @@ body.error .logo h1 {
color: #FFF;
}
+.clientcard.red {
+ background: linear-gradient(to bottom, #b21e40 0, #991e39 100%);
+ color: #FFF;
+
+}
+
.clientcard input {
background: rgba(255,255,200,0.45);
border: 1.5px inset #333;
diff --git a/ui/js/coffee/warble_clientlist.coffee b/ui/js/coffee/warble_clientlist.coffee
index 053dd0e..3f35b18 100644
--- a/ui/js/coffee/warble_clientlist.coffee
+++ b/ui/js/coffee/warble_clientlist.coffee
@@ -211,12 +211,20 @@ clientlist = (json, state) ->
# node last ping
line = new HTML('div', {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)
+ # Check for inactive (dead?) nodes
+ 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!)"))
+
+
#app(slist, tbl)
state.widget.inject(slist, true)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@warble.apache.org
For additional commands, e-mail: commits-help@warble.apache.org
[incubator-warble-server] 05/05: regen JS
Posted by hu...@apache.org.
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 fa26696793fb7998ca7c207780d556f8006f63d9
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sun Jul 1 09:58:13 2018 -0500
regen JS
---
ui/js/warble.v1.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/js/warble.v1.js b/ui/js/warble.v1.js
index e3865bb..a0d221a 100644
--- a/ui/js/warble.v1.js
+++ b/ui/js/warble.v1.js
@@ -4861,7 +4861,7 @@ clientlist = function(json, state) {
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) {
+ if (source.enabled && (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!)"));
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@warble.apache.org
For additional commands, e-mail: commits-help@warble.apache.org
[incubator-warble-server] 04/05: only bork if the node is active
Posted by hu...@apache.org.
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 a8d0e9bfcf52b9272afc37080151535a526b906b
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sun Jul 1 09:58:01 2018 -0500
only bork if the node is active
if a node is inactive, it shouldn't complain about inactivity in the
same way as with an active node.
---
ui/js/coffee/warble_clientlist.coffee | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ui/js/coffee/warble_clientlist.coffee b/ui/js/coffee/warble_clientlist.coffee
index 3f35b18..e668ffc 100644
--- a/ui/js/coffee/warble_clientlist.coffee
+++ b/ui/js/coffee/warble_clientlist.coffee
@@ -218,8 +218,8 @@ clientlist = (json, state) ->
])
d.inject(line)
- # Check for inactive (dead?) nodes
- if (moment(now).unix() - moment(lp).unix() > 900)
+ # Check for inactive (dead?) nodes - only enabled ones, of course.
+ if source.enabled and (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!)"))
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@warble.apache.org
For additional commands, e-mail: commits-help@warble.apache.org
[incubator-warble-server] 01/05: when a node asks for tasks,
that should count as acitivty
Posted by hu...@apache.org.
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 e3afbf61c64eacd4c5024a5828015cd149d5fd1c
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sat Jun 30 11:51:01 2018 -0500
when a node asks for tasks, that should count as acitivty
update the client's lastping value when it contacts us
---
api/pages/node/tasks.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/api/pages/node/tasks.py b/api/pages/node/tasks.py
index 44c6aef..626900f 100644
--- a/api/pages/node/tasks.py
+++ b/api/pages/node/tasks.py
@@ -48,6 +48,7 @@ import plugins.crypto
import plugins.registry
import plugins.tasks
import base64
+import time
def run(API, environ, indata, session):
@@ -75,6 +76,10 @@ def run(API, environ, indata, session):
'name': task.name,
'payload': task.payload
})
+ # Register that the node contacted us - that counts as being alive
+ session.client.lastping = int(time.time())
+ session.client.save()
+
# This is the fun part! Because $design, we have to encrypt using the client's public key!
# This way, only the _true_ client can decrypt it, and no snooping.
plain = json.dumps({
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@warble.apache.org
For additional commands, e-mail: commits-help@warble.apache.org