mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-30 18:13:23 +08:00
bugfixes and small improvements
This commit is contained in:
@@ -9,21 +9,21 @@ $(document).ready(function() {
|
||||
// Add attribute 'tour_id' to the execution button
|
||||
$('#execute').attr('tour_id', 'execute');
|
||||
|
||||
var url = '/api/webhooks/tour_generator/get_data/' + JSON.stringify({
|
||||
'tool_id': this.toolId
|
||||
});
|
||||
|
||||
$.getJSON(url, function(obj) {
|
||||
$.getJSON('/api/webhooks/tour_generator/get_data/', {
|
||||
tool_id: this.toolId
|
||||
})
|
||||
.done(function(obj) {
|
||||
if (obj.success) {
|
||||
$('#history-refresh-button').click(); // Refresh history panel
|
||||
|
||||
// Create a tour only when the uploaded dataset is ready
|
||||
// Add a delay because of the history panel refreshing
|
||||
setTimeout(function() {
|
||||
var dataset = Galaxy.currHistoryPanel.collection.where({
|
||||
hid: obj.data.hid
|
||||
})[0];
|
||||
|
||||
if (dataset) {
|
||||
// Create a tour only when the uploaded dataset is ready
|
||||
dataset.on('change:state', function(model) {
|
||||
if (model.get('state') === 'ok') {
|
||||
me._main(obj.data);
|
||||
|
||||
@@ -56,15 +56,16 @@ class WebhooksController(BaseAPIController):
|
||||
]
|
||||
|
||||
@expose_api_anonymous_and_sessionless
|
||||
def get_data(self, trans, webhook_name, params, **kwd):
|
||||
# def get_data(self, trans, webhook_name, params, **kwd):
|
||||
def get_data(self, trans, webhook_name, **kwd):
|
||||
"""
|
||||
*GET /api/webhooks/{webhook_name}/get_data/{params}
|
||||
Returns the result of executing helper function
|
||||
"""
|
||||
params = {}
|
||||
|
||||
# If params is not None, convert it into a dictionary
|
||||
if params:
|
||||
params = json.loads(params)
|
||||
for key, value in kwd.items():
|
||||
params[key] = value
|
||||
|
||||
webhook = [
|
||||
webhook
|
||||
|
||||
@@ -598,13 +598,6 @@ def populate_api_routes( webapp, app ):
|
||||
'/api/webhooks/{webhook_name}/get_data',
|
||||
controller='webhooks',
|
||||
action='get_data',
|
||||
params=None,
|
||||
conditions=dict( method=[ "GET" ] ) )
|
||||
|
||||
webapp.mapper.connect( 'get_data',
|
||||
'/api/webhooks/{webhook_name}/get_data/{params}',
|
||||
controller='webhooks',
|
||||
action='get_data',
|
||||
conditions=dict( method=[ "GET" ] ) )
|
||||
|
||||
# =======================
|
||||
|
||||
Reference in New Issue
Block a user