commit/galaxy-central: carlfeberhard: Visualizations Registry: allow disabling via config file
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/0c20fa551dd9/ Changeset: 0c20fa551dd9 User: carlfeberhard Date: 2014-01-14 16:55:22 Summary: Visualizations Registry: allow disabling via config file Affected #: 3 files diff -r c5c57ec1af3ca407ce64e52093173be90a2047b7 -r 0c20fa551dd90a9d8101bf4f2a8cac3793b9663b config/plugins/visualizations/sweepster/config/sweepster.xml --- a/config/plugins/visualizations/sweepster/config/sweepster.xml +++ b/config/plugins/visualizations/sweepster/config/sweepster.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE visualization SYSTEM "../../visualization.dtd"> -<visualization name="sweepster"> +<visualization name="sweepster" disabled="true"><data_sources><data_source><model_class>HistoryDatasetAssociation</model_class> diff -r c5c57ec1af3ca407ce64e52093173be90a2047b7 -r 0c20fa551dd90a9d8101bf4f2a8cac3793b9663b lib/galaxy/visualization/registry.py --- a/lib/galaxy/visualization/registry.py +++ b/lib/galaxy/visualization/registry.py @@ -375,7 +375,7 @@ def parse_file( self, xml_filepath ): """ Parse the given XML file for visualizations data. - :returns: tuple of ( `visualization_name`, `visualization` ) + :returns: visualization config dictionary """ try: xml_tree = galaxy.util.parse_xml( xml_filepath ) @@ -393,6 +393,10 @@ """ returned = {} + # allow manually turning off a vis by checking for a disabled property + if 'disabled' in xml_tree.attrib: + return None + # data_sources are the kinds of objects/data associated with the visualization # e.g. views on HDAs can use this to find out what visualizations are applicable to them data_sources = [] diff -r c5c57ec1af3ca407ce64e52093173be90a2047b7 -r 0c20fa551dd90a9d8101bf4f2a8cac3793b9663b lib/galaxy/web/base/pluginframework.py --- a/lib/galaxy/web/base/pluginframework.py +++ b/lib/galaxy/web/base/pluginframework.py @@ -119,7 +119,7 @@ try: plugin = self.load_plugin( plugin_path ) if not plugin: - log.warn( '%s, plugin load failed: %s. Skipping...', self, plugin_path ) + log.warn( '%s, plugin load failed or disabled: %s. Skipping...', self, plugin_path ) #NOTE: prevent silent, implicit overwrite here (two plugins in two diff directories) #TODO: overwriting may be desired elif plugin.name in self.plugins: 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)
-
commits-noreply@bitbucket.org