Update grid to render exact seconds for waterfall effect and fix page title
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>ui</title>
|
||||
<title>AI SOP Monitoring</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
@@ -50,8 +50,8 @@ export default function EventTimeline() {
|
||||
const chronologicalBlocks = useMemo(() => {
|
||||
const blocks = {};
|
||||
events.forEach(ev => {
|
||||
// Group by Minute (HH:MM)
|
||||
const timeKey = ev.start_time.substring(0, 5);
|
||||
// Group by exact time (HH:MM:SS) for a waterfall layout
|
||||
const timeKey = ev.start_time.substring(0, 8);
|
||||
if (!blocks[timeKey]) {
|
||||
blocks[timeKey] = { timeKey, CO: [], Mill: [], Conveyor: [] };
|
||||
}
|
||||
@@ -79,7 +79,7 @@ export default function EventTimeline() {
|
||||
>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: '0.5rem' }}>
|
||||
<span style={{ fontSize: '0.85rem', color: 'var(--text-secondary)' }}>
|
||||
{ev.start_time.substring(0, 5)} - {ev.end_time.substring(0, 5)}
|
||||
{ev.start_time.substring(0, 8)} - {ev.end_time.substring(0, 8)}
|
||||
</span>
|
||||
{getStateBadge(ev.state)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user