Harden model results with lossless isolated repair and scoped permissions
This commit is contained in:
@@ -54,11 +54,27 @@ func (m Model) runsView(height int) string {
|
||||
if !m.runGraphFocus {
|
||||
top, pan = m.runGraphFollow()
|
||||
}
|
||||
graph := graphViewport("Run path · actual visits", m.runGraphLines(max(3, m.width-4)), m.width, graphHeight, top, pan, m.runGraphFocus, "g graph/details · arrows pan · j/k scroll · live")
|
||||
graph := graphViewport(m.runGraphTitle(), m.runGraphLines(max(3, m.width-4)), m.width, graphHeight, top, pan, m.runGraphFocus, "g graph/details · arrows pan · j/k scroll · live")
|
||||
details := m.runsDetailsView(height - graphHeight)
|
||||
return fitBlock(strings.Split(graph+"\n"+details, "\n"), m.width, height)
|
||||
}
|
||||
|
||||
func (m Model) runGraphTitle() string {
|
||||
r := m.runDetail
|
||||
if r == nil {
|
||||
return "Run path"
|
||||
}
|
||||
durationLabel := "elapsed"
|
||||
if r.FinishedAt != "" {
|
||||
durationLabel = "duration"
|
||||
}
|
||||
title := "Run path · " + durationLabel + " " + runDuration(r.CreatedAt, r.FinishedAt) + " · started " + dateLabel(r.CreatedAt)
|
||||
if r.FinishedAt != "" {
|
||||
title += " · finished " + dateLabel(r.FinishedAt)
|
||||
}
|
||||
return title
|
||||
}
|
||||
|
||||
func (m Model) runGraphFollow() (int, int) {
|
||||
graph := m.runPathGraph()
|
||||
if len(graph.Stages) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user