@@ -6,19 +6,22 @@ import {
66 Chip ,
77 CircularProgress ,
88 Divider ,
9+ IconButton ,
910 Paper ,
1011 Table ,
1112 TableBody ,
1213 TableCell ,
1314 TableContainer ,
1415 TableHead ,
1516 TableRow ,
17+ Tooltip ,
1618 Typography ,
1719} from "@mui/material" ;
1820import ArrowBackIcon from "@mui/icons-material/ArrowBack" ;
21+ import ExpandMoreIcon from '@mui/icons-material/ExpandMore' ;
1922import TuneIcon from "@mui/icons-material/Tune" ;
20- import ArrowOutwardIcon from "@mui/icons-material/ArrowOutward " ;
21-
23+ import AddIcon from "@mui/icons-material/Add " ;
24+ import PlaylistAddCheckIcon from '@mui/icons-material/PlaylistAddCheck' ;
2225import { fetchTaskResult } from "./utilities" ;
2326import PioreactorIcon from "./components/PioreactorIcon" ;
2427import {
@@ -46,38 +49,37 @@ function CoverageCell({ unit, device, cell, onNavigate }) {
4649 ) }
4750
4851 { status === COVERAGE_STATUS . AVAILABLE_NOT_ACTIVE && hasLink && (
49- < Button
50- size = "small"
51- variant = "text"
52-
53- sx = { {
54- textTransform : "none" ,
55- minWidth : 0 ,
56- justifyContent : "flex-start" ,
57- alignSelf : "flex-start" ,
58- } }
59- onClick = { ( ) => onNavigate ( cell . detailPath ) }
60- aria-label = { `Open calibrations for ${ unit } ${ device } ` }
61- >
62- Available
63- </ Button >
52+ < Box sx = { { display : "flex" , alignItems : "center" , justifyContent : "flex-start" , width : "100%" } } >
53+ < Typography component = "span" variant = "body2" color = "text.secondary" >
54+ Inactive
55+ </ Typography >
56+ < Tooltip title = "Choose a calibration to set active" >
57+ < IconButton
58+ size = "small"
59+ onClick = { ( ) => onNavigate ( cell . detailPath ) }
60+ aria-label = { `Open calibrations for ${ unit } ${ device } ` }
61+ >
62+ < ExpandMoreIcon fontSize = "small" />
63+ </ IconButton >
64+ </ Tooltip >
65+ </ Box >
6466 ) }
6567
6668 { status === COVERAGE_STATUS . MISSING && (
67- < Button
68- size = "small"
69- variant = "text"
70- sx = { {
71- textTransform : "none" ,
72- minWidth : 0 ,
73- justifyContent : "flex-start" ,
74- alignSelf : "flex-start" ,
75- } }
76- onClick = { ( ) => onNavigate ( `/protocols/ ${ unit } / ${ device } ` ) }
77- aria-label = { `Create calibration for ${ unit } ${ device } ` }
78- >
79- Create a calibration
80- </ Button >
69+ < Box sx = { { display : "flex" , alignItems : "center" , justifyContent : "flex-start" , width : "100%" } } >
70+ < Typography component = "span" variant = "body2" color = "text.secondary" >
71+ Missing
72+ </ Typography >
73+ < Tooltip title = "Create calibration" >
74+ < IconButton
75+ size = "small"
76+ onClick = { ( ) => onNavigate ( `/protocols/ ${ unit } / ${ device } ` ) }
77+ aria-label = { `Create calibration for ${ unit } ${ device } ` }
78+ >
79+ < AddIcon fontSize = "inherit" />
80+ </ IconButton >
81+ </ Tooltip >
82+ </ Box >
8183 ) }
8284
8385 { status === COVERAGE_STATUS . UNKNOWN && (
@@ -169,7 +171,14 @@ function CalibrationCoverage(props) {
169171 < Table size = "small" stickyHeader >
170172 < TableHead >
171173 < TableRow >
172- < TableCell sx = { { minWidth : 180 } } > Pioreactor</ TableCell >
174+ < TableCell
175+ sx = { {
176+ minWidth : 180 ,
177+ backgroundColor : ( theme ) => theme . palette . action . hover ,
178+ } }
179+ >
180+ Pioreactor
181+ </ TableCell >
173182 { matrix . devices . map ( ( device ) => (
174183 < TableCell key = { device } align = "left" sx = { { minWidth : 180 } } >
175184 { device }
@@ -180,7 +189,13 @@ function CalibrationCoverage(props) {
180189 < TableBody >
181190 { matrix . units . map ( ( unit ) => (
182191 < TableRow key = { unit } hover >
183- < TableCell component = "th" scope = "row" >
192+ < TableCell
193+ component = "th"
194+ scope = "row"
195+ sx = { {
196+ backgroundColor : ( theme ) => theme . palette . action . hover ,
197+ } }
198+ >
184199 < Chip
185200 size = "small"
186201 icon = { < PioreactorIcon /> }
@@ -189,6 +204,7 @@ function CalibrationCoverage(props) {
189204 clickable
190205 component = { Link }
191206 to = { `/pioreactors/${ unit } ` }
207+ sx = { { "& .MuiChip-label" : { fontWeight : 600 } } }
192208 />
193209 </ TableCell >
194210 { matrix . devices . map ( ( device ) => (
0 commit comments