Updates
This commit is contained in:
+13
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user