Created
February 3, 2015 16:05
-
-
Save bgruening/d02650bd3153cdb6f474 to your computer and use it in GitHub Desktop.
Galaxy API addition to relead a tool_data table.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r eb26a9648323 lib/galaxy/webapps/galaxy/api/tool_data.py | |
--- a/lib/galaxy/webapps/galaxy/api/tool_data.py Tue Feb 03 09:00:51 2015 -0500 | |
+++ b/lib/galaxy/webapps/galaxy/api/tool_data.py Tue Feb 03 16:52:38 2015 +0100 | |
@@ -28,6 +28,19 @@ | |
@web.require_admin | |
@expose_api | |
+ def reload( self, trans, id, **kwd ): | |
+ """ | |
+ GET /api/tool_data/{id}/reload | |
+ | |
+ Reloads a tool_data table. | |
+ """ | |
+ decoded_tool_data_id = id | |
+ data_table = trans.app.tool_data_tables.data_tables.get(decoded_tool_data_id) | |
+ return data_table.reload_from_files() | |
+ | |
+ | |
+ @web.require_admin | |
+ @expose_api | |
def delete( self, trans, id, **kwd ): | |
""" | |
DELETE /api/tool_data/{id} | |
diff -r eb26a9648323 lib/galaxy/webapps/galaxy/buildapp.py | |
--- a/lib/galaxy/webapps/galaxy/buildapp.py Tue Feb 03 09:00:51 2015 -0500 | |
+++ b/lib/galaxy/webapps/galaxy/buildapp.py Tue Feb 03 16:52:38 2015 +0100 | |
@@ -174,6 +174,7 @@ | |
webapp.mapper.resource( 'tool_data', 'tool_data', path_prefix='/api' ) | |
webapp.mapper.connect( '/api/tool_data/{id:.+?}/fields/{value:.+?}/files/{path:.+?}', action='download_field_file', controller="tool_data" ) | |
webapp.mapper.connect( '/api/tool_data/{id:.+?}/fields/{value:.+?}', action='show_field', controller="tool_data" ) | |
+ webapp.mapper.connect( '/api/tool_data/{id:.+?}/reload', action='reload', controller="tool_data" ) | |
webapp.mapper.resource( 'dataset_collection', 'dataset_collections', path_prefix='/api/') | |
webapp.mapper.resource( 'sample', 'samples', path_prefix='/api' ) | |
webapp.mapper.resource( 'request', 'requests', path_prefix='/api' ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment