summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Laszlo <tim.laszlo@gmail.com>2010-10-14 15:56:20 -0500
committerSol Jerome <sol.jerome@gmail.com>2010-11-02 20:35:17 -0500
commitec6125bb25e7c8f24527b83c6f88d55c8a2f1a78 (patch)
tree8229aed99f413f1d8a6eb53dee0fbd4c08a176b8
parent0a9a99122fd2177dd41cc8e16d32008ba0f02a8a (diff)
downloadbcfg2-ec6125bb25e7c8f24527b83c6f88d55c8a2f1a78.tar.gz
bcfg2-ec6125bb25e7c8f24527b83c6f88d55c8a2f1a78.tar.bz2
bcfg2-ec6125bb25e7c8f24527b83c6f88d55c8a2f1a78.zip
web reports: tweaks and updates
-rw-r--r--reports/site_media/bcfg2_logo.pngbin0 -> 27109 bytes
-rw-r--r--src/lib/Server/Reports/reports/views.py42
2 files changed, 21 insertions, 21 deletions
diff --git a/reports/site_media/bcfg2_logo.png b/reports/site_media/bcfg2_logo.png
new file mode 100644
index 000000000..aeb3b7f5f
--- /dev/null
+++ b/reports/site_media/bcfg2_logo.png
Binary files differ
diff --git a/src/lib/Server/Reports/reports/views.py b/src/lib/Server/Reports/reports/views.py
index 64617ce70..a061a3964 100644
--- a/src/lib/Server/Reports/reports/views.py
+++ b/src/lib/Server/Reports/reports/views.py
@@ -182,24 +182,24 @@ def client_manage(request):
message = ''
if request.method == 'POST':
try:
- client_name = request.POST.get('client_name', None)
- client_action = request.POST.get('client_action', None)
- client = Client.objects.get(name=client_name)
- if client_action == 'expire':
- client.expiration = datetime.now();
- client.save()
- message = "Expiration for %s set to %s." % \
- (client_name, client.expiration.strftime("%Y-%m-%d %H:%M:%S"))
- elif client_action == 'unexpire':
- client.expiration = None;
- client.save()
- message = "%s is now active." % client_name
- else:
- message = "Missing action"
- except Client.DoesNotExist:
- if not client_name:
- client_name = "<none>"
- message = "Couldn't find client \"%s\"" % client_name
+ client_name = request.POST.get('client_name', None)
+ client_action = request.POST.get('client_action', None)
+ client = Client.objects.get(name=client_name)
+ if client_action == 'expire':
+ client.expiration = datetime.now();
+ client.save()
+ message = "Expiration for %s set to %s." % \
+ (client_name, client.expiration.strftime("%Y-%m-%d %H:%M:%S"))
+ elif client_action == 'unexpire':
+ client.expiration = None;
+ client.save()
+ message = "%s is now active." % client_name
+ else:
+ message = "Missing action"
+ except Client.DoesNotExist:
+ if not client_name:
+ client_name = "<none>"
+ message = "Couldn't find client \"%s\"" % client_name
return render_to_response('clients/manage.html',
{'clients': Client.objects.order_by('name').all(), 'message': message},
@@ -222,10 +222,10 @@ def display_summary(request, timestamp=None):
collected_data['stale'].append(node)
# If stale check for uptime
try:
- if node.client.pings.latest().status == 'N':
- collected_data['pings'].append(node)
- except Ping.DoesNotExist:
+ if node.client.pings.latest().status == 'N':
collected_data['pings'].append(node)
+ except Ping.DoesNotExist:
+ collected_data['pings'].append(node)
continue
if node.bad_entry_count() > 0:
collected_data['bad'].append(node)