Skip to content

Commit

Permalink
Allow changing the script type, add root to visualization config
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Aug 3, 2024
1 parent 6991665 commit 326b9f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<%def name="get_body()">
## Collect incoming data
<% data_incoming = {
"root": h.url_for("/"),
"visualization_id": visualization_id,
"visualization_name": visualization_name,
"visualization_plugin": visualization_plugin,
Expand All @@ -24,6 +25,7 @@
<div id="${container}" data-incoming='${h.dumps(data_incoming)}'></div>
## Add script tag
<% src = script_attributes.get("src") %>
<script type="text/javascript" src=${src}></script>
<% script_src = script_attributes.get("src") %>
<% script_type = script_attributes.get("type") or "module" %>
<script type="${script_type}" src=${script_src}></script>
</%def>
2 changes: 1 addition & 1 deletion lib/galaxy/visualization/plugins/config_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def parse(self, xml_tree):
# when no tests are given, default to isinstance( object, model_class )
returned["tests"] = self.parse_tests(xml_tree.findall("test"))

# to_params (optional, 0 or more) - tells the registry to set certain params based on the model_clas, tests
# to_params (optional, 0 or more) - tells the registry to set certain params based on the model_class, tests
returned["to_params"] = {}
if to_params := self.parse_to_params(xml_tree.findall("to_param")):
returned["to_params"] = to_params
Expand Down

0 comments on commit 326b9f4

Please sign in to comment.