summaryrefslogtreecommitdiffstats
path: root/tools/pharos-dashboard/src/dashboard/views.py
diff options
context:
space:
mode:
authormaxbr <maxbr@mi.fu-berlin.de>2017-05-05 10:02:56 +0200
committermaxbr <maxbr@mi.fu-berlin.de>2017-05-05 10:28:14 +0200
commitd4d63f63f1ab4cd636499adee319f2a0b8513020 (patch)
tree34b52298d10cffd8ee768b51e3341ae63f75f631 /tools/pharos-dashboard/src/dashboard/views.py
parenteb878efa9b5222de678ed84373d6ac056c3b129e (diff)
Pharos Dashboard: Add manual resource management
Dev Pods are now managed by checking the "Dev pod" box in the Admin Panel. This commit also fixes a dead image URL and the oauth process for the dashboard URL. Change-Id: Ic94160eb3a4504a369606261440df0e5354ac027 Signed-off-by: maxbr <maxbr@mi.fu-berlin.de>
Diffstat (limited to 'tools/pharos-dashboard/src/dashboard/views.py')
-rw-r--r--tools/pharos-dashboard/src/dashboard/views.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/pharos-dashboard/src/dashboard/views.py b/tools/pharos-dashboard/src/dashboard/views.py
index 1848844b..62a9f830 100644
--- a/tools/pharos-dashboard/src/dashboard/views.py
+++ b/tools/pharos-dashboard/src/dashboard/views.py
@@ -45,7 +45,7 @@ class DevelopmentPodsView(TemplateView):
template_name = "dashboard/dev_pods.html"
def get_context_data(self, **kwargs):
- resources = Resource.objects.filter(slave__dev_pod=True, slave__active=True)
+ resources = Resource.objects.filter(dev_pod=True)
bookings = Booking.objects.filter(start__lte=timezone.now())
bookings = bookings.filter(end__gt=timezone.now())
@@ -76,11 +76,9 @@ class ResourceView(TemplateView):
def get_context_data(self, **kwargs):
resource = get_object_or_404(Resource, id=self.kwargs['resource_id'])
- utilization = resource.slave.get_utilization(timedelta(days=7))
bookings = Booking.objects.filter(resource=resource, end__gt=timezone.now())
context = super(ResourceView, self).get_context_data(**kwargs)
- context.update({'title': str(resource), 'resource': resource, 'utilization': utilization,
- 'bookings': bookings})
+ context.update({'title': str(resource), 'resource': resource, 'bookings': bookings})
return context