From 4594d1ed657f79163e179ac591e21fff3a68ecbc Mon Sep 17 00:00:00 2001 From: Karel van Klink <karel.vanklink@geant.org> Date: Thu, 3 Aug 2023 16:16:13 +0200 Subject: [PATCH] interpret JSON returned from the provisioning proxy --- gso/services/provisioning_proxy.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gso/services/provisioning_proxy.py b/gso/services/provisioning_proxy.py index 548be84f..75e6b15f 100644 --- a/gso/services/provisioning_proxy.py +++ b/gso/services/provisioning_proxy.py @@ -208,17 +208,16 @@ def _confirm_pp_results(state: State) -> FormGenerator: class ConfirmRunPage(FormPage): class Config: title = ( - f"Execution for " - f"{state['subscription']['product']['name']} " - f"completed, please confirm the results below." + f"Execution for {state['subscription']['product']['name']} completed, please confirm the results below." ) if not successful_run: pp_retry_label1: Label = ( "Provisioning Proxy - playbook execution failed: inspect the output before proceeding" # type: ignore ) + run_status: str = ReadOnlyField(state["pp_run_results"]["status"]) - run_results: LongText = ReadOnlyField(f"{state['pp_run_results']['output']}") + run_results: LongText = ReadOnlyField(json.dumps(state["pp_run_results"]["output"], indent=4)) if not successful_run: pp_retry_label: Label = ( "Click submit to retry. Otherwise, abort the workflow from the process tab." # type: ignore -- GitLab