project Package

figure_controller

Controller class for managing Figures saved in TVB.

class tvb.interfaces.web.controllers.project.figure_controller.EditPreview(*args, **kw)[source]

Bases: Schema

Validate edit action on Stored Preview

Messages

badDictType:

The input must be dict-like (not a %(type)s: %(value)r)

badType:

The input must be a string (not a %(type)s: %(value)r)

empty:

Please enter a value

missingValue:

Missing value

noneType:

The input must be a string (not None)

notExpected:

The input field %(name)s was not expected.

singleValueExpected:

Please provide only one value

chained_validators = []
declarative_count = 82
fields = {'name': <All [<UnicodeString object 78 inputEncoding='utf-8' not_empty=True outputEncoding='utf-8'>]>, 'session_name': <All [<UnicodeString object 80 inputEncoding='utf-8' not_empty=True outputEncoding='utf-8'>]>}
pre_validators = []
class tvb.interfaces.web.controllers.project.figure_controller.FigureController[source]

Bases: ProjectController

Resulting Figures are user-saved figures with specific visualizers or TVB pages which are considered important.

displayresultfigures(selected_session='all_sessions')[source]

Collect and display saved previews, grouped by session.

displayzoomedimage(figure_id)[source]

Displays the image with the specified id in an overlay dialog.

downloadimage(figure_id)[source]

Allow a user to download a figure.

editresultfigures(remove_figure=False, rename_session=False, remove_session=False, **data)[source]

This method knows how to handle the following actions: remove figure, update figure, remove session and update session.

storeresultfigure(img_type, **kwargs)[source]

Create preview for current displayed canvas and store image in current session, for future comparison.

project_controller

This file will handle Projects related part. This represents the Controller part (from MVC).

class tvb.interfaces.web.controllers.project.project_controller.EditForm(*args, **kw)[source]

Bases: Schema

Validate creation of a Project entity.

Messages

badDictType:

The input must be dict-like (not a %(type)s: %(value)r)

badType:

The input must be a string (not a %(type)s: %(value)r)

empty:

Please enter a value

missingValue:

Missing value

noneType:

The input must be a string (not None)

notExpected:

The input field %(name)s was not expected.

singleValueExpected:

Please provide only one value

chained_validators = []
declarative_count = 77
fields = {'administrator': <UnicodeString object 72 inputEncoding='utf-8' not_empty=False outputEncoding='utf-8'>, 'description': <UnicodeString object 69 inputEncoding='utf-8' outputEncoding='utf-8'>, 'disable_imports': <Bool object 76>, 'max_operation_size': <Int object 75 min=0 not_empty=False>, 'name': <All [<UnicodeString object 66 inputEncoding='utf-8' not_empty=True outputEncoding='utf-8'>, <PlainText object 67 regex=re.compile('^[a-zA-Z_\\-0-9]*$')>]>, 'project_id': <UnicodeString object 73 inputEncoding='utf-8' not_empty=False outputEncoding='utf-8'>, 'users': <ForEach object 71 validators=[<Int object 70>]>, 'visited_pages': <UnicodeString object 74 inputEncoding='utf-8' not_empty=False outputEncoding='utf-8'>}
invalis_name_msg = 'Please enter a name composed only of letters, numbers and underscores.'
pre_validators = []
class tvb.interfaces.web.controllers.project.project_controller.ProjectController[source]

Bases: BaseController

Displays pages which deals with Project data management.

KEY_OPERATION_FILTERS = 'operationfilters'
NODE_OPERATION_GROUP_TYPE = 'operationGroup'
NODE_OPERATION_TYPE = 'operation'
PRROJECTS_LINKED_KEY = 'projectslinked'

Delegate the creation of the actual link to the algorithm service.

downloaddatatype(data_gid, export_module, **data)[source]

Export the data to a default path of TVB_STORAGE/PROJECTS/project_name

downloadproject(project_id)[source]

Export the data from a whole project.

editone(project_id=None, cancel=False, save=False, delete=False, leave=False, **data)[source]

Create or change Project. When project_id is empty we create a new entity, otherwise we are to edit and existent one.

editstructure(project_id=None, first_level=None, second_level=None, filter_input='', visibility_filter=None, **_ignored)[source]

Return the page skeleton for displaying the project structure.

fill_default_attributes(template_dictionary, subsection='project')[source]

Overwrite base controller to add required parameters for adapter templates.

generate_call_out_control()[source]

Returns the content of a confirmation dialog, with a given question.

get_data_uploader_overlay(project_id)[source]

Returns the html which displays a dialog which allows the user to upload certain data into the application.

get_datatype_details(entity_gid, back_page='null', exclude_tabs=None)[source]

Returns the HTML which contains the details for the given dataType. :param back_page: if different from ‘null’ (the default) it will redirect to it after saving metedata changes

get_linkable_projects(datatype_id, is_group, entity_gid)[source]

Returns the HTML which displays the link-able projects for the given dataType

get_operation_details(entity_gid, is_group=False, back_page='burst')[source]

Returns the HTML which contains the details for the given operation.

get_project_structure_grouping()[source]
get_project_uploader_overlay()[source]

Returns the html which displays a dialog which allows the user to upload an entire project.

getmemberspage(page, project_id=None)[source]

Retrieve a new page of Project members.

index()[source]

Display project main-menu. Choose one project to work with.

launchloader(project_id, algorithm_id, cancel=False, **data)[source]

Start Upload mechanism

noderemove(project_id, node_gid)[source]

AJAX exposed method, to execute operation of data removal.

projectupload(**data)[source]

Upload Project from TVB ZIP.

readjsonstructure(project_id, visibility_filter='Full view', first_level=None, second_level=None, filter_value=None)[source]

AJAX exposed method. Will return the complete JSON for Project’s structure, or filtered tree (filter only Relevant entities or Burst only Data).

Delegate the creation of the actual link to the flow service.

set_project_structure_grouping(first, second)[source]
set_visibility(entity_type, entity_gid, to_de_relevant)[source]

Method used for setting the relevancy/visibility on a DataType(Group)/Operation(Group.

show_confirmation_overlay(**data)[source]

Returns the content of a confirmation dialog, with a given question.

updatemetadata(**data)[source]

Submit MetaData edited for DataType(Group) or Operation(Group).

viewall(create=False, page=1, selected_project_id=None, **_)[source]

Display all existent projects. Choose one project to work with.

viewoperations(project_id=None, page=1, filtername=None, reset_filters=None)[source]

Display table of operations for a given project selected