R-621: the hold panel points at the log the hold kept
A held app's page now says, inside the hold panel, that the app's own log from
before it was stopped was kept, with a Napló link to the logs page that serves
it (0b93e1a). Shown only for an update hold with a non-empty kept log
(Manager.HoldLogKept). New copy through the bundle (hu + en), parity case
app_info_hold_log captured when born.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
@@ -1480,6 +1480,18 @@ func (m *Manager) GetLogs(name string, lines int) (string, error) {
|
||||
return output, nil
|
||||
}
|
||||
|
||||
// HoldLogKept reports whether the hold kept a non-empty log of this app's own output (R-621) — the
|
||||
// app page's hold panel then points at the logs page, which serves that kept log (GetLogs). Read-only;
|
||||
// false for an unknown app. Pinned by TestR621_HoldPanelPointsAtTheKeptLog (internal/web).
|
||||
func (m *Manager) HoldLogKept(name string) bool {
|
||||
stack, ok := m.GetStack(name)
|
||||
if !ok || stack.ComposePath == "" {
|
||||
return false
|
||||
}
|
||||
_, _, kept := latestHoldLog(filepath.Dir(stack.ComposePath))
|
||||
return kept
|
||||
}
|
||||
|
||||
// latestHoldLog returns the newest non-empty hold-logs/<ts>/compose-logs.txt under a stack dir. The
|
||||
// directory names are UTC timestamps (20060102T150405Z), so the lexical order is the time order.
|
||||
func latestHoldLog(dir string) (content, ts string, ok bool) {
|
||||
|
||||
Reference in New Issue
Block a user