diff options
author | Justin Choquette <jchoquette@iol.unh.edu> | 2023-06-08 12:46:53 -0400 |
---|---|---|
committer | Justin Choquette <jchoquette@iol.unh.edu> | 2023-07-21 13:17:51 -0400 |
commit | a09db9f287a02873c0226759f8ea444bb304cd59 (patch) | |
tree | 59e744e4b998973a808abbae2d21fbdd6201d829 /src/resource_inventory/views.py | |
parent | 8ddc7e820e120f1dde4e901d3cb6f1dd3f281e65 (diff) |
LaaS 3.0 Almost MVP
Change-Id: Ided9a43cf3088bb58a233dc459711c03f43e11b8
Signed-off-by: Justin Choquette <jchoquette@iol.unh.edu>
Diffstat (limited to 'src/resource_inventory/views.py')
-rw-r--r-- | src/resource_inventory/views.py | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/src/resource_inventory/views.py b/src/resource_inventory/views.py index 52f8c75..f903394 100644 --- a/src/resource_inventory/views.py +++ b/src/resource_inventory/views.py @@ -6,33 +6,3 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## - - -from django.views.generic import TemplateView -from django.shortcuts import get_object_or_404 -from django.shortcuts import render - -from resource_inventory.models import ResourceProfile, ResourceQuery - - -class HostView(TemplateView): - template_name = "resource/hosts.html" - - def get_context_data(self, **kwargs): - context = super(HostView, self).get_context_data(**kwargs) - hosts = ResourceQuery.filter(working=True) - context.update({'hosts': hosts, 'title': "Hardware Resources"}) - return context - - -def hostprofile_detail_view(request, hostprofile_id): - hostprofile = get_object_or_404(ResourceProfile, id=hostprofile_id) - - return render( - request, - "resource/hostprofile_detail.html", - { - 'title': "Host Type: " + str(hostprofile.name), - 'hostprofile': hostprofile - } - ) |