mirror of
https://github.com/laurivosandi/certidude
synced 2024-12-23 00:25:18 +00:00
ui: Add blue color for recently seen clients
This commit is contained in:
parent
489de4ec79
commit
5eed7cb6d9
@ -281,6 +281,7 @@ $(document).ready(function() {
|
|||||||
$status.html(nunjucks.render('views/status.html', {
|
$status.html(nunjucks.render('views/status.html', {
|
||||||
lease: {
|
lease: {
|
||||||
address: leases[j].address,
|
address: leases[j].address,
|
||||||
|
age: (new Date() - new Date(leases[j].released)) / 1000,
|
||||||
identity: leases[j].identity,
|
identity: leases[j].identity,
|
||||||
acquired: new Date(leases[j].acquired).toLocaleString(),
|
acquired: new Date(leases[j].acquired).toLocaleString(),
|
||||||
released: leases[j].released ? new Date(leases[j].released).toLocaleString() : null
|
released: leases[j].released ? new Date(leases[j].released).toLocaleString() : null
|
||||||
|
@ -1070,17 +1070,24 @@ var parentTemplate = null;
|
|||||||
output += "<svg height=\"32\" width=\"32\">\n <circle cx=\"16\" cy=\"16\" r=\"13\" stroke=\"black\" stroke-width=\"3\" fill=\"";
|
output += "<svg height=\"32\" width=\"32\">\n <circle cx=\"16\" cy=\"16\" r=\"13\" stroke=\"black\" stroke-width=\"3\" fill=\"";
|
||||||
if(runtime.contextOrFrameLookup(context, frame, "lease")) {
|
if(runtime.contextOrFrameLookup(context, frame, "lease")) {
|
||||||
if(runtime.memberLookup((runtime.contextOrFrameLookup(context, frame, "lease")),"released")) {
|
if(runtime.memberLookup((runtime.contextOrFrameLookup(context, frame, "lease")),"released")) {
|
||||||
output += "red";
|
if(runtime.memberLookup((runtime.contextOrFrameLookup(context, frame, "lease")),"age") > 1209600) {
|
||||||
|
output += "#D6083B";
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
output += "green";
|
output += "#0072CF";
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
output += "yellow";
|
output += "#55A51C";
|
||||||
|
;
|
||||||
|
}
|
||||||
|
;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
output += "#F3BD48";
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
output += "\" />\n</svg>\n\n<span>\n\n";
|
output += "\" />\n</svg>\n\n<span>\n\n";
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<svg height="32" width="32">
|
<svg height="32" width="32">
|
||||||
<circle cx="16" cy="16" r="13" stroke="black" stroke-width="3" fill="{% if lease %}{% if lease.released %}red{%else %}green{% endif %}{% else %}yellow{% endif %}" />
|
<circle cx="16" cy="16" r="13" stroke="black" stroke-width="3" fill="{% if lease %}{% if lease.released %}{% if lease.age > 1209600 %}#D6083B{% else %}#0072CF{% endif %}{%else %}#55A51C{% endif %}{% else %}#F3BD48{% endif %}" />
|
||||||
</svg>
|
</svg>
|
||||||
|
|
||||||
<span>
|
<span>
|
||||||
|
Before Width: | Height: | Size: 498 B After Width: | Height: | Size: 561 B |
Loading…
Reference in New Issue
Block a user