diff options
author | Sawyer Bergeron <sbergeron@iol.unh.edu> | 2019-05-22 10:13:03 -0400 |
---|---|---|
committer | Sawyer Bergeron <sbergeron@iol.unh.edu> | 2019-05-22 13:34:13 -0400 |
commit | a21c6044461097a8551efd7bbcae2cd4d466fb07 (patch) | |
tree | e4150db2439f12a2fe8f06a1ea499327235af46d /src/workflow/resource_bundle_workflow.py | |
parent | 2fd2b83361813e0a8375d81729c86adcb2c6feda (diff) |
Make steps possible to hide/show
Change-Id: Ice5036ea9801655032cb080537fbd471fb3fda3e
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
Diffstat (limited to 'src/workflow/resource_bundle_workflow.py')
-rw-r--r-- | src/workflow/resource_bundle_workflow.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/workflow/resource_bundle_workflow.py b/src/workflow/resource_bundle_workflow.py index 536187f..ced355f 100644 --- a/src/workflow/resource_bundle_workflow.py +++ b/src/workflow/resource_bundle_workflow.py @@ -134,16 +134,16 @@ class Define_Hardware(WorkflowStep): self.form = HardwareDefinitionForm(request.POST) if self.form.is_valid(): if len(json.loads(self.form.cleaned_data['filter_field'])['labs']) != 1: - self.metastep.set_invalid("Please select one lab") + self.set_invalid("Please select one lab") else: self.update_models(self.form.cleaned_data) self.update_confirmation() - self.metastep.set_valid("Step Completed") + self.set_valid("Step Completed") else: - self.metastep.set_invalid("Please complete the fields highlighted in red to continue") + self.set_invalid("Please complete the fields highlighted in red to continue") pass except Exception as e: - self.metastep.set_invalid(str(e)) + self.set_invalid(str(e)) self.context = self.get_context() return render(request, self.template, self.context) @@ -239,11 +239,11 @@ class Define_Nets(WorkflowStep): xmlData = request.POST.get("xml") self.updateModels(xmlData) # update model with xml - self.metastep.set_valid("Networks applied successfully") + self.set_valid("Networks applied successfully") except ResourceAvailabilityException: - self.metastep.set_invalid("Public network not availble") + self.set_invalid("Public network not availble") except Exception as e: - self.metastep.set_invalid("An error occurred when applying networks: " + str(e)) + self.set_invalid("An error occurred when applying networks: " + str(e)) return self.render(request) def updateModels(self, xmlData): @@ -425,10 +425,10 @@ class Resource_Meta_Info(WorkflowStep): tmp = tmp[:60] + "..." confirm_info["description"] = tmp self.repo_put(self.repo.CONFIRMATION, confirm) - self.metastep.set_valid("Step Completed") + self.set_valid("Step Completed") else: - self.metastep.set_invalid("Please correct the fields highlighted in red to continue") + self.set_invalid("Please correct the fields highlighted in red to continue") pass return self.render(request) |