aboutsummaryrefslogtreecommitdiffstats
path: root/src/workflow/models.py
diff options
context:
space:
mode:
authorJustin Choquette <jchoquette@iol.unh.edu>2022-06-07 16:07:54 -0400
committerJustin Choquette <jchoquette@iol.unh.edu>2022-09-29 13:34:30 -0400
commit4edb8881357e043fd7ea15efeb2d592c9fb55efc (patch)
treeeac25aa9f64e1938348ccd3cbb0cadde4b995837 /src/workflow/models.py
parentb7df4193fef9adeccf99685af7d7420274d66064 (diff)
Laas Dashboard Front End Improvements
Change-Id: Ib9aa21747bd57faef94db7795cd89119ad4b0a9d Signed-off-by: Justin Choquette <jchoquette@iol.unh.edu>
Diffstat (limited to 'src/workflow/models.py')
-rw-r--r--src/workflow/models.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/workflow/models.py b/src/workflow/models.py
index 91a216c..e065202 100644
--- a/src/workflow/models.py
+++ b/src/workflow/models.py
@@ -326,11 +326,15 @@ class Confirmation_Step(WorkflowStep):
def get_context(self):
context = super(Confirmation_Step, self).get_context()
context['form'] = ConfirmationForm()
- context['confirmation_info'] = yaml.dump(
- self.repo_get(self.repo.CONFIRMATION),
- default_flow_style=False
- ).strip()
-
+ # Summary of submitted form data shown on the 'confirm' step of the workflow
+ confirm_details = "\nPod:\n Name: '{name}'\n Description: '{desc}'\nLab: '{lab}'".format(
+ name=self.repo_get(self.repo.CONFIRMATION)['resource']['name'],
+ desc=self.repo_get(self.repo.CONFIRMATION)['resource']['description'],
+ lab=self.repo_get(self.repo.CONFIRMATION)['template']['lab'])
+ confirm_details += "\nResources:"
+ for i, device in enumerate(self.repo_get(self.repo.RESOURCE_TEMPLATE_MODELS)['resources']):
+ confirm_details += "\n " + str(device) + ": " + str(self.repo_get(self.repo.CONFIRMATION)['template']['resources'][i]['profile'])
+ context['confirmation_info'] = confirm_details
if self.valid == WorkflowStepStatus.VALID:
context["confirm_succeeded"] = "true"