diff --git a/src/calng/scenes.py b/src/calng/scenes.py index 7b3712876b8c8c97ec812feb7d7ca72d113a9025..2a6c16c0751e26071b4c5e142cf51b5af8effb7c 100644 --- a/src/calng/scenes.py +++ b/src/calng/scenes.py @@ -1451,6 +1451,39 @@ def manager_device_overview( mds_hash = schema_to_hash(manager_device_schema) cds_hash = schema_to_hash(correction_device_schema) + data_throttling_children = [ + LabelModel( + text="Frame filter", + width=11 * BASE_INC, + height=BASE_INC, + ), + EditableRow( + manager_device_id, + mds_hash, + "managedKeys.frameFilter.type", + 7, + 4, + ), + EditableRow( + manager_device_id, + mds_hash, + "managedKeys.frameFilter.spec", + 7, + 4, + ), + ] + + if "managedKeys.daqTrainStride" in mds_hash: + # Only add DAQ train stride if present on the schema, may be + # disabled on the manager. + data_throttling_children.insert(0, EditableRow( + manager_device_id, + mds_hash, + "managedKeys.daqTrainStride", + 7, + 4, + )) + return VerticalLayout( HorizontalLayout( ManagerDeviceStatus(manager_device_id), @@ -1472,34 +1505,7 @@ def manager_device_overview( max_depth=2, ), titled("Data throttling")(boxed(VerticalLayout))( - children=[ - EditableRow( - manager_device_id, - mds_hash, - "managedKeys.daqTrainStride", - 7, - 4, - ), - LabelModel( - text="Frame filter", - width=11 * BASE_INC, - height=BASE_INC, - ), - EditableRow( - manager_device_id, - mds_hash, - "managedKeys.frameFilter.type", - 7, - 4, - ), - EditableRow( - manager_device_id, - mds_hash, - "managedKeys.frameFilter.spec", - 7, - 4, - ), - ], + children=data_throttling_children, padding=0, ), ),