Commit 04f71adc authored by Jerome Mariette's avatar Jerome Mariette

No commit message

No commit message
parent 0ae52122
......@@ -107,6 +107,12 @@ class JFlowServer (object):
"params": parameters})
return workflows
@cherrypy.expose
@jsonify
def run_workflow(self, **kwargs):
pass
# self.wfmanager.run_workflow(workflow_class, args, True)
@cherrypy.expose
@jsonify
def rerun_workflow(self, **kwargs):
......
......@@ -63,11 +63,22 @@ def display_workflow_status(workflow, detailed=False):
try: perc_aborted = (status_info["aborted"]*100.0)/status_info["tasks"]
except: perc_aborted = 0
try: perc_completed = (status_info["completed"]*100.0)/status_info["tasks"]
except: perc_completed = 0
except: perc_completed = 0
if status_info["running"] > 0: running = "\033[94mrunning:" + str(status_info["running"]) + "\033[0m"
else: running = "running:" + str(status_info["running"])
if status_info["waiting"] > 0: waiting = "\033[93mwaiting:" + str(status_info["waiting"]) + "\033[0m"
else: waiting = "waiting:" + str(status_info["waiting"])
if status_info["failed"] > 0: failed = "\033[91mfailed:" + str(status_info["failed"]) + "\033[0m"
else: failed = "failed:" + str(status_info["failed"])
if status_info["aborted"] > 0: aborted = "\033[95maborted:" + str(status_info["aborted"]) + "\033[0m"
else: aborted = "aborted:" + str(status_info["aborted"])
if status_info["completed"] == status_info["tasks"] and status_info["completed"] > 0: completed = "\033[92mcompleted:" + str(status_info["completed"]) + "\033[0m"
else: completed = "completed:" + str(status_info["completed"])
status += " - " + component + ", time elapsed " + time_format(status_info["time"]) + \
" (total:" + str(status_info["tasks"]) + ", waiting:" + str(status_info["waiting"]) + \
", running:" + str(status_info["running"]) + ", failed:" + str(status_info["failed"]) + \
", aborted:" + str(status_info["aborted"]) + ", completed:" + str(status_info["completed"]) + ")"
" (total:" + str(status_info["tasks"]) + ", " + waiting + ", " + running + ", " + failed + \
", " + aborted + ", " + completed + ")"
if i<len(workflow.get_components_nameid())-1: status += "\n"
return status
else:
......
Markdown is supported
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