mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Make InteractiveTools enable-able.
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1236,6 +1236,16 @@
|
||||
:Type: bool
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
``interactivetools_enable``
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
:Description:
|
||||
Set this to true to enable InteractiveTools.
|
||||
:Default: ``false``
|
||||
:Type: bool
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
``visualizations_visible``
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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'),
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user