Exemplo n.º 1
0
    def __init__(self,
                 app,
                 template_cache_dir=None,
                 directories_setting=None,
                 skip_bad_plugins=True,
                 **kwargs):
        """
        Set up the manager and load all visualization plugins.

        :type   app:        galaxy.app.UniverseApplication
        :param  app:        the application (and its configuration) using this manager
        :type   base_url:   string
        :param  base_url:   url to prefix all plugin urls with
        :type   template_cache_dir: string
        :param  template_cache_dir: filesytem path to the directory where cached
            templates are kept
        """
        self.app = weakref.ref(app)
        self.config_parser = config_parser.VisualizationsConfigParser()
        self.base_url = self.BASE_URL
        self.template_cache_dir = template_cache_dir
        self.additional_template_paths = []
        self.directories = []
        self.skip_bad_plugins = skip_bad_plugins
        self.plugins = {}
        self.directories = config_directories_from_setting(
            directories_setting, app.config.root)
        self._load_configuration()
        self._load_plugins()
Exemplo n.º 2
0
 def __init__(self, app, skip_bad_plugins=True, **kwargs):
     self.app = weakref.ref(app)
     self.config_parser = config_parser.VisualizationsConfigParser()
     super(VisualizationsRegistry,
           self).__init__(app,
                          'visualizations',
                          skip_bad_plugins=skip_bad_plugins,
                          **kwargs)