fix: log viewer

This commit is contained in:
bennykok
2024-01-31 21:21:22 +08:00
parent d4d7e98487
commit de641f0acf
3 changed files with 73 additions and 53 deletions
+6 -4
View File
@@ -36,7 +36,7 @@ type State = {
json: {
event: string;
data: any;
}
},
) => void;
};
@@ -82,7 +82,7 @@ function MachineWS({
const logs = useStore((x) =>
x.logs
.filter((p) => p.machine_id === machine.id)
.sort((a, b) => a.timestamp - b.timestamp)
.sort((a, b) => a.timestamp - b.timestamp),
);
const [sid, setSid] = useState("");
@@ -96,7 +96,7 @@ function MachineWS({
// queryParams: {
// clientId: sid,
// },
}
},
);
const connectionStatus = getConnectionStatus(readyState);
@@ -135,7 +135,9 @@ function MachineWS({
You can view your run's outputs here
</DialogDescription>
</DialogHeader>
<LogsViewer logs={logs} />
<div className="h-[400px]">
<LogsViewer logs={logs} hideTimestamp />
</div>
</DialogContent>
</Dialog>
);