aboutsummaryrefslogtreecommitdiffstats
path: root/src/dashboard/views.py
diff options
context:
space:
mode:
authorJustin Choquette <jchoquette@iol.unh.edu>2023-06-08 12:46:53 -0400
committerJustin Choquette <jchoquette@iol.unh.edu>2023-07-21 13:17:51 -0400
commita09db9f287a02873c0226759f8ea444bb304cd59 (patch)
tree59e744e4b998973a808abbae2d21fbdd6201d829 /src/dashboard/views.py
parent8ddc7e820e120f1dde4e901d3cb6f1dd3f281e65 (diff)
LaaS 3.0 Almost MVP
Change-Id: Ided9a43cf3088bb58a233dc459711c03f43e11b8 Signed-off-by: Justin Choquette <jchoquette@iol.unh.edu>
Diffstat (limited to 'src/dashboard/views.py')
-rw-r--r--src/dashboard/views.py34
1 files changed, 8 insertions, 26 deletions
diff --git a/src/dashboard/views.py b/src/dashboard/views.py
index ff26c64..2942d59 100644
--- a/src/dashboard/views.py
+++ b/src/dashboard/views.py
@@ -19,8 +19,6 @@ import pytz
from account.models import Lab
from booking.models import Booking
-from resource_inventory.models import Image, ResourceProfile, ResourceQuery
-from workflow.workflow_manager import ManagerTracker
from laas_dashboard import settings
@@ -33,17 +31,20 @@ def lab_list_view(request):
def lab_detail_view(request, lab_name):
+ # todo - LL Integration
user = None
if request.user.is_authenticated:
user = request.user
lab = get_object_or_404(Lab, name=lab_name)
- images = Image.objects.filter(from_lab=lab).filter(public=True)
- if user:
- images = images | Image.objects.filter(from_lab=lab).filter(owner=user)
+ # images = Image.objects.filter(from_lab=lab).filter(public=True)
+ images = []
+ # if user:
+ # images = images | Image.objects.filter(from_lab=lab).filter(owner=user)
- hosts = ResourceQuery.filter(lab=lab)
+ # hosts = ResourceQuery.filter(lab=lab)
+ hosts = []
return render(
request,
@@ -51,7 +52,7 @@ def lab_detail_view(request, lab_name):
{
'title': "Lab Overview",
'lab': lab,
- 'hostprofiles': ResourceProfile.objects.filter(labs=lab),
+ # 'hostprofiles': ResourceProfile.objects.filter(labs=lab),
'images': images,
'hosts': hosts
}
@@ -70,7 +71,6 @@ def host_profile_detail_view(request):
def landing_view(request):
- manager = ManagerTracker.managers.get(request.session.get('manager_session'))
user = request.user
if not user.is_anonymous:
bookings = Booking.objects.filter(
@@ -85,7 +85,6 @@ def landing_view(request):
request,
'dashboard/landing.html',
{
- 'manager': manager is not None,
'title': "Welcome to the Lab as a Service Dashboard",
'bookings': bookings,
'LFID': LFID
@@ -99,21 +98,4 @@ class LandingView(TemplateView):
def get_context_data(self, **kwargs):
context = super(LandingView, self).get_context_data(**kwargs)
- hosts = []
-
- for host_profile in ResourceProfile.objects.all():
- name = host_profile.name
- description = host_profile.description
- in_labs = host_profile.labs
-
- interfaces = host_profile.interfaceprofile
- storage = host_profile.storageprofile
- cpu = host_profile.cpuprofile
- ram = host_profile.ramprofile
-
- host = (name, description, in_labs, interfaces, storage, cpu, ram)
- hosts.append(host)
-
- context.update({'hosts': hosts})
-
return context