This commit is contained in:
2026-03-14 11:45:39 +01:00
parent 53fbcd96dc
commit 18bda1653c
32 changed files with 60 additions and 49 deletions
@@ -20,6 +20,19 @@ export default function ServiceClusterServerLogSelectorSelectLog({
}: Props) {
let logs = service.logs;
if (service.type == "load_balancer") {
if (!logs?.[0]) {
logs = [];
}
logs.push(
...[
`tail -f /var/log/nginx/access.log`,
`tail -f /var/log/nginx/error.log`,
],
);
}
const log_strings = logs?.map((l) => (typeof l == "string" ? l : l.cmd));
const is_custom_log =
log?.match(/./) && !Boolean(log_strings?.find((l) => l == log));
@@ -48,8 +48,6 @@ export default function ServiceClusterServer({
);
}
service.logs = service_logs;
const [target, setTarget] = useState<
(typeof ServerTerminalTargets)[number]["name"]
>(service_logs?.[0] ? "logs" : "shell");