From 5eed7cb6d97548dc42b9ec06cc54133b42fa7fb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Wed, 17 Feb 2016 21:44:33 +0200 Subject: [PATCH] ui: Add blue color for recently seen clients --- certidude/static/js/certidude.js | 1 + certidude/static/js/templates.js | 13 ++++++++++--- certidude/static/views/status.html | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/certidude/static/js/certidude.js b/certidude/static/js/certidude.js index 533e43d..2d8e2f3 100644 --- a/certidude/static/js/certidude.js +++ b/certidude/static/js/certidude.js @@ -281,6 +281,7 @@ $(document).ready(function() { $status.html(nunjucks.render('views/status.html', { lease: { address: leases[j].address, + age: (new Date() - new Date(leases[j].released)) / 1000, identity: leases[j].identity, acquired: new Date(leases[j].acquired).toLocaleString(), released: leases[j].released ? new Date(leases[j].released).toLocaleString() : null diff --git a/certidude/static/js/templates.js b/certidude/static/js/templates.js index 102dc1d..5d601e6 100644 --- a/certidude/static/js/templates.js +++ b/certidude/static/js/templates.js @@ -1070,17 +1070,24 @@ var parentTemplate = null; output += "\n 1209600) { +output += "#D6083B"; ; } else { -output += "green"; +output += "#0072CF"; ; } ; } else { -output += "yellow"; +output += "#55A51C"; +; +} +; +} +else { +output += "#F3BD48"; ; } output += "\" />\n\n\n\n\n"; diff --git a/certidude/static/views/status.html b/certidude/static/views/status.html index ad8f715..eb2aa0e 100644 --- a/certidude/static/views/status.html +++ b/certidude/static/views/status.html @@ -1,5 +1,5 @@ - +