fix: machine build height
This commit is contained in:
parent
c4628f6e4c
commit
488d2aee8c
@ -35,7 +35,10 @@ export default async function Page({
|
||||
/>
|
||||
)}
|
||||
{machine.status !== "building" && machine.build_log && (
|
||||
<LogsViewer logs={JSON.parse(machine.build_log)} />
|
||||
<LogsViewer
|
||||
logs={JSON.parse(machine.build_log)}
|
||||
className="h-full max-h-[600px]"
|
||||
/>
|
||||
)}
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
@ -1,6 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import React, { useEffect, useRef } from "react";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { toast } from "sonner";
|
||||
|
||||
export type LogsType = {
|
||||
@ -12,7 +13,8 @@ export type LogsType = {
|
||||
export function LogsViewer({
|
||||
logs,
|
||||
hideTimestamp,
|
||||
}: { logs: LogsType; hideTimestamp?: boolean }) {
|
||||
className,
|
||||
}: { logs: LogsType; hideTimestamp?: boolean; className?: string }) {
|
||||
const container = useRef<HTMLDivElement | null>(null);
|
||||
|
||||
useEffect(() => {
|
||||
@ -40,7 +42,10 @@ export function LogsViewer({
|
||||
}
|
||||
container.current = ref;
|
||||
}}
|
||||
className="h-full w-full flex flex-col text-xs p-2 overflow-y-scroll whitespace-break-spaces"
|
||||
className={cn(
|
||||
"h-full w-full flex flex-col text-xs p-2 overflow-y-scroll whitespace-break-spaces",
|
||||
className,
|
||||
)}
|
||||
>
|
||||
{logs.map((x, i) => (
|
||||
<div
|
||||
|
@ -66,7 +66,7 @@ export function MachineBuildLog({
|
||||
return (
|
||||
<div>
|
||||
{connectionStatus}
|
||||
<LogsViewer logs={logs} hideTimestamp />
|
||||
<LogsViewer logs={logs} className="h-full max-h-[600px]" />
|
||||
|
||||
<AlertDialog open={finished}>
|
||||
<AlertDialogContent>
|
||||
|
Loading…
x
Reference in New Issue
Block a user