Skip to content

Commit 7634165

Browse files
committed
Remove tool runner mako, show message instead
1 parent 5d9a193 commit 7634165

File tree

4 files changed

+18
-49
lines changed

4 files changed

+18
-49
lines changed

lib/galaxy/webapps/galaxy/controllers/async.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,4 +230,6 @@ def index(self, trans, tool_id=None, data_secret=None, **kwd):
230230

231231
trans.sa_session.commit()
232232

233-
return trans.fill_template("root/tool_runner.mako", out_data={}, num_jobs=1, job_errors=[])
233+
return trans.show_ok_message(
234+
"A job has been successfully added to the queue. You can check the status of queued jobs in the History panel."
235+
)

lib/galaxy/webapps/galaxy/controllers/tool_runner.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,18 @@ def __tool_404__():
113113
error(galaxy.util.unicodify(e))
114114
if len(params) > 0:
115115
trans.log_event(f"Tool params: {str(params)}", tool_id=tool_id)
116-
return trans.fill_template("root/tool_runner.mako", **vars)
116+
status_text = "You can check the status of queued jobs in the History panel."
117+
job_errors = vars.get("job_errors")
118+
num_jobs = vars.get("num_jobs")
119+
if job_errors:
120+
errors = "\n".join(f"- {job_error}" for job_error in job_errors)
121+
message = f"There were errors setting up {len(job_errors)} submitted job(s):\n{errors}"
122+
return trans.show_error_message(message)
123+
if num_jobs > 1:
124+
message = f"{num_jobs} jobs have been successfully added to the queue. {status_text}"
125+
else:
126+
message = f"A job has been successfully added to the queue. {status_text}"
127+
return trans.show_ok_message(message)
117128

118129
@web.expose
119130
def rerun(self, trans, id=None, job_id=None, **kwd):

lib/galaxy_test/api/test_authenticate.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ def test_tool_runner_session_cookie_handling(self):
4646
tool_runner_response.raise_for_status()
4747
# Verify that we're not returning the sessioncookie
4848
assert "galaxysession" not in tool_runner_response.cookies
49+
# Verify text message
50+
text = tool_runner_response.text
51+
assert "A job has been successfully added to the queue." in text
4952
# Make sure history for original session received job
5053
current_history_json_response = get(
5154
urljoin(self.url, "history/current_history_json"), cookies={"galaxysession": galaxy_session_cookie}

templates/webapps/galaxy/root/tool_runner.mako

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)