commit/galaxy-central: 2 new changesets
2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/c5ba3065b82e/ changeset: c5ba3065b82e user: jgoecks date: 2012-05-27 21:54:32 summary: Support for saving and validating different visualization types. affected #: 3 files diff -r fdc3f20a46d3af6ac89bd02baef3db09eed3f235 -r c5ba3065b82ee8a9d165c164f1f864526baf18e4 lib/galaxy/web/base/controller.py --- a/lib/galaxy/web/base/controller.py +++ b/lib/galaxy/web/base/controller.py @@ -305,60 +305,64 @@ decoded_id = trans.security.decode_id( id ) vis = session.query( trans.model.Visualization ).get( decoded_id ) - # Decode the payload - decoded_payload = config # Create new VisualizationRevision that will be attached to the viz vis_rev = trans.model.VisualizationRevision() vis_rev.visualization = vis vis_rev.title = vis.title vis_rev.dbkey = dbkey + + # -- Validate config. -- + + if vis.type == 'trackster': + def unpack_track( track_json ): + """ Unpack a track from its json. """ + return { + "dataset_id": trans.security.decode_id( track_json['dataset_id'] ), + "hda_ldda": track_json.get('hda_ldda', 'hda'), + "name": track_json['name'], + "track_type": track_json['track_type'], + "prefs": track_json['prefs'], + "mode": track_json['mode'], + "filters": track_json['filters'], + "tool_state": track_json['tool_state'] + } - def unpack_track( track_json ): - """ Unpack a track from its json. """ - return { - "dataset_id": trans.security.decode_id( track_json['dataset_id'] ), - "hda_ldda": track_json.get('hda_ldda', 'hda'), - "name": track_json['name'], - "track_type": track_json['track_type'], - "prefs": track_json['prefs'], - "mode": track_json['mode'], - "filters": track_json['filters'], - "tool_state": track_json['tool_state'] - } + def unpack_collection( collection_json ): + """ Unpack a collection from its json. """ + unpacked_drawables = [] + drawables = collection_json[ 'drawables' ] + for drawable_json in drawables: + if 'track_type' in drawable_json: + drawable = unpack_track( drawable_json ) + else: + drawable = unpack_collection( drawable_json ) + unpacked_drawables.append( drawable ) + return { + "name": collection_json.get( 'name', '' ), + "obj_type": collection_json[ 'obj_type' ], + "drawables": unpacked_drawables, + "prefs": collection_json.get( 'prefs' , [] ), + "filters": collection_json.get( 'filters', None ) + } - def unpack_collection( collection_json ): - """ Unpack a collection from its json. """ - unpacked_drawables = [] - drawables = collection_json[ 'drawables' ] - for drawable_json in drawables: - if 'track_type' in drawable_json: - drawable = unpack_track( drawable_json ) - else: - drawable = unpack_collection( drawable_json ) - unpacked_drawables.append( drawable ) - return { - "name": collection_json.get( 'name', '' ), - "obj_type": collection_json[ 'obj_type' ], - "drawables": unpacked_drawables, - "prefs": collection_json.get( 'prefs' , [] ), - "filters": collection_json.get( 'filters', None ) - } + # TODO: unpack and validate bookmarks: + def unpack_bookmarks( bookmarks_json ): + return bookmarks_json - # TODO: unpack and validate bookmarks: - def unpack_bookmarks( bookmarks_json ): - return bookmarks_json - - # Unpack and validate view content. - view_content = unpack_collection( decoded_payload[ 'view' ] ) - bookmarks = unpack_bookmarks( decoded_payload[ 'bookmarks' ] ) - vis_rev.config = { "view": view_content, "bookmarks": bookmarks } - # Viewport from payload - if 'viewport' in decoded_payload: - chrom = decoded_payload['viewport']['chrom'] - start = decoded_payload['viewport']['start'] - end = decoded_payload['viewport']['end'] - overview = decoded_payload['viewport']['overview'] - vis_rev.config[ "viewport" ] = { 'chrom': chrom, 'start': start, 'end': end, 'overview': overview } + # Unpack and validate view content. + view_content = unpack_collection( config[ 'view' ] ) + bookmarks = unpack_bookmarks( config[ 'bookmarks' ] ) + vis_rev.config = { "view": view_content, "bookmarks": bookmarks } + # Viewport from payload + if 'viewport' in config: + chrom = config['viewport']['chrom'] + start = config['viewport']['start'] + end = config['viewport']['end'] + overview = config['viewport']['overview'] + vis_rev.config[ "viewport" ] = { 'chrom': chrom, 'start': start, 'end': end, 'overview': overview } + elif type == 'circos': + # TODO. + pass vis.latest_revision = vis_rev session.add( vis_rev ) diff -r fdc3f20a46d3af6ac89bd02baef3db09eed3f235 -r c5ba3065b82ee8a9d165c164f1f864526baf18e4 lib/galaxy/web/controllers/tracks.py --- a/lib/galaxy/web/controllers/tracks.py +++ b/lib/galaxy/web/controllers/tracks.py @@ -234,6 +234,15 @@ rows.append( [location, name] ) return { 'data': rows } + # TODO: this is duplicated from visualization controller; remove it once + # routing incompatibilities have been resolved. + @web.json + def save( self, trans, config, type, id=None, title=None, dbkey=None, annotation=None ): + """ + Save a visualization; if visualization does not have an ID, a new + visualization is created. Returns JSON of visualization. + """ + return self.save_visualization( trans, from_json_string( config ), type, id, title, dbkey, annotation ) @web.expose @web.require_login() @@ -409,11 +418,7 @@ result = data_provider.get_data( chrom, low, high, int( start_val ), int( max_vals ), **kwargs ) result.update( { 'dataset_type': tracks_dataset_type, 'extra_info': extra_info } ) return result - - @web.json - def save( self, trans, config, type, id=None, title=None, dbkey=None, annotation=None ): - return self.save_visualization( trans, from_json_string( config ), type, id, title, dbkey, annotation ) - + @web.expose @web.require_login( "see all available libraries" ) def list_libraries( self, trans, **kwargs ): diff -r fdc3f20a46d3af6ac89bd02baef3db09eed3f235 -r c5ba3065b82ee8a9d165c164f1f864526baf18e4 lib/galaxy/web/controllers/visualization.py --- a/lib/galaxy/web/controllers/visualization.py +++ b/lib/galaxy/web/controllers/visualization.py @@ -349,7 +349,7 @@ def create( self, trans, visualization_title="", visualization_slug="", visualization_annotation="", visualization_dbkey="", visualization_type="" ): """ - Create a new visualization + Creates a new visualization or returns a form for creating visualization. """ visualization_title_err = visualization_slug_err = visualization_annotation_err = "" if trans.request.method == "POST": @@ -381,6 +381,14 @@ .add_text( "visualization_annotation", "Visualization annotation", value=visualization_annotation, error=visualization_annotation_err, help="A description of the visualization; annotation is shown alongside published visualizations."), template="visualization/create.mako" ) + + @web.json + def save( self, trans, config, type, id=None, title=None, dbkey=None, annotation=None ): + """ + Save a visualization; if visualization does not have an ID, a new + visualization is created. Returns JSON of visualization. + """ + return self.save_visualization( trans, from_json_string( config ), type, id, title, dbkey, annotation ) @web.expose @web.require_login( "edit visualizations" ) https://bitbucket.org/galaxy/galaxy-central/changeset/03cb8ee86726/ changeset: 03cb8ee86726 user: jgoecks date: 2012-05-27 22:09:16 summary: Include 'mixin' in names of many common controller mixins. affected #: 22 files diff -r c5ba3065b82ee8a9d165c164f1f864526baf18e4 -r 03cb8ee86726813073913be149516ab10e601e55 lib/galaxy/tools/genome_index/__init__.py --- a/lib/galaxy/tools/genome_index/__init__.py +++ b/lib/galaxy/tools/genome_index/__init__.py @@ -3,7 +3,7 @@ from galaxy.web.framework.helpers import to_unicode from galaxy.model.item_attrs import UsesAnnotations from galaxy.util.json import * -from galaxy.web.base.controller import UsesHistory +from galaxy.web.base.controller import UsesHistoryMixin from galaxy.tools.data import ToolDataTableManager log = logging.getLogger(__name__) @@ -63,8 +63,6 @@ if gitd: destination = None - alldone = True - indexjobs = gitd.deferred.params[ 'indexjobs' ] tdtman = ToolDataTableManager() xmltree = tdtman.load_from_config_file(app.config.tool_data_table_config_path) for node in xmltree: @@ -165,14 +163,6 @@ self._check_link( fasta, target ) for line in location: self._add_line( line[ 'file' ], line[ 'line' ] ) - for indexjob in indexjobs: - js = sa_session.query( model.Job ).filter_by( id=indexjob ).first() - if js.state not in [ 'ok', 'done', 'error' ]: - alldone = False - if alldone: - gitd.deferred.state = 'ok' - sa_session.add( gitd.deferred ) - sa_session.flush() def _check_link( self, targetfile, symlink ): target = os.path.relpath( targetfile, os.path.dirname( symlink ) ) diff -r c5ba3065b82ee8a9d165c164f1f864526baf18e4 -r 03cb8ee86726813073913be149516ab10e601e55 lib/galaxy/tools/imp_exp/__init__.py --- a/lib/galaxy/tools/imp_exp/__init__.py +++ b/lib/galaxy/tools/imp_exp/__init__.py @@ -4,7 +4,7 @@ from galaxy.web.framework.helpers import to_unicode from galaxy.model.item_attrs import UsesAnnotations from galaxy.util.json import * -from galaxy.web.base.controller import UsesHistory +from galaxy.web.base.controller import UsesHistoryMixin log = logging.getLogger(__name__) @@ -42,7 +42,7 @@ toolbox.tools_by_id[ history_imp_tool.id ] = history_imp_tool log.debug( "Loaded history import tool: %s", history_imp_tool.id ) -class JobImportHistoryArchiveWrapper( object, UsesHistory, UsesAnnotations ): +class JobImportHistoryArchiveWrapper( object, UsesHistoryMixin, UsesAnnotations ): """ Class provides support for performing jobs that import a history from an archive. @@ -263,7 +263,7 @@ jiha.job.stderr += "Error cleaning up history import job: %s" % e db_session.flush() -class JobExportHistoryArchiveWrapper( object, UsesHistory, UsesAnnotations ): +class JobExportHistoryArchiveWrapper( object, UsesHistoryMixin, UsesAnnotations ): """ Class provides support for performing jobs that export a history to an archive. diff -r c5ba3065b82ee8a9d165c164f1f864526baf18e4 -r 03cb8ee86726813073913be149516ab10e601e55 lib/galaxy/web/api/datasets.py --- a/lib/galaxy/web/api/datasets.py +++ b/lib/galaxy/web/api/datasets.py @@ -10,7 +10,7 @@ log = logging.getLogger( __name__ ) -class DatasetsController( BaseAPIController, UsesHistoryDatasetAssociation ): +class DatasetsController( BaseAPIController, UsesHistoryMixinDatasetAssociationMixin ): @web.expose_api def index( self, trans, hda_id, **kwd ): diff -r c5ba3065b82ee8a9d165c164f1f864526baf18e4 -r 03cb8ee86726813073913be149516ab10e601e55 lib/galaxy/web/api/histories.py --- a/lib/galaxy/web/api/histories.py +++ b/lib/galaxy/web/api/histories.py @@ -12,7 +12,7 @@ log = logging.getLogger( __name__ ) -class HistoriesController( BaseAPIController, UsesHistory ): +class HistoriesController( BaseAPIController, UsesHistoryMixin ): @web.expose_api def index( self, trans, deleted='False', **kwd ): @@ -153,7 +153,7 @@ POST /api/histories/deleted/{encoded_quota_id}/undelete Undeletes a quota """ - history = self.get_history( trans, id, check_ownership=True, check_accessible=False, deleted=True ) + history = self.get_history( trans, history_id, check_ownership=True, check_accessible=False, deleted=True ) history.deleted = False trans.sa_session.add( history ) trans.sa_session.flush() diff -r c5ba3065b82ee8a9d165c164f1f864526baf18e4 -r 03cb8ee86726813073913be149516ab10e601e55 lib/galaxy/web/api/history_contents.py --- a/lib/galaxy/web/api/history_contents.py +++ b/lib/galaxy/web/api/history_contents.py @@ -12,7 +12,7 @@ log = logging.getLogger( __name__ ) -class HistoryContentsController( BaseAPIController, UsesHistoryDatasetAssociation, UsesHistory, UsesLibrary, UsesLibraryItems ): +class HistoryContentsController( BaseAPIController, UsesHistoryMixinDatasetAssociationMixin, UsesHistoryMixin, UsesLibraryMixin, UsesLibraryMixinItems ): @web.expose_api def index( self, trans, history_id, **kwd ): diff -r c5ba3065b82ee8a9d165c164f1f864526baf18e4 -r 03cb8ee86726813073913be149516ab10e601e55 lib/galaxy/web/api/library_contents.py --- a/lib/galaxy/web/api/library_contents.py +++ b/lib/galaxy/web/api/library_contents.py @@ -10,7 +10,7 @@ log = logging.getLogger( __name__ ) -class LibraryContentsController( BaseAPIController, UsesLibrary, UsesLibraryItems ): +class LibraryContentsController( BaseAPIController, UsesLibraryMixin, UsesLibraryMixinItems ): @web.expose_api def index( self, trans, library_id, **kwd ): diff -r c5ba3065b82ee8a9d165c164f1f864526baf18e4 -r 03cb8ee86726813073913be149516ab10e601e55 lib/galaxy/web/api/quotas.py --- a/lib/galaxy/web/api/quotas.py +++ b/lib/galaxy/web/api/quotas.py @@ -2,7 +2,7 @@ API operations on Quota objects. """ import logging -from galaxy.web.base.controller import BaseAPIController, Admin, UsesQuota, url_for +from galaxy.web.base.controller import BaseAPIController, Admin, UsesQuotaMixin, url_for from galaxy import web, util from elementtree.ElementTree import XML @@ -14,7 +14,7 @@ log = logging.getLogger( __name__ ) -class QuotaAPIController( BaseAPIController, Admin, AdminActions, UsesQuota, QuotaParamParser ): +class QuotaAPIController( BaseAPIController, Admin, AdminActions, UsesQuotaMixin, QuotaParamParser ): @web.expose_api @web.require_admin def index( self, trans, deleted='False', **kwd ): diff -r c5ba3065b82ee8a9d165c164f1f864526baf18e4 -r 03cb8ee86726813073913be149516ab10e601e55 lib/galaxy/web/base/controller.py --- a/lib/galaxy/web/base/controller.py +++ b/lib/galaxy/web/base/controller.py @@ -177,7 +177,11 @@ def not_implemented( self, trans, **kwd ): raise HTTPNotImplemented() -class SharableItemSecurity: +# +# -- Mixins for working with Galaxy objects. -- +# + +class SharableItemSecurityMixin: """ Mixin for handling security for sharable items. """ def security_check( self, trans, item, check_ownership=False, check_accessible=False ): """ Security checks for an item: checks if (a) user owns item or (b) item is accessible to user. """ @@ -197,11 +201,7 @@ raise ItemAccessibilityException( "%s is not accessible to the current user" % item.__class__.__name__, type='error' ) return item -# -# TODO: need to move UsesHistory, etc. mixins to better location - perhaps lib/galaxy/model/XXX ? -# - -class UsesHistoryDatasetAssociation: +class UsesHistoryMixinDatasetAssociationMixin: """ Mixin for controllers that use HistoryDatasetAssociation objects. """ def get_dataset( self, trans, dataset_id, check_ownership=True, check_accessible=False ): """ Get an HDA object by id. """ @@ -259,14 +259,14 @@ truncated = False return truncated, dataset_data -class UsesLibrary: +class UsesLibraryMixin: def get_library( self, trans, id, check_ownership=False, check_accessible=True ): l = self.get_object( trans, id, 'Library' ) if check_accessible and not ( trans.user_is_admin() or trans.app.security_agent.can_access_library( trans.get_current_user_roles(), l ) ): error( "LibraryFolder is not accessible to the current user" ) return l -class UsesLibraryItems( SharableItemSecurity ): +class UsesLibraryMixinItems( SharableItemSecurityMixin ): def get_library_folder( self, trans, id, check_ownership=False, check_accessible=True ): return self.get_object( trans, id, 'LibraryFolder', check_ownership=False, check_accessible=check_accessible ) def get_library_dataset_dataset_association( self, trans, id, check_ownership=False, check_accessible=True ): @@ -274,7 +274,7 @@ def get_library_dataset( self, trans, id, check_ownership=False, check_accessible=True ): return self.get_object( trans, id, 'LibraryDataset', check_ownership=False, check_accessible=check_accessible ) -class UsesVisualization( SharableItemSecurity ): +class UsesVisualizationMixin( SharableItemSecurityMixin ): """ Mixin for controllers that use Visualization objects. """ viz_types = [ "trackster", "circos" ] @@ -522,7 +522,7 @@ return visualization -class UsesStoredWorkflow( SharableItemSecurity ): +class UsesStoredWorkflowMixin( SharableItemSecurityMixin ): """ Mixin for controllers that use StoredWorkflow objects. """ def get_stored_workflow( self, trans, id, check_ownership=True, check_accessible=False ): """ Get a StoredWorkflow from the database by id, verifying ownership. """ @@ -560,7 +560,7 @@ # Connections by input name step.input_connections_by_name = dict( ( conn.input_name, conn ) for conn in step.input_connections ) -class UsesHistory( SharableItemSecurity ): +class UsesHistoryMixin( SharableItemSecurityMixin ): """ Mixin for controllers that use History objects. """ def get_history( self, trans, id, check_ownership=True, check_accessible=False, deleted=None ): """Get a History from the database by id, verifying ownership.""" @@ -580,7 +580,7 @@ query = query.filter( trans.model.Dataset.purged == False ) return query.all() -class UsesFormDefinitions: +class UsesFormDefinitionsMixin: """Mixin for controllers that use Galaxy form objects.""" def get_all_forms( self, trans, all_versions=False, filter=None, form_type='All' ): """ @@ -1342,7 +1342,7 @@ selected_value=selected_value, refresh_on_change=True ) -class Sharable: +class SharableMixin: """ Mixin for a controller that manages an item that can be shared. """ # -- Implemented methods. -- @@ -1433,7 +1433,7 @@ """ Return item based on id. """ raise "Unimplemented Method" -class UsesQuota( object ): +class UsesQuotaMixin( object ): def get_quota( self, trans, id, check_ownership=False, check_accessible=False, deleted=None ): return self.get_object( trans, id, 'Quota', check_ownership=False, check_accessible=False, deleted=deleted ) diff -r c5ba3065b82ee8a9d165c164f1f864526baf18e4 -r 03cb8ee86726813073913be149516ab10e601e55 lib/galaxy/web/controllers/admin.py --- a/lib/galaxy/web/controllers/admin.py +++ b/lib/galaxy/web/controllers/admin.py @@ -428,7 +428,7 @@ def build_initial_query( self, trans, **kwd ): return trans.sa_session.query( self.model_class ) -class AdminGalaxy( BaseUIController, Admin, AdminActions, UsesQuota, QuotaParamParser ): +class AdminGalaxy( BaseUIController, Admin, AdminActions, UsesQuotaMixin, QuotaParamParser ): user_list_grid = UserListGrid() role_list_grid = RoleListGrid() diff -r c5ba3065b82ee8a9d165c164f1f864526baf18e4 -r 03cb8ee86726813073913be149516ab10e601e55 lib/galaxy/web/controllers/dataset.py --- a/lib/galaxy/web/controllers/dataset.py +++ b/lib/galaxy/web/controllers/dataset.py @@ -150,7 +150,7 @@ .filter( model.History.deleted==False ) \ .filter( self.model_class.visible==True ) -class DatasetInterface( BaseUIController, UsesAnnotations, UsesHistory, UsesHistoryDatasetAssociation, UsesItemRatings ): +class DatasetInterface( BaseUIController, UsesAnnotations, UsesHistoryMixin, UsesHistoryMixinDatasetAssociationMixin, UsesItemRatings ): stored_list_grid = HistoryDatasetAssociationListGrid() diff -r c5ba3065b82ee8a9d165c164f1f864526baf18e4 -r 03cb8ee86726813073913be149516ab10e601e55 lib/galaxy/web/controllers/external_service.py --- a/lib/galaxy/web/controllers/external_service.py +++ b/lib/galaxy/web/controllers/external_service.py @@ -63,7 +63,7 @@ grids.GridAction( "Create new external service", dict( controller='external_service', action='create_external_service' ) ) ] -class ExternalService( BaseUIController, UsesFormDefinitions ): +class ExternalService( BaseUIController, UsesFormDefinitionsMixin ): external_service_grid = ExternalServiceGrid() @web.expose diff -r c5ba3065b82ee8a9d165c164f1f864526baf18e4 -r 03cb8ee86726813073913be149516ab10e601e55 lib/galaxy/web/controllers/history.py --- a/lib/galaxy/web/controllers/history.py +++ b/lib/galaxy/web/controllers/history.py @@ -190,7 +190,7 @@ # A public history is published, has a slug, and is not deleted. return query.filter( self.model_class.published == True ).filter( self.model_class.slug != None ).filter( self.model_class.deleted == False ) -class HistoryController( BaseUIController, Sharable, UsesAnnotations, UsesItemRatings, UsesHistory ): +class HistoryController( BaseUIController, SharableMixin, UsesAnnotations, UsesItemRatings, UsesHistoryMixin ): @web.expose def index( self, trans ): return "" diff -r c5ba3065b82ee8a9d165c164f1f864526baf18e4 -r 03cb8ee86726813073913be149516ab10e601e55 lib/galaxy/web/controllers/library_common.py --- a/lib/galaxy/web/controllers/library_common.py +++ b/lib/galaxy/web/controllers/library_common.py @@ -68,7 +68,7 @@ pass os.rmdir( tmpd ) -class LibraryCommon( BaseUIController, UsesFormDefinitions ): +class LibraryCommon( BaseUIController, UsesFormDefinitionsMixin ): @web.json def library_item_updates( self, trans, ids=None, states=None ): # Avoid caching diff -r c5ba3065b82ee8a9d165c164f1f864526baf18e4 -r 03cb8ee86726813073913be149516ab10e601e55 lib/galaxy/web/controllers/page.py --- a/lib/galaxy/web/controllers/page.py +++ b/lib/galaxy/web/controllers/page.py @@ -272,8 +272,8 @@ # Default behavior: _BaseHTMLProcessor.unknown_endtag( self, tag ) -class PageController( BaseUIController, Sharable, UsesAnnotations, UsesHistory, - UsesStoredWorkflow, UsesHistoryDatasetAssociation, UsesVisualization, UsesItemRatings ): +class PageController( BaseUIController, SharableMixin, UsesAnnotations, UsesHistoryMixin, + UsesStoredWorkflowMixin, UsesHistoryMixinDatasetAssociationMixin, UsesVisualizationMixin, UsesItemRatings ): _page_list = PageListGrid() _all_published_list = PageAllPublishedGrid() diff -r c5ba3065b82ee8a9d165c164f1f864526baf18e4 -r 03cb8ee86726813073913be149516ab10e601e55 lib/galaxy/web/controllers/request_type.py --- a/lib/galaxy/web/controllers/request_type.py +++ b/lib/galaxy/web/controllers/request_type.py @@ -72,7 +72,7 @@ grids.GridAction( "Create new request type", dict( controller='request_type', action='create_request_type' ) ) ] -class RequestType( BaseUIController, UsesFormDefinitions ): +class RequestType( BaseUIController, UsesFormDefinitionsMixin ): request_type_grid = RequestTypeGrid() @web.expose diff -r c5ba3065b82ee8a9d165c164f1f864526baf18e4 -r 03cb8ee86726813073913be149516ab10e601e55 lib/galaxy/web/controllers/requests_admin.py --- a/lib/galaxy/web/controllers/requests_admin.py +++ b/lib/galaxy/web/controllers/requests_admin.py @@ -94,7 +94,7 @@ return query return query.filter_by( sample_id=trans.security.decode_id( sample_id ) ) -class RequestsAdmin( BaseUIController, UsesFormDefinitions ): +class RequestsAdmin( BaseUIController, UsesFormDefinitionsMixin ): request_grid = AdminRequestsGrid() datatx_grid = DataTransferGrid() diff -r c5ba3065b82ee8a9d165c164f1f864526baf18e4 -r 03cb8ee86726813073913be149516ab10e601e55 lib/galaxy/web/controllers/requests_common.py --- a/lib/galaxy/web/controllers/requests_common.py +++ b/lib/galaxy/web/controllers/requests_common.py @@ -93,7 +93,7 @@ confirm="Samples cannot be added to this request after it is submitted. Click OK to submit." ) ] -class RequestsCommon( BaseUIController, UsesFormDefinitions ): +class RequestsCommon( BaseUIController, UsesFormDefinitionsMixin ): @web.json def sample_state_updates( self, trans, ids=None, states=None ): # Avoid caching diff -r c5ba3065b82ee8a9d165c164f1f864526baf18e4 -r 03cb8ee86726813073913be149516ab10e601e55 lib/galaxy/web/controllers/root.py --- a/lib/galaxy/web/controllers/root.py +++ b/lib/galaxy/web/controllers/root.py @@ -11,7 +11,7 @@ log = logging.getLogger( __name__ ) -class RootController( BaseUIController, UsesHistory, UsesAnnotations ): +class RootController( BaseUIController, UsesHistoryMixin, UsesAnnotations ): @web.expose def default(self, trans, target1=None, target2=None, **kwd): diff -r c5ba3065b82ee8a9d165c164f1f864526baf18e4 -r 03cb8ee86726813073913be149516ab10e601e55 lib/galaxy/web/controllers/tracks.py --- a/lib/galaxy/web/controllers/tracks.py +++ b/lib/galaxy/web/controllers/tracks.py @@ -163,7 +163,7 @@ def apply_query_filter( self, trans, query, **kwargs ): return query.filter( self.model_class.user_id == trans.user.id ) -class TracksController( BaseUIController, UsesVisualization, UsesHistoryDatasetAssociation, Sharable ): +class TracksController( BaseUIController, UsesVisualizationMixin, UsesHistoryMixinDatasetAssociationMixin, SharableMixin ): """ Controller for track browser interface. Handles building a new browser from datasets in the current history, and display of the resulting browser. diff -r c5ba3065b82ee8a9d165c164f1f864526baf18e4 -r 03cb8ee86726813073913be149516ab10e601e55 lib/galaxy/web/controllers/user.py --- a/lib/galaxy/web/controllers/user.py +++ b/lib/galaxy/web/controllers/user.py @@ -38,7 +38,7 @@ def build_initial_query( self, trans, **kwd ): return trans.sa_session.query( self.model_class ).filter( self.model_class.user_id == trans.user.id ) -class User( BaseUIController, UsesFormDefinitions ): +class User( BaseUIController, UsesFormDefinitionsMixin ): user_openid_grid = UserOpenIDGrid() installed_len_files = None diff -r c5ba3065b82ee8a9d165c164f1f864526baf18e4 -r 03cb8ee86726813073913be149516ab10e601e55 lib/galaxy/web/controllers/visualization.py --- a/lib/galaxy/web/controllers/visualization.py +++ b/lib/galaxy/web/controllers/visualization.py @@ -68,8 +68,8 @@ return query.filter( self.model_class.deleted==False ).filter( self.model_class.published==True ) -class VisualizationController( BaseUIController, Sharable, UsesAnnotations, - UsesHistoryDatasetAssociation, UsesVisualization, +class VisualizationController( BaseUIController, SharableMixin, UsesAnnotations, + UsesHistoryMixinDatasetAssociationMixin, UsesVisualizationMixin, UsesItemRatings ): _user_list_grid = VisualizationListGrid() _published_list_grid = VisualizationAllPublishedGrid() diff -r c5ba3065b82ee8a9d165c164f1f864526baf18e4 -r 03cb8ee86726813073913be149516ab10e601e55 lib/galaxy/web/controllers/workflow.py --- a/lib/galaxy/web/controllers/workflow.py +++ b/lib/galaxy/web/controllers/workflow.py @@ -105,7 +105,7 @@ if self.cur_tag == self.target_tag: self.tag_content += text -class WorkflowController( BaseUIController, Sharable, UsesStoredWorkflow, UsesAnnotations, UsesItemRatings ): +class WorkflowController( BaseUIController, SharableMixin, UsesStoredWorkflowMixin, UsesAnnotations, UsesItemRatings ): stored_list_grid = StoredWorkflowListGrid() published_list_grid = StoredWorkflowAllPublishedGrid() Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket