Fix iframe height bug
[laas.git] / src / resource_inventory / views.py
1 ##############################################################################
2 # Copyright (c) 2018 Sawyer Bergeron, Parker Berberian, and others.
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9
10
11 from django.views.generic import TemplateView
12
13 from resource_inventory.models import Host
14
15
16 class HostView(TemplateView):
17     template_name = "resource/hosts.html"
18
19     def get_context_data(self, **kwargs):
20         context = super(HostView, self).get_context_data(**kwargs)
21         hosts = Host.objects.filter(working=True)
22         context.update({'hosts': hosts, 'title': "Hardware Resources"})
23         return context