Skip to content

Commit

Permalink
Restore render endpoint in visualizations controller
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Feb 2, 2024
1 parent e1b881e commit 6a944a2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/galaxy/webapps/galaxy/controllers/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,22 @@ def edit(self, trans, payload=None, **kwd):
return {"message": "Attributes of '%s' successfully saved." % v.title, "status": "success"}

# ------------------------- registry.
@web.expose
@web.require_login("use Galaxy visualizations", use_panels=True)
def render(self, trans, visualization_name, embedded=None, **kwargs):
"""
Render the appropriate visualization template, parsing the `kwargs`
into appropriate variables and resources (such as ORM models)
based on this visualizations `param` data in visualizations_conf.xml.
URL: /visualization/show/{visualization_name}
"""
plugin = self._get_plugin_from_registry(trans, visualization_name)
try:
return plugin.render(trans=trans, embedded=embedded, **kwargs)
except Exception as exception:
self._handle_plugin_error(trans, visualization_name, exception)

def _get_plugin_from_registry(self, trans, visualization_name):
"""
Get the named plugin from the registry.
Expand Down

0 comments on commit 6a944a2

Please sign in to comment.