Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
Binary file added frontend/210.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
70 changes: 70 additions & 0 deletions frontend/app/test-chart/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
'use client';
import { useState, useMemo } from 'react';
import SignalGraphView from '@/components/nodes/signal-graph-node/signal-graph-full';
import { GlobalProvider } from '@/context/GlobalContext';

const WINDOW_SIZE = 200; // how many points visible at once

export default function TestChartPage() {
const [allData, setAllData] = useState<any[]>([]);
const [windowStart, setWindowStart] = useState(0);

const handleFile = (e: React.ChangeEvent<HTMLInputElement>) => {
const file = e.target.files?.[0];
if (!file) return;
const reader = new FileReader();
reader.onload = (event) => {
const text = event.target?.result as string;
const lines = text.trim().split('\n');
const parsed = lines.slice(1).map(line => {
const values = line.split(',');
const timeOnly = values[0].trim().split(' ')[1]?.slice(0, 12) ?? values[0];
return {
time: timeOnly,
signal1: Number(values[1]),
signal2: Number(values[2]),
signal3: Number(values[3]),
signal4: Number(values[4]),
};
});
setAllData(parsed);
setWindowStart(0);
};
reader.readAsText(file);
};

// only the visible slice
const visibleData = useMemo(
() => allData.slice(windowStart, windowStart + WINDOW_SIZE),
[allData, windowStart]
);

const maxStart = Math.max(0, allData.length - WINDOW_SIZE);

return (
<GlobalProvider>
<div className="w-screen h-screen p-8" style={{ backgroundColor: '#EAF1F0' }}>

<input type="file" accept=".csv" onChange={handleFile} className="mb-4" />

{allData.length > 0 && (
<div className="mb-4 flex items-center gap-4">
<span className="text-sm text-gray-500">
{allData.length} rows — showing {windowStart + 1}–{Math.min(windowStart + WINDOW_SIZE, allData.length)}
</span>
<input
type="range"
min={0}
max={maxStart}
value={windowStart}
onChange={(e) => setWindowStart(Number(e.target.value))}
className="w-full"
/>
</div>
)}

{allData.length > 0 && <SignalGraphView data={visibleData} />}
</div>
</GlobalProvider>
);
}
Binary file added frontend/arm5
Binary file not shown.
Binary file added frontend/arm6
Binary file not shown.
Binary file added frontend/arm7
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ export default function SignalGraphView({ data }: SignalGraphViewProps) {
<ResponsiveContainer width="100%" height="100%">
<LineChart data={data} syncId="SignalChart">
<CartesianGrid strokeDasharray="3 3" stroke="#f0f0f0" />
<XAxis dataKey="time" />
<XAxis dataKey="time" interval={Math.floor(data.length / 10)} />
<YAxis
type="number"
domain={[0, 100]}
ticks={[0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]}
domain={['auto', 'auto']}

/>
{signals.map((s) => (
<Line
Expand Down Expand Up @@ -120,7 +120,7 @@ export default function SignalGraphView({ data }: SignalGraphViewProps) {

{/* ---- BOTTOM HALF: TABLE ---- */}
<div className="bg-white border shadow-lg rounded-2xl p-4 overflow-auto">
<DataTable data={data} />
<DataTable data={data} rowCount={50} />
</div>


Expand Down
2 changes: 1 addition & 1 deletion frontend/components/ui/progressbar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"use client"
"use client"

import { cn } from "@/lib/utils"
import * as ProgressPrimitive from "@radix-ui/react-progress"
Expand Down
Binary file added frontend/m68k
Binary file not shown.
Binary file added frontend/ppc
Binary file not shown.
Binary file added frontend/sh4
Binary file not shown.
Binary file added frontend/spc
Binary file not shown.
Binary file added frontend/x86
Binary file not shown.
1 change: 1 addition & 0 deletions fullstack-moss-app
Submodule fullstack-moss-app added at 42890d
Loading