Skip to content

Commit 81947c0

Browse files
committed
Some renaming
1 parent 14fcdeb commit 81947c0

File tree

1 file changed

+30
-4
lines changed

1 file changed

+30
-4
lines changed

src/screens/BeamlineStats.tsx

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function StateCard(props: StateBoxProps) {
4747
);
4848
}
4949

50-
function PmacStagesState(props: Omit<StateBoxProps, "children">) {
50+
function PmacStagesStatus(props: Omit<StateBoxProps, "children">) {
5151
return (
5252
<StateCard
5353
bgColor={props.bgColor}
@@ -136,7 +136,7 @@ function BeamlineInfo(props: Omit<StateBoxProps, "children">) {
136136
);
137137
}
138138

139-
function ShuttersState(props: Omit<StateBoxProps, "children">) {
139+
function ShuttersStatus(props: Omit<StateBoxProps, "children">) {
140140
return (
141141
<StateCard
142142
bgColor={props.bgColor}
@@ -157,6 +157,27 @@ function ShuttersState(props: Omit<StateBoxProps, "children">) {
157157
);
158158
}
159159

160+
function DetectorStatus(props: Omit<StateBoxProps, "children">) {
161+
return (
162+
<StateCard
163+
bgColor={props.bgColor}
164+
title={props.title}
165+
titleColor={props.titleColor}
166+
>
167+
<PvComponent
168+
label="Eiger 9M"
169+
pv="ca://BL24I-EA-EIGER-01:CAM:DetectorState_RBV"
170+
transformValue={forceString}
171+
/>
172+
<PvComponent
173+
label="Pilatus 6M"
174+
pv="ca://BL24I-EA-PILAT-01:cam1:DetectorState_RBV"
175+
transformValue={forceString}
176+
/>
177+
</StateCard>
178+
);
179+
}
180+
160181
// These should be in a permanent sidebar
161182
// See https://github.com/DiamondLightSource/mx-daq-ui/issues/46
162183
// Maybe I should leave this for separate PR when I put in drawer ...
@@ -174,12 +195,12 @@ export function BeamlineStatsTabPanel() {
174195
title="Beamline Status"
175196
titleColor={theme.palette.info.main}
176197
/>
177-
<ShuttersState
198+
<ShuttersStatus
178199
bgColor={bgColor}
179200
title="Shutters"
180201
titleColor={theme.palette.info.main}
181202
/>
182-
<PmacStagesState
203+
<PmacStagesStatus
183204
bgColor={bgColor}
184205
title="Serial Fixed Target Stages"
185206
titleColor={theme.palette.info.main}
@@ -189,6 +210,11 @@ export function BeamlineStatsTabPanel() {
189210
title="Scan Monitor"
190211
titleColor={theme.palette.info.main}
191212
/>
213+
<DetectorStatus
214+
bgColor={bgColor}
215+
title="Detector Status"
216+
titleColor={theme.palette.info.main}
217+
/>
192218
</Grid2>
193219
</Stack>
194220
</Box>

0 commit comments

Comments
 (0)