fix: SSH update log modal shows completion and full tail (v0.5.6)

Fetch final update_script.log tail after agent-update, update title/message on success, show log by default; auto-close after 30s unchanged.
This commit is contained in:
2026-07-08 14:26:28 +10:00
parent 6565b7d679
commit c222dd7d41
5 changed files with 148 additions and 6 deletions
+22 -1
View File
@@ -2,7 +2,11 @@
<div v-if="open" class="host-action-log-dock" aria-live="polite">
<div class="host-action-log-panel" role="dialog" :aria-label="title">
<div class="host-action-log-header">
<h3>{{ title }}</h3>
<h3>
<span v-if="!loading && ok === true" class="host-action-log-mark host-action-log-mark-ok" aria-hidden="true"></span>
<span v-else-if="!loading && ok === false" class="host-action-log-mark host-action-log-mark-fail" aria-hidden="true"></span>
{{ title }}
</h3>
<button
type="button"
class="host-action-log-icon-btn"
@@ -19,6 +23,7 @@
</p>
<p v-if="message && !loading" class="host-action-log-message" :class="messageClass">{{ message }}</p>
<p v-else-if="message && loading" class="muted host-action-log-sub host-action-log-message">{{ message }}</p>
<p v-if="!loading && ok" class="muted host-action-log-sub">Окно закроется автоматически через ~30 с</p>
<pre v-if="logVisible" class="host-action-log-output">{{
output || "Ожидание лога с хоста\n(обновление /var/log/update_script.log)"
}}</pre>
@@ -94,6 +99,22 @@ const messageClass = computed(() => {
margin: 0;
font-size: 1rem;
line-height: 1.3;
display: flex;
align-items: flex-start;
gap: 0.35rem;
}
.host-action-log-mark {
flex-shrink: 0;
font-weight: 700;
}
.host-action-log-mark-ok {
color: #3fb950;
}
.host-action-log-mark-fail {
color: #f85149;
}
.host-action-log-icon-btn {
@@ -91,6 +91,7 @@ function finishEntry(entry: HostRemoteActionLogEntry, job: HostRemoteActionJobSt
entry.loading = false;
entry.ok = job.ok ?? job.status === "success";
applyJobToEntry(entry, job);
entry.logVisible = true;
entry.open = true;
if (entry.ok) {
scheduleSuccessAutoClose(entry.id);
@@ -181,7 +182,7 @@ export async function pollHostRemoteAction(
id: newLogId(),
hostId,
open: true,
logVisible: false,
logVisible: true,
loading: true,
ok: null,
title,
@@ -231,7 +232,7 @@ export async function runHostRemoteAction(
id: newLogId(),
hostId,
open: true,
logVisible: false,
logVisible: true,
loading: true,
ok: null,
title,