Commit adbe43f0 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[widgets][assetwidget] Add handling of ProtocolTemplate

parent e8316599
......@@ -48,6 +48,7 @@ from .experimenteditor import ExperimentEditor
from .libraryeditor import LibraryEditor
from .plottereditor import PlotterEditor
from .plotterparameterseditor import PlotterParametersEditor
from .protocoltemplateeditor import ProtocolTemplateEditor
from .toolchaineditor import ToolchainEditor
......@@ -59,26 +60,30 @@ def widget_for_asset_type(asset_type):
:return: the editor matching the asset type
editor = None
if asset_type == AssetType.UNKNOWN:
return PlaceholderEditor()
if asset_type == AssetType.ALGORITHM:
return AlgorithmEditor()
editor = PlaceholderEditor()
elif asset_type == AssetType.ALGORITHM:
editor = AlgorithmEditor()
elif asset_type == AssetType.DATABASE:
return DatabaseEditor()
editor = DatabaseEditor()
elif asset_type == AssetType.DATAFORMAT:
return DataformatEditor()
editor = DataformatEditor()
elif asset_type == AssetType.EXPERIMENT:
return ExperimentEditor()
editor = ExperimentEditor()
elif asset_type == AssetType.LIBRARY:
return LibraryEditor()
editor = LibraryEditor()
elif asset_type == AssetType.PLOTTER:
return PlotterEditor()
editor = PlotterEditor()
elif asset_type == AssetType.PLOTTERPARAMETERS:
return PlotterParametersEditor()
editor = PlotterParametersEditor()
elif asset_type == AssetType.PROTOCOLTEMPLATE:
editor = ProtocolTemplateEditor()
elif asset_type == AssetType.TOOLCHAIN:
return ToolchainEditor()
editor = ToolchainEditor()
raise RuntimeError("Invalid asset type given {}".format(asset_type))
return editor
class FileBlocker:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment