@@ -3,6 +3,10 @@ import useWebSocket from "react-use-websocket";
33import Service from "./service" ;
44import api from "../../api" ;
55import { Box , Grid , Typography } from "@mui/material" ;
6+ import { Accordion , AccordionSummary , AccordionDetails } from "@mui/material" ;
7+ import { Table , TableBody , TableCell , TableRow } from "@mui/material" ;
8+ import ExpandMoreIcon from "@mui/icons-material/ExpandMore" ;
9+ import config from "../../config" ;
610
711function Services ( ) {
812 const [ pvCount , setPVCount ] = useState ( null ) ;
@@ -183,6 +187,64 @@ function Services() {
183187 </ Grid >
184188 </ Box >
185189 </ Box >
190+ < Accordion sx = { { mt : 3 } } >
191+ < AccordionSummary expandIcon = { < ExpandMoreIcon /> } aria-controls = "preferences-content" id = "preferences-header" >
192+ < Typography sx = { { fontSize : 18 , fontWeight : "medium" } } > Preference Settings</ Typography >
193+ </ AccordionSummary >
194+ < AccordionDetails sx = { { pt : 1 , pb : 1 } } >
195+ < Box sx = { { display : "flex" , flexDirection : "column" , gap : 1 } } >
196+ < Typography variant = "body2" > < strong > PV Web Socket:</ strong > { config . USE_PVWS ? "Enabled" : "Disabled" } </ Typography >
197+ < Typography variant = "body2" > < strong > Archiver:</ strong > { config . USE_AA ? "Enabled" : "Disabled" } </ Typography >
198+ < Typography variant = "body2" > < strong > OLOG:</ strong > { config . USE_OLOG ? "Enabled" : "Disabled" } </ Typography >
199+ < Typography variant = "body2" > < strong > Alarm Logger:</ strong > { config . USE_AL ? "Enabled" : "Disabled" } </ Typography >
200+ < Typography variant = "body2" > < strong > CaputLog:</ strong > { config . USE_CAPUTLOG ? "Enabled" : "Disabled" } </ Typography >
201+ < Accordion sx = { { boxShadow : "none" , border : "1px solid #ddd" , mt : 1 , '&:before' : { display : 'none' } } } >
202+ < AccordionSummary expandIcon = { < ExpandMoreIcon sx = { { fontSize : 18 } } /> }
203+ sx = { { minHeight : "32px !important" , '& .MuiAccordionSummary-content' : { margin : 0 } } }
204+ >
205+ < Typography variant = "subtitle2" sx = { { fontWeight : "bold" } } > Page Settings</ Typography >
206+ </ AccordionSummary >
207+ < AccordionDetails sx = { { py : 1 } } >
208+ < Grid container spacing = { 2 } >
209+ < Grid item xs = { 12 } md = { 6 } >
210+ < Typography variant = "subtitle2" sx = { { fontWeight : "bold" , mb : 1 } } > Home Page</ Typography >
211+ < Table size = "small" >
212+ < TableBody >
213+ < TableRow > < TableCell > Channel Finder Max Results</ TableCell > < TableCell > { config . CF_MAX_RESULTS ?? "No Limit" } </ TableCell > </ TableRow >
214+ < TableRow > < TableCell > Record Type</ TableCell > < TableCell > { config . CF_RECORD_TYPE ? "Enabled" : "Disabled" } </ TableCell > </ TableRow >
215+ < TableRow > < TableCell > Record Description</ TableCell > < TableCell > { config . CF_RECORD_DESC ? "Enabled" : "Disabled" } </ TableCell > </ TableRow >
216+ < TableRow > < TableCell > PV Alias</ TableCell > < TableCell > { config . CF_RECORD_ALIAS ? "Enabled" : "Disabled" } </ TableCell > </ TableRow >
217+ < TableRow > < TableCell > Extra Property</ TableCell > < TableCell > { config . EXTRA_PROP || "None" } </ TableCell > </ TableRow >
218+ < TableRow > < TableCell > Second Extra Property</ TableCell > < TableCell > { config . SECOND_EXTRA_PROP || "None" } </ TableCell > </ TableRow >
219+ < TableRow > < TableCell > PV Results Table Size</ TableCell > < TableCell > { config . RESULTS_TABLE_SIZE } </ TableCell > </ TableRow >
220+ < TableRow > < TableCell > PV Results Table Density</ TableCell > < TableCell > { config . RESULTS_TABLE_DENSITY } </ TableCell > </ TableRow >
221+ < TableRow > < TableCell > Show Disconnected in Live Value Box</ TableCell > < TableCell > { config . SHOW_DISCONNECTED ? "Yes" : "No" } </ TableCell > </ TableRow >
222+ < TableRow > < TableCell > Monitor All Warning Threshold</ TableCell > < TableCell > { config . LIVE_MONITOR_WARN } </ TableCell > </ TableRow >
223+ < TableRow > < TableCell > Monitor All Maximum</ TableCell > < TableCell > { config . LIVE_MONITOR_MAX } </ TableCell > </ TableRow >
224+ </ TableBody >
225+ </ Table >
226+ </ Grid >
227+ < Grid item xs = { 12 } md = { 6 } >
228+ < Typography variant = "subtitle2" sx = { { fontWeight : "bold" , mb : 1 } } > PV Details Page</ Typography >
229+ < Table size = "small" >
230+ < TableBody >
231+ < TableRow > < TableCell > Enable Live Monitoring by Default</ TableCell > < TableCell > { config . DEFAULT_LIVE_MONITORING ? "Yes" : "No" } </ TableCell > </ TableRow >
232+ < TableRow > < TableCell > Ignore Channel Finder PV Status for Monitoring</ TableCell > < TableCell > { config . PVWS_IGNORE_CF_PVSTATUS ? "Yes" : "No" } </ TableCell > </ TableRow >
233+ < TableRow > < TableCell > Waveform Monitoring</ TableCell > < TableCell > { config . PVWS_ALLOW_WAVEFORMS ? "Enabled" : "Disabled" } </ TableCell > </ TableRow >
234+ < TableRow > < TableCell > Treat Char Waveforms As Strings</ TableCell > < TableCell > { config . PVWS_TREAT_BYTE_ARRAY_AS_STRING ? "Yes" : "No" } </ TableCell > </ TableRow >
235+ < TableRow > < TableCell > Number of Days to Include in Online Log Search</ TableCell > < TableCell > { config . OLOG_START_TIME_DAYS ?? "No Limit" } </ TableCell > </ TableRow >
236+ < TableRow > < TableCell > Online Log Max Results</ TableCell > < TableCell > { config . OLOG_MAX_RESULTS ?? "No Limit" } </ TableCell > </ TableRow >
237+ < TableRow > < TableCell > Number of Days to Include in Alarm Log Search</ TableCell > < TableCell > { config . AL_START_TIME_DAYS ?? "No Limit" } </ TableCell > </ TableRow >
238+ < TableRow > < TableCell > Alarm Log Max Results</ TableCell > < TableCell > { config . AL_MAX_RESULTS ?? "No Limit" } </ TableCell > </ TableRow >
239+ </ TableBody >
240+ </ Table >
241+ </ Grid >
242+ </ Grid >
243+ </ AccordionDetails >
244+ </ Accordion >
245+ </ Box >
246+ </ AccordionDetails >
247+ </ Accordion >
186248 </ Fragment >
187249 )
188250}
0 commit comments