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