diff --git a/src/App.jsx b/src/App.jsx index e7b925d..e1be0fa 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -2575,6 +2575,7 @@ function LocationSignalMap({ countries, locations }) { } function UptimePage({ uptime }) { + const [hoveredSnapshot, setHoveredSnapshot] = useState(null) const checks = uptime.checks const history = uptime.history const operationalCount = checks.filter((check) => check.ok).length @@ -2622,21 +2623,41 @@ function UptimePage({ uptime }) {

-
- {history.map((sample) => { +
+ {history.map((sample, index) => { const height = `${Math.max(12, (sample.onlineChecks / sample.totalChecks) * 100)}%` + const left = history.length > 1 ? (index / (history.length - 1)) * 100 : 50 return (
setHoveredSnapshot(null)} + onFocus={() => setHoveredSnapshot({ ...sample, left })} + onMouseEnter={() => setHoveredSnapshot({ ...sample, left })} + onMouseLeave={() => setHoveredSnapshot(null)} style={{ height }} - title={`${sample.onlineChecks}/${sample.totalChecks} online`} + tabIndex="0" /> ) })} + {hoveredSnapshot ? ( +
+ {dateFormat.format(new Date(hoveredSnapshot.timestamp))} + + {hoveredSnapshot.ok ? 'Uptime' : 'Downtime or degraded'} ยท {formatNumber(hoveredSnapshot.onlineChecks)}/{formatNumber(hoveredSnapshot.totalChecks)} online + +
+ ) : null} + {!history.length ? (
Checking website status