mirror of
https://github.com/MCSManager/MCSManager.git
synced 2025-01-24 15:14:01 +08:00
Fix: terminal log err
This commit is contained in:
parent
3b459f1d4d
commit
d36361883f
@ -158,13 +158,12 @@ const initTerminal = async () => {
|
||||
const dom = document.getElementById(terminalDomId.value);
|
||||
if (dom) {
|
||||
const term = initTerminalWindow(dom);
|
||||
term.write(
|
||||
(await getInstanceOutputLog()
|
||||
.execute({
|
||||
params: { uuid: instanceId || "", daemonId: daemonId || "" }
|
||||
})
|
||||
.then((res) => res.value)) || ""
|
||||
);
|
||||
try {
|
||||
const { value } = await getInstanceOutputLog().execute({
|
||||
params: { uuid: instanceId || "", daemonId: daemonId || "" }
|
||||
});
|
||||
if (value) term.write(value);
|
||||
} catch (error) {}
|
||||
return term;
|
||||
}
|
||||
throw new Error("init terminal failed");
|
||||
|
@ -147,7 +147,7 @@ const submit = async () => {
|
||||
return message.success(t("TXT_CODE_d3de39b4"));
|
||||
} catch (error: any) {
|
||||
console.error(error);
|
||||
return message.error(error.message);
|
||||
return message.error(error.message ?? t("保存失败,请检查配置项"));
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user