From 79da41de15dad5761da109183d46f7167f397611 Mon Sep 17 00:00:00 2001 From: Bjoern Gruening Date: Sat, 31 Aug 2019 13:34:07 +0200 Subject: [PATCH] RT to IT --- .../webapps/galaxy/api/tool_entry_points.py | 16 ++++++++-------- lib/galaxy/webapps/galaxy/buildapp.py | 2 +- .../{realtime.py => interactivetool.py} | 18 +++++++++--------- .../webapps/galaxy/controllers/tool_runner.py | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) rename lib/galaxy/webapps/galaxy/controllers/{realtime.py => interactivetool.py} (84%) diff --git a/lib/galaxy/webapps/galaxy/api/tool_entry_points.py b/lib/galaxy/webapps/galaxy/api/tool_entry_points.py index fc0cf9b8db5..917ec03d519 100644 --- a/lib/galaxy/webapps/galaxy/api/tool_entry_points.py +++ b/lib/galaxy/webapps/galaxy/api/tool_entry_points.py @@ -4,7 +4,7 @@ related to running and queued jobs. import logging from galaxy import exceptions, util -from galaxy.managers.realtime import RealTimeManager +from galaxy.managers.interactivetool import InteractiveToolManager from galaxy.web import expose_api_anonymous_and_sessionless from galaxy.webapps.base.controller import BaseAPIController @@ -15,7 +15,7 @@ class ToolEntryPointsAPIController(BaseAPIController): def __init__(self, app): self.app = app - self.realtime_manager = RealTimeManager(app) + self.interactivetool_manager = InteractiveToolManager(app) @expose_api_anonymous_and_sessionless def index(self, trans, running=False, job_id=None, **kwd): @@ -43,16 +43,16 @@ class ToolEntryPointsAPIController(BaseAPIController): if job_id is not None: job = trans.sa_session.query(trans.app.model.Job).get(self.decode_id(job_id)) - if not self.realtime_manager.can_access_job(trans, job): + if not self.interactivetool_manager.can_access_job(trans, job): raise exceptions.ItemAccessibilityException() - entry_points = job.realtimetool_entry_points + entry_points = job.interactivetool_entry_points if running: - entry_points = self.realtime_manager.get_nonterminal_for_user_by_trans(trans) + entry_points = self.interactivetool_manager.get_nonterminal_for_user_by_trans(trans) rval = [] for entry_point in entry_points: as_dict = self.encode_all_ids(trans, entry_point.to_dict(), True) - target = self.realtime_manager.target_if_active(trans, entry_point) + target = self.interactivetool_manager.target_if_active(trans, entry_point) if target: as_dict["target"] = target rval.append(as_dict) @@ -68,10 +68,10 @@ class ToolEntryPointsAPIController(BaseAPIController): :param id: Encoded entry point id :rtype: dictionary - :returns: dictionary containing target for realtime entry point + :returns: dictionary containing target for interactivetool entry point """ # Because of auto id encoding needed for link from grid, the item.id keyword must be 'id' if not id: raise exceptions.RequestParameterMissingException("Must supply entry point ID.") entry_point_id = self.decode_id(id) - return {"target": self.realtime_manager.access_entry_point_target(trans, entry_point_id)} + return {"target": self.interactivetool_manager.access_entry_point_target(trans, entry_point_id)} diff --git a/lib/galaxy/webapps/galaxy/buildapp.py b/lib/galaxy/webapps/galaxy/buildapp.py index 348cd126976..7f2e24cbdb8 100644 --- a/lib/galaxy/webapps/galaxy/buildapp.py +++ b/lib/galaxy/webapps/galaxy/buildapp.py @@ -152,7 +152,7 @@ def app_factory(global_conf, load_app_kwds={}, **kwargs): webapp.add_client_route('/workflows/import') webapp.add_client_route('/workflows/invocations/report') webapp.add_client_route('/custom_builds') - webapp.add_client_route('/realtime_entry_points/list') + webapp.add_client_route('/interactivetool_entry_points/list') # ==== Done # Indicate that all configuration settings have been provided diff --git a/lib/galaxy/webapps/galaxy/controllers/realtime.py b/lib/galaxy/webapps/galaxy/controllers/interactivetool.py similarity index 84% rename from lib/galaxy/webapps/galaxy/controllers/realtime.py rename to lib/galaxy/webapps/galaxy/controllers/interactivetool.py index bc76340733b..d71962cfe10 100644 --- a/lib/galaxy/webapps/galaxy/controllers/realtime.py +++ b/lib/galaxy/webapps/galaxy/controllers/interactivetool.py @@ -1,5 +1,5 @@ """ -Provides web interaction with RealTimeTools +Provides web interaction with InteractiveTools """ import logging @@ -28,7 +28,7 @@ class EntryPointLinkColumn(grids.GridColumn): return '%s' % (trans.security.encode_id(item.id), item.name) -class RealTimeToolEntryPointListGrid(grids.Grid): +class InteractiveToolEntryPointListGrid(grids.Grid): use_panels = True title = "Available InteractiveTools" @@ -53,16 +53,16 @@ class RealTimeToolEntryPointListGrid(grids.Grid): ] def build_initial_query(self, trans, **kwargs): - # Get list of user's active RealTimeTools - return trans.app.realtime_manager.get_nonterminal_for_user_by_trans(trans) + # Get list of user's active InteractiveTools + return trans.app.interactivetool_manager.get_nonterminal_for_user_by_trans(trans) -class RealTime(BaseUIController): - entry_point_grid = RealTimeToolEntryPointListGrid() +class InteractiveTool(BaseUIController): + entry_point_grid = InteractiveToolEntryPointListGrid() @web.expose_api_anonymous def list(self, trans, **kwargs): - """List all available realtimetools""" + """List all available interactivetools""" if not trans.app.config.interactivetools_enable: raise web.httpexceptions.HTTPNotFound() operation = kwargs.get('operation', None) @@ -77,7 +77,7 @@ class RealTime(BaseUIController): for entry_point_id in ids: entry_point_id = self.decode_id(entry_point_id) entry_point = trans.sa_session.query(trans.app.model.InteractiveToolEntryPoint).get(entry_point_id) - if trans.app.realtime_manager.can_access_entry_point(trans, entry_point): + if trans.app.interactivetool_manager.can_access_entry_point(trans, entry_point): eps.append(entry_point) if eps: failed = [] @@ -86,7 +86,7 @@ class RealTime(BaseUIController): if operation == 'stop': for ep in eps: if ep.job not in jobs: - stopped = trans.app.realtime_manager.stop(trans, ep) + stopped = trans.app.interactivetool_manager.stop(trans, ep) if stopped: succeeded.append(ep) jobs.append(ep.job) diff --git a/lib/galaxy/webapps/galaxy/controllers/tool_runner.py b/lib/galaxy/webapps/galaxy/controllers/tool_runner.py index 719a6e3a561..d7df059f86e 100644 --- a/lib/galaxy/webapps/galaxy/controllers/tool_runner.py +++ b/lib/galaxy/webapps/galaxy/controllers/tool_runner.py @@ -62,7 +62,7 @@ class ToolRunner(BaseUIController): if not tool.allow_user_access(trans.user): return __tool_404__() # FIXME: Tool class should define behavior - if tool.tool_type in ['default', 'realtime']: + if tool.tool_type in ['default', 'interactivetool']: return trans.response.send_redirect(url_for(controller='root', tool_id=tool_id)) # execute tool without displaying form (used for datasource tools)