Warning

This document is for an old release of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.

galaxy.web.legacy_framework package

Submodules

galaxy.web.legacy_framework.grids module

class galaxy.web.legacy_framework.grids.GridColumn(label, key=None, model_class=None, method=None, format=None, link=None, attach_popup=False, visible=True, nowrap=False, filterable=None, sortable=True, label_id_prefix=None, target=None)[source]

Bases: object

__init__(label, key=None, model_class=None, method=None, format=None, link=None, attach_popup=False, visible=True, nowrap=False, filterable=None, sortable=True, label_id_prefix=None, target=None)[source]

Create a grid column.

get_value(trans, grid, item)[source]
filter(trans, user, query, column_filter)[source]

Modify query to reflect the column filter.

get_accepted_filters()[source]

Returns a list of accepted filters for this column.

sort(trans, query, ascending, column_name=None)[source]

Sort query using this column.

class galaxy.web.legacy_framework.grids.ReverseSortColumn(label, key=None, model_class=None, method=None, format=None, link=None, attach_popup=False, visible=True, nowrap=False, filterable=None, sortable=True, label_id_prefix=None, target=None)[source]

Bases: galaxy.web.legacy_framework.grids.GridColumn

Column that reverses sorting; this is useful when the natural sort is descending.

sort(trans, query, ascending, column_name=None)[source]

Sort query using this column.

class galaxy.web.legacy_framework.grids.TextColumn(label, key=None, model_class=None, method=None, format=None, link=None, attach_popup=False, visible=True, nowrap=False, filterable=None, sortable=True, label_id_prefix=None, target=None)[source]

Bases: galaxy.web.legacy_framework.grids.GridColumn

Generic column that employs freetext and, hence, supports freetext, case-independent filtering.

filter(trans, user, query, column_filter)[source]

Modify query to filter using free text, case independence.

get_filter(trans, user, column_filter)[source]

Returns a SQLAlchemy criterion derived from column_filter.

get_single_filter(user, a_filter)[source]

Returns a SQLAlchemy criterion derived for a single filter. Single filter is the most basic filter–usually a string–and cannot be a list.

sort(trans, query, ascending, column_name=None)[source]

Sort column using case-insensitive alphabetical sorting.

class galaxy.web.legacy_framework.grids.DateTimeColumn(label, key=None, model_class=None, method=None, format=None, link=None, attach_popup=False, visible=True, nowrap=False, filterable=None, sortable=True, label_id_prefix=None, target=None)[source]

Bases: galaxy.web.legacy_framework.grids.TextColumn

sort(trans, query, ascending, column_name=None)[source]

Sort query using this column.

class galaxy.web.legacy_framework.grids.BooleanColumn(label, key=None, model_class=None, method=None, format=None, link=None, attach_popup=False, visible=True, nowrap=False, filterable=None, sortable=True, label_id_prefix=None, target=None)[source]

Bases: galaxy.web.legacy_framework.grids.TextColumn

sort(trans, query, ascending, column_name=None)[source]

Sort query using this column.

get_single_filter(user, a_filter)[source]

Returns a SQLAlchemy criterion derived for a single filter. Single filter is the most basic filter–usually a string–and cannot be a list.

class galaxy.web.legacy_framework.grids.IntegerColumn(label, key=None, model_class=None, method=None, format=None, link=None, attach_popup=False, visible=True, nowrap=False, filterable=None, sortable=True, label_id_prefix=None, target=None)[source]

Bases: galaxy.web.legacy_framework.grids.TextColumn

Integer column that employs freetext, but checks that the text is an integer, so support filtering on integer values.

IMPORTANT NOTE: grids that use this column type should not include the column in the cols_to_filter list of MulticolFilterColumn ( i.e., searching on this column type should not be performed in the grid’s standard search - it won’t throw exceptions, but it also will not find what you’re looking for ). Grids that search on this column should use ‘filterable=”advanced”’ so that searching is only performed in the advanced search component, restricting the search to the specific column.

This is useful for searching on object ids or other integer columns. See the JobIdColumn column in the SpecifiedDateListGrid class in the jobs controller of the reports webapp for an example.

get_single_filter(user, a_filter)[source]

Returns a SQLAlchemy criterion derived for a single filter. Single filter is the most basic filter–usually a string–and cannot be a list.

sort(trans, query, ascending, column_name=None)[source]

Sort query using this column.

class galaxy.web.legacy_framework.grids.CommunityRatingColumn(label, key=None, model_class=None, method=None, format=None, link=None, attach_popup=False, visible=True, nowrap=False, filterable=None, sortable=True, label_id_prefix=None, target=None)[source]

Bases: galaxy.web.legacy_framework.grids.GridColumn, galaxy.model.item_attrs.UsesItemRatings

Column that displays community ratings for an item.

get_value(trans, grid, item)[source]
sort(trans, query, ascending, column_name=None)[source]

Sort query using this column.

class galaxy.web.legacy_framework.grids.OwnerAnnotationColumn(col_name, key, model_class=None, model_annotation_association_class=None, filterable=None)[source]

Bases: galaxy.web.legacy_framework.grids.TextColumn, galaxy.model.item_attrs.UsesAnnotations

Column that displays and filters item owner’s annotations.

__init__(col_name, key, model_class=None, model_annotation_association_class=None, filterable=None)[source]

Create a grid column.

get_value(trans, grid, item)[source]

Returns first 150 characters of annotation.

get_single_filter(user, a_filter)[source]

Filter by annotation and annotation owner.

class galaxy.web.legacy_framework.grids.CommunityTagsColumn(col_name, key, model_class=None, model_tag_association_class=None, filterable=None, grid_name=None)[source]

Bases: galaxy.web.legacy_framework.grids.TextColumn

Column that supports community tags.

__init__(col_name, key, model_class=None, model_tag_association_class=None, filterable=None, grid_name=None)[source]

Create a grid column.

get_value(trans, grid, item)[source]
filter(trans, user, query, column_filter)[source]

Modify query to filter model_class by tag. Multiple filters are ANDed.

get_filter(trans, user, column_filter)[source]

Returns a SQLAlchemy criterion derived from column_filter.

class galaxy.web.legacy_framework.grids.IndividualTagsColumn(col_name, key, model_class=None, model_tag_association_class=None, filterable=None, grid_name=None)[source]

Bases: galaxy.web.legacy_framework.grids.CommunityTagsColumn

Column that supports individual tags.

get_value(trans, grid, item)[source]
get_filter(trans, user, column_filter)[source]

Returns a SQLAlchemy criterion derived from column_filter.

class galaxy.web.legacy_framework.grids.MulticolFilterColumn(col_name, cols_to_filter, key, visible, filterable='default')[source]

Bases: galaxy.web.legacy_framework.grids.TextColumn

Column that performs multicolumn filtering.

__init__(col_name, cols_to_filter, key, visible, filterable='default')[source]

Create a grid column.

filter(trans, user, query, column_filter)[source]

Modify query to filter model_class by tag. Multiple filters are ANDed.

class galaxy.web.legacy_framework.grids.OwnerColumn(label, key=None, model_class=None, method=None, format=None, link=None, attach_popup=False, visible=True, nowrap=False, filterable=None, sortable=True, label_id_prefix=None, target=None)[source]

Bases: galaxy.web.legacy_framework.grids.TextColumn

Column that lists item’s owner.

get_value(trans, grid, item)[source]
sort(trans, query, ascending, column_name=None)[source]

Sort column using case-insensitive alphabetical sorting on item’s username.

class galaxy.web.legacy_framework.grids.PublicURLColumn(label, key=None, model_class=None, method=None, format=None, link=None, attach_popup=False, visible=True, nowrap=False, filterable=None, sortable=True, label_id_prefix=None, target=None)[source]

Bases: galaxy.web.legacy_framework.grids.TextColumn

Column displays item’s public URL based on username and slug.

class galaxy.web.legacy_framework.grids.DeletedColumn(label, key=None, model_class=None, method=None, format=None, link=None, attach_popup=False, visible=True, nowrap=False, filterable=None, sortable=True, label_id_prefix=None, target=None)[source]

Bases: galaxy.web.legacy_framework.grids.GridColumn

Column that tracks and filters for items with deleted attribute.

get_accepted_filters()[source]

Returns a list of accepted filters for this column.

filter(trans, user, query, column_filter)[source]

Modify query to filter self.model_class by state.

class galaxy.web.legacy_framework.grids.StateColumn(label, key=None, model_class=None, method=None, format=None, link=None, attach_popup=False, visible=True, nowrap=False, filterable=None, sortable=True, label_id_prefix=None, target=None)[source]

Bases: galaxy.web.legacy_framework.grids.GridColumn

Column that tracks and filters for items with state attribute.

get_value(trans, grid, item)[source]
filter(trans, user, query, column_filter)[source]

Modify query to filter self.model_class by state.

get_accepted_filters()[source]

Returns a list of accepted filters for this column.

class galaxy.web.legacy_framework.grids.SharingStatusColumn(label, key=None, model_class=None, method=None, format=None, link=None, attach_popup=False, visible=True, nowrap=False, filterable=None, sortable=True, label_id_prefix=None, target=None)[source]

Bases: galaxy.web.legacy_framework.grids.GridColumn

Grid column to indicate sharing status.

get_value(trans, grid, item)[source]
filter(trans, user, query, column_filter)[source]

Modify query to filter histories by sharing status.

get_accepted_filters()[source]

Returns a list of accepted filters for this column.

class galaxy.web.legacy_framework.grids.GridOperation(label, key=None, condition=None, allow_multiple=True, allow_popup=True, target=None, url_args=None, async_compatible=False, confirm=None, global_operation=None)[source]

Bases: object

__init__(label, key=None, condition=None, allow_multiple=True, allow_popup=True, target=None, url_args=None, async_compatible=False, confirm=None, global_operation=None)[source]

Initialize self. See help(type(self)) for accurate signature.

get_url_args(item)[source]
allowed(item)[source]
class galaxy.web.legacy_framework.grids.DisplayByUsernameAndSlugGridOperation(label, key=None, condition=None, allow_multiple=True, allow_popup=True, target=None, url_args=None, async_compatible=False, confirm=None, global_operation=None)[source]

Bases: galaxy.web.legacy_framework.grids.GridOperation

Operation to display an item by username and slug.

get_url_args(item)[source]
class galaxy.web.legacy_framework.grids.GridAction(label=None, url_args=None, target=None)[source]

Bases: object

__init__(label=None, url_args=None, target=None)[source]

Initialize self. See help(type(self)) for accurate signature.

class galaxy.web.legacy_framework.grids.GridColumnFilter(label, args=None)[source]

Bases: object

__init__(label, args=None)[source]

Initialize self. See help(type(self)) for accurate signature.

get_url_args()[source]
class galaxy.web.legacy_framework.grids.Grid[source]

Bases: object

Specifies the content and format of a grid (data table).

title = ''
model_class: Optional[type] = None
show_item_checkboxes = False
template = 'legacy/grid_base.mako'
async_template = 'legacy/grid_base_async.mako'
use_async = False
use_hide_message = True
global_actions: List[galaxy.web.legacy_framework.grids.GridAction] = []
columns: List[galaxy.web.legacy_framework.grids.GridColumn] = []
operations: List[galaxy.web.legacy_framework.grids.GridOperation] = []
standard_filters: List[galaxy.web.legacy_framework.grids.GridColumnFilter] = []
default_filter: Dict[str, str] = {}
default_sort_key: Optional[str] = None
use_paging = False
num_rows_per_page = 25
allow_fetching_all_results = True
cur_filter_pref_name = '.filter'
cur_sort_key_pref_name = '.sort_key'
legend = None
info_text = None
__init__()[source]

Initialize self. See help(type(self)) for accurate signature.

get_ids(**kwargs)[source]
handle_operation(trans, operation, ids, **kwargs)[source]
get_current_item(trans, **kwargs)[source]
build_initial_query(trans, **kwargs)[source]
apply_query_filter(trans, query, **kwargs)[source]