summaryrefslogtreecommitdiffstats
path: root/dashboard/src/workflow
diff options
context:
space:
mode:
authorSawyer Bergeron <sawyerbergeron@gmail.com>2019-01-17 11:30:35 -0500
committerSawyer Bergeron <sawyerbergeron@gmail.com>2019-01-18 11:27:53 -0500
commite3842fee2abb084d020acf7b868af745b8a66c18 (patch)
treea65021580b41005e266a18231a4a58a8386cc3ba /dashboard/src/workflow
parentde2031ad28b3556a65d19151be3a8b459b151c65 (diff)
Add Quick-Booking Workflow
Users can now quickly provision a single-host pod without having to configure unecessary networking. This is intended to be analogous to the workflow used during LaaS 1.0, and to speed up the process of creating a booking for users who do not need more than a single host (for virtual deployments) Change-Id: Ia19cea9a42bbb1df57aad05af8f8ea821395664d Signed-off-by: Sawyer Bergeron <sawyerbergeron@gmail.com>
Diffstat (limited to 'dashboard/src/workflow')
-rw-r--r--dashboard/src/workflow/forms.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/dashboard/src/workflow/forms.py b/dashboard/src/workflow/forms.py
index f781663..b8c7f66 100644
--- a/dashboard/src/workflow/forms.py
+++ b/dashboard/src/workflow/forms.py
@@ -330,7 +330,7 @@ class MultipleSelectFilterField(forms.Field):
class FormUtils:
@staticmethod
- def getLabData():
+ def getLabData(multiple_selectable_hosts):
"""
Gets all labs and thier host profiles and returns a serialized version the form can understand.
Should be rewritten with a related query to make it faster
@@ -361,7 +361,7 @@ class FormUtils:
shost['selected'] = 0
shost['selectable'] = 1
shost['follow'] = 0
- shost['multiple'] = 1
+ shost['multiple'] = multiple_selectable_hosts
items[shost['id']] = shost
mapping[slab['id']].append(shost['id'])
if shost['id'] not in mapping:
@@ -374,7 +374,7 @@ class FormUtils:
context = {
'filter_objects': filter_objects,
'mapping': mapping,
- 'items': items
+ 'filter_items': items
}
return context
@@ -384,7 +384,7 @@ class HardwareDefinitionForm(forms.Form):
def __init__(self, *args, **kwargs):
selection_data = kwargs.pop("selection_data", False)
super(HardwareDefinitionForm, self).__init__(*args, **kwargs)
- attrs = FormUtils.getLabData()
+ attrs = FormUtils.getLabData(1)
attrs['selection_data'] = selection_data
self.fields['filter_field'] = MultipleSelectFilterField(
widget=MultipleSelectFilterWidget(