Add flowcell model type to the flowcell model
[htsworkflow.git] / htsworkflow / frontend / experiments / admin.py
index 6cf7aeb4c7a29a53fa4bfa4db0dc7ef4082e98c2..e9419dc4a480771c09ea0987a3b2034f5ffeb55a 100644 (file)
@@ -1,6 +1,6 @@
 from itertools import chain
 from htsworkflow.frontend.experiments.models import \
-     FlowCell, DataRun, DataFile, FileType, ClusterStation, Sequencer, Lane
+     FlowCell, FlowCellModel, DataRun, DataFile, FileType, ClusterStation, Sequencer, Lane
 from django.contrib import admin
 from django.contrib.admin.widgets import FilteredSelectMultiple
 from django.forms import ModelForm
@@ -96,6 +96,14 @@ class LaneOptions(admin.ModelAdmin):
     )
 admin.site.register(Lane, LaneOptions)
 
+class FlowCellModelOptions(admin.ModelAdmin):
+    search_fields = ('name',)
+    list_display = ('name', 'fixed_time', 'per_cycle_time', 'isdefault')
+    fieldsets = (
+        (None, { 'fields': ('name', 'fixed_time', 'per_cycle_time', 'isdefault') }),
+        )
+admin.site.register(FlowCellModel, FlowCellModelOptions)
+
 class FlowCellOptions(admin.ModelAdmin):
     class Media:
         css = { 'all': ('css/admin_flowcell.css',) }
@@ -111,7 +119,7 @@ class FlowCellOptions(admin.ModelAdmin):
     fieldsets = (
         (None, {
           'fields': ('run_date', ('flowcell_id','cluster_station','sequencer'),
-                    ('read_length', 'control_lane', 'paired_end'),)
+                    ('flowcell_model', 'read_length', 'paired_end', 'control_lane', ),)
         }),
         ('Notes:', { 'fields': ('notes',),}),
     )