def fill_default_attributes(self, template_dictionary): """ Overwrite base controller to add required parameters for adapter templates. """ context = base.get_from_session(KEY_REGION_CONTEXT) template_dictionary["entitiySavedName"] = [{ 'name': DataTypeMetaData.KEY_TAG_1, 'label': 'Display name', 'type': 'str', "disabled": "False", "default": context.equation_kwargs.get(DataTypeMetaData.KEY_TAG_1, '') }] template_dictionary['loadExistentEntityUrl'] = LOAD_EXISTING_URL template_dictionary['resetToDefaultUrl'] = RELOAD_DEFAULT_PAGE_URL template_dictionary['displayedMessage'] = base.get_from_session( base.KEY_MESSAGE) template_dictionary['messageType'] = base.get_from_session( base.KEY_MESSAGE_TYPE) return SpatioTemporalController.fill_default_attributes( self, template_dictionary, subsection='regionstim')
def __init__(self): SpatioTemporalController.__init__(self) #if any field that starts with one of the following prefixes is changed # than the temporal equation chart will be redrawn self.temporal_fields_prefixes = ['temporal', 'min_tmp_x', 'max_tmp_x'] self.spatial_fields_prefixes = ['spatial', 'min_space_x', 'max_space_x']
def init_cherrypy(arguments=None): #### Mount static folders from modules marked for introspection arguments = arguments or [] CONFIGUER = TVBSettings.CHERRYPY_CONFIGURATION for module in arguments: module_inst = __import__(str(module), globals(), locals(), ["__init__"]) module_path = os.path.dirname(os.path.abspath(module_inst.__file__)) CONFIGUER["/static_" + str(module)] = { 'tools.staticdir.on': True, 'tools.staticdir.dir': '.', 'tools.staticdir.root': module_path } #### Mount controllers, and specify the root URL for them. cherrypy.tree.mount(BaseController(), "/", config=CONFIGUER) cherrypy.tree.mount(UserController(), "/user/", config=CONFIGUER) cherrypy.tree.mount(ProjectController(), "/project/", config=CONFIGUER) cherrypy.tree.mount(FigureController(), "/project/figure/", config=CONFIGUER) cherrypy.tree.mount(FlowController(), "/flow/", config=CONFIGUER) cherrypy.tree.mount(SettingsController(), "/settings/", config=CONFIGUER) cherrypy.tree.mount(DTIPipelineController(), "/pipeline/", config=CONFIGUER) cherrypy.tree.mount(HelpController(), "/help/", config=CONFIGUER) cherrypy.tree.mount(BurstController(), "/burst/", config=CONFIGUER) cherrypy.tree.mount(ParameterExplorationController(), "/burst/explore/", config=CONFIGUER) cherrypy.tree.mount(SpatioTemporalController(), "/spatial/", config=CONFIGUER) cherrypy.tree.mount(RegionsModelParametersController(), "/spatial/modelparameters/regions/", config=CONFIGUER) cherrypy.tree.mount(SurfaceModelParametersController(), "/spatial/modelparameters/surface/", config=CONFIGUER) cherrypy.tree.mount(RegionStimulusController(), "/spatial/stimulus/region/", config=CONFIGUER) cherrypy.tree.mount(SurfaceStimulusController(), "/spatial/stimulus/surface/", config=CONFIGUER) cherrypy.tree.mount(LocalConnectivityController(), "/spatial/localconnectivity/", config=CONFIGUER) cherrypy.config.update(CONFIGUER) #----------------- Register additional request handlers ----------------- # This tool checks for MAX upload size cherrypy.tools.upload = Tool('on_start_resource', RequestHandler.check_upload_size) # This tools clean up files on disk (mainly after export) cherrypy.tools.cleanup = Tool('on_end_request', RequestHandler.clean_files_on_disk) #----------------- End register additional request handlers ---------------- #### HTTP Server is fired now ###### cherrypy.engine.start()
def __init__(self): SpatioTemporalController.__init__(self) self.plotted_equations_prefixes = ['model_param', 'min_x', 'max_x']
def __init__(self): SpatioTemporalController.__init__(self) self.plotted_equations_prefixes = ['equation', 'surface']
def __init__(self): SpatioTemporalController.__init__(self)
def __init__(self): SpatioTemporalController.__init__(self) #if any field that starts with one of the following prefixes is changed than the equation chart will be redrawn self.fields_prefixes = ['temporal', 'min_x', 'max_x']