Skip to content

Commit 7ade811

Browse files
committed
format
1 parent bf502ab commit 7ade811

File tree

3 files changed

+48
-12
lines changed

3 files changed

+48
-12
lines changed

app/components/InstrumentsDisplay.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,16 @@ export function createInstrumentGroups(
2020
): Map<string, instList> {
2121
let newInstrumentGroups: Map<string, instList> = new Map();
2222
instruments.forEach((inst) => {
23-
inst.groups.filter((group)=>!instrumentsExcludeList.includes(group)).forEach((group) => {
24-
if (!newInstrumentGroups.has(group)) {
25-
// This is a new science group so create a new entry
26-
newInstrumentGroups.set(group, []);
27-
}
28-
newInstrumentGroups.get(group)!.push(inst);
29-
})
30-
})
23+
inst.groups
24+
.filter((group) => !instrumentsExcludeList.includes(group))
25+
.forEach((group) => {
26+
if (!newInstrumentGroups.has(group)) {
27+
// This is a new science group so create a new entry
28+
newInstrumentGroups.set(group, []);
29+
}
30+
newInstrumentGroups.get(group)!.push(inst);
31+
});
32+
});
3133
return newInstrumentGroups;
3234
}
3335

app/components/ScienceGroup.test.tsx

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,27 @@ it("renders sciencegroup unchanged", () => {
66
<ScienceGroup
77
name={"EXCITATIONS"}
88
instruments={[
9-
{ name: "Instrument", runStateValue: "RUNNING", pvPrefix:"",runStatePV:"",groups:["EXCITATIONS"], isScheduled:true,seci:false,hostName:"",targetStation:"TS5" },
9+
{
10+
name: "Instrument",
11+
runStateValue: "RUNNING",
12+
pvPrefix: "",
13+
runStatePV: "",
14+
groups: ["EXCITATIONS"],
15+
isScheduled: true,
16+
seci: false,
17+
hostName: "",
18+
targetStation: "TS5",
19+
},
1020
{
1121
name: "Instrument2",
12-
runStateValue: "WAITING", pvPrefix:"",runStatePV:"",groups:["EXCITATIONS"], isScheduled:true,seci:false,hostName:"",targetStation:"TS5"
22+
runStateValue: "WAITING",
23+
pvPrefix: "",
24+
runStatePV: "",
25+
groups: ["EXCITATIONS"],
26+
isScheduled: true,
27+
seci: false,
28+
hostName: "",
29+
targetStation: "TS5",
1330
},
1431
]}
1532
/>,

app/components/TargetStation.test.tsx

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,27 @@ it("renders targetstation unchanged", () => {
77
name={"TS5"}
88
beamCurrent={1234.5678}
99
instruments={[
10-
{ name: "Instrument", runStateValue: "RESUMING", pvPrefix:"",runStatePV:"",groups:["EXCITATIONS"], isScheduled:true,seci:false,hostName:"",targetStation:"TS5" },
10+
{
11+
name: "Instrument",
12+
runStateValue: "RESUMING",
13+
pvPrefix: "",
14+
runStatePV: "",
15+
groups: ["EXCITATIONS"],
16+
isScheduled: true,
17+
seci: false,
18+
hostName: "",
19+
targetStation: "TS5",
20+
},
1121
{
1222
name: "Instrument2",
13-
runStateValue: "VETOING", pvPrefix:"",runStatePV:"",groups:["EXCITATIONS"], isScheduled:true,seci:false,hostName:"",targetStation:"TS5"
23+
runStateValue: "VETOING",
24+
pvPrefix: "",
25+
runStatePV: "",
26+
groups: ["EXCITATIONS"],
27+
isScheduled: true,
28+
seci: false,
29+
hostName: "",
30+
targetStation: "TS5",
1431
},
1532
]}
1633
/>,

0 commit comments

Comments
 (0)