diff --git a/lib/galaxy/webapps/galaxy/controllers/async.py b/lib/galaxy/webapps/galaxy/controllers/async.py index 690700ca7af..07c89b89f67 100644 --- a/lib/galaxy/webapps/galaxy/controllers/async.py +++ b/lib/galaxy/webapps/galaxy/controllers/async.py @@ -230,4 +230,6 @@ class ASync(BaseUIController): trans.sa_session.commit() - return trans.fill_template("root/tool_runner.mako", out_data={}, num_jobs=1, job_errors=[]) + return trans.show_ok_message( + "A job has been successfully added to the queue. You can check the status of queued jobs in the History panel." + ) diff --git a/lib/galaxy/webapps/galaxy/controllers/tool_runner.py b/lib/galaxy/webapps/galaxy/controllers/tool_runner.py index 3c8f537ae6c..fddc9e88321 100644 --- a/lib/galaxy/webapps/galaxy/controllers/tool_runner.py +++ b/lib/galaxy/webapps/galaxy/controllers/tool_runner.py @@ -113,7 +113,18 @@ class ToolRunner(BaseUIController): error(galaxy.util.unicodify(e)) if len(params) > 0: trans.log_event(f"Tool params: {str(params)}", tool_id=tool_id) - return trans.fill_template("root/tool_runner.mako", **vars) + status_text = "You can check the status of queued jobs in the History panel." + job_errors = vars.get("job_errors") + num_jobs = vars.get("num_jobs") + if job_errors: + errors = "\n".join(f"- {job_error}" for job_error in job_errors) + message = f"There were errors setting up {len(job_errors)} submitted job(s):\n{errors}" + return trans.show_error_message(message) + if num_jobs > 1: + message = f"{num_jobs} jobs have been successfully added to the queue. {status_text}" + else: + message = f"A job has been successfully added to the queue. {status_text}" + return trans.show_ok_message(message) @web.expose def rerun(self, trans, id=None, job_id=None, **kwd): diff --git a/lib/galaxy_test/api/test_authenticate.py b/lib/galaxy_test/api/test_authenticate.py index 7cd375516a3..68c5f25c855 100644 --- a/lib/galaxy_test/api/test_authenticate.py +++ b/lib/galaxy_test/api/test_authenticate.py @@ -46,6 +46,9 @@ class TestAuthenticateApi(ApiTestCase): tool_runner_response.raise_for_status() # Verify that we're not returning the sessioncookie assert "galaxysession" not in tool_runner_response.cookies + # Verify text message + text = tool_runner_response.text + assert "A job has been successfully added to the queue." in text # Make sure history for original session received job current_history_json_response = get( urljoin(self.url, "history/current_history_json"), cookies={"galaxysession": galaxy_session_cookie} diff --git a/templates/webapps/galaxy/root/tool_runner.mako b/templates/webapps/galaxy/root/tool_runner.mako deleted file mode 100644 index c90a9bda53f..00000000000 --- a/templates/webapps/galaxy/root/tool_runner.mako +++ /dev/null @@ -1,47 +0,0 @@ - - -
-