Commit 24c1b204 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

better display for status error

parent adf82612
...@@ -501,7 +501,7 @@ class Workflow(threading.Thread): ...@@ -501,7 +501,7 @@ class Workflow(threading.Thread):
if display_errors and len(status_info["failed_commands"]) > 0: if display_errors and len(status_info["failed_commands"]) > 0:
if components_errors == "" : if components_errors == "" :
components_errors = "Failed Commands :\n" components_errors = "Failed Commands :\n"
components_errors += " - " + component + " :\n " + "\n ".join(status_info["failed_commands"]) components_errors += " - " + component + " :\n " + "\n ".join(status_info["failed_commands"]) + "\n"
status += " - " + component + ", time elapsed " + time_format(status_info["time"]) + \ status += " - " + component + ", time elapsed " + time_format(status_info["time"]) + \
" (total:" + str(status_info["tasks"]) + ", " + waiting + ", " + running + ", " + failed + \ " (total:" + str(status_info["tasks"]) + ", " + waiting + ", " + running + ", " + failed + \
", " + aborted + ", " + completed + ")" ", " + aborted + ", " + completed + ")"
...@@ -511,7 +511,7 @@ class Workflow(threading.Thread): ...@@ -511,7 +511,7 @@ class Workflow(threading.Thread):
pretty_str += ("\n" + worflow_errors) if worflow_errors != "" else "" pretty_str += ("\n" + worflow_errors) if worflow_errors != "" else ""
if len(workflow.get_components_nameid()) > 0: if len(workflow.get_components_nameid()) > 0:
pretty_str += ("\n" + status) if status != "" else "" pretty_str += ("\n" + status) if status != "" else ""
pretty_str += ("\n" + components_errors) if components_errors != "" else "" pretty_str += ("\n" + components_errors[:-1]) if components_errors != "" else ""
if html: return pretty_str.replace("\n", "<br />") if html: return pretty_str.replace("\n", "<br />")
else: return pretty_str else: return pretty_str
else: else:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment