Make InteractiveTools enable-able.

This commit is contained in:
Daniel Blankenberg
2019-08-20 14:57:45 -04:00
parent c3c4aefcbd
commit 4bda4c92bd
9 changed files with 37 additions and 5 deletions
+8 -5
View File
@@ -299,11 +299,6 @@ const Collection = Backbone.Collection.extend({
title: _l("Pages"),
url: "pages/list",
target: "__use_router__"
},
{
title: _l("Active InteractiveTools"),
url: "realtime_entry_points/list",
target: "__use_router__"
}
]
};
@@ -314,6 +309,14 @@ const Collection = Backbone.Collection.extend({
target: "__use_router__"
});
}
if (Galaxy.config.interactivetools_enable) {
userTab.menu[userTab.menu.length - 1].divider = true;
userTab.menu.push({
title: _l("Active InteractiveTools"),
url: "realtime_entry_points/list",
target: "__use_router__"
});
}
}
this.add(userTab);
return new $.Deferred().resolve().promise();
+1
View File
@@ -24,6 +24,7 @@ uwsgi:
galaxy:
interactivetools_enable: true
# outputs_to_working_directory will provide you with a better level of isolation. It is highly recommended to set
# this parameter with InteractiveTools.
outputs_to_working_directory: true
+10
View File
@@ -1236,6 +1236,16 @@
:Type: bool
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
``interactivetools_enable``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Description:
Set this to true to enable InteractiveTools.
:Default: ``false``
:Type: bool
~~~~~~~~~~~~~~~~~~~~~~~~~~
``visualizations_visible``
~~~~~~~~~~~~~~~~~~~~~~~~~~
+1
View File
@@ -737,6 +737,7 @@ class GalaxyAppConfiguration(BaseAppConfiguration):
self.dynamic_proxy_golang_api_key = kwargs.get("dynamic_proxy_golang_api_key", None)
self.realtime_prefix = kwargs.get("realtime_prefix", "realtime")
self.interactivetools_enable = string_as_bool(kwargs.get('interactivetools_enable', False))
# Default chunk size for chunkable datatypes -- 64k
self.display_chunk_size = int(kwargs.get('display_chunk_size', 65536))
@@ -423,6 +423,9 @@ galaxy:
# scenarios than the watchdog default.
#watch_tool_data_dir: 'false'
# Enable InteractiveTools by setting to true
#interactivetools_enable: false
# File containing old-style genome builds
#builds_file_path: tool-data/shared/ucsc/builds.txt
+1
View File
@@ -79,6 +79,7 @@ class ConfigSerializer(base.ModelSerializer):
'require_login' : _defaults_to(None),
'inactivity_box_content' : _defaults_to(None),
'visualizations_visible' : _defaults_to(True),
'interactivetools_enable' : _defaults_to(False),
'message_box_content' : _defaults_to(None),
'message_box_visible' : _defaults_to(False),
'message_box_class' : _defaults_to('info'),
+4
View File
@@ -2449,6 +2449,10 @@ class RealTimeTool(Tool):
tool_type = 'interactive'
produces_entry_points = True
def __init__(self, config_file, tool_source, app, **kwd):
assert app.config.interactivetools_enable, ValueError('Trying to load an InteractiveTool, but InteractiveTools are not enabled.')
super(RealTimeTool, self).__init__(config_file, tool_source, app, **kwd)
def __remove_realtime_by_job(self, job):
if job:
eps = job.realtimetool_entry_points
@@ -928,6 +928,13 @@ mapping:
Galaxy server, but contains a redirect to a third-party server, tricking a
Galaxy user to access said site.
interactivetools_enable:
type: bool
default: false
required: false
desc: |
Enable InteractiveTools.
visualizations_visible:
type: bool
default: true
@@ -63,6 +63,8 @@ class RealTime(BaseUIController):
@web.expose_api_anonymous
def list(self, trans, **kwargs):
"""List all available realtimetools"""
if not trans.app.config.interactivetools_enable:
raise web.httpexceptions.HTTPNotFound()
operation = kwargs.get('operation', None)
message = None
status = None