@@ -21,7 +21,7 @@ function App() {
2121
2222 return (
2323 < >
24- < h1 > testing the fastapi ws for hdf readout </ h1 >
24+ < h1 > ViSR web interface </ h1 >
2525
2626 < ButtonGroup >
2727 < Button onClick = { ( ) => setBackend ( 'colors' ) } > use colors backend</ Button >
@@ -30,30 +30,37 @@ function App() {
3030 < Button onClick = { ( ) => setBackend ( 'epics' ) } > use epics backend</ Button >
3131 </ ButtonGroup >
3232 {
33- backend === 'colors' ?
34- < >
35- < Plot />
36- < WebsocketChart />
37- < ColorsChart />
38- </ >
39- : backend === 'hdf' ? < >
40- < Stack direction = 'row' >
41- < DatasetShapeViewer />
42- < StateViewer />
43- </ Stack >
44- < ParsedPointsChart />
45- </ > : backend === 'generic' ? < >
46- < p > generic backend</ p >
47- < GenericPanel />
48- </ > : backend === 'epics' ?
49- < Box height = '80vh' width = '80vw' border = '2px red solid' >
50- epics backend
51- { /* todo here a nice auto generated component */ }
52- { /* <EpicsBackend /> */ }
53- < Live3DViewer wsUrl = "ws://localhost:3002/raster" />
54- { /* <WebSocketDemo /> */ }
55- </ Box >
56- : < p > error rendering - unknown backend</ p >
33+ backend === 'colors' &&
34+ < >
35+ < Plot />
36+ < WebsocketChart />
37+ < ColorsChart />
38+ </ >
39+ }
40+ {
41+ backend === 'hdf' && < >
42+ < Stack direction = 'row' >
43+ < DatasetShapeViewer />
44+ < StateViewer />
45+ </ Stack >
46+ < ParsedPointsChart />
47+ </ > } {
48+
49+
50+ backend === 'generic' && < >
51+ < p > generic backend</ p >
52+ < GenericPanel />
53+ </ >
54+
55+ }
56+ { backend === 'epics' &&
57+ < Box height = '80vh' width = '80vw' border = '2px red solid' >
58+ epics backend
59+ { /* todo here a nice auto generated component */ }
60+ { /* <EpicsBackend /> */ }
61+ < Live3DViewer wsUrl = "ws://localhost:3002/raster" />
62+ { /* <WebSocketDemo /> */ }
63+ </ Box >
5764 }
5865 </ >
5966 ) ;
0 commit comments