add unit tests for stream decode, mtime fallback, staleness, sorting
This commit is contained in:
31
main.go
31
main.go
@@ -23,21 +23,21 @@ var (
|
||||
Foreground(lipgloss.Color("#00d4ff")).
|
||||
Padding(0, 1)
|
||||
|
||||
statusRunning = lipgloss.NewStyle().Foreground(lipgloss.Color("#00ff88")).SetString("● running")
|
||||
statusIdle = lipgloss.NewStyle().Foreground(lipgloss.Color("#888888")).SetString("○ idle")
|
||||
statusBlocked = lipgloss.NewStyle().Foreground(lipgloss.Color("#ffaa00")).SetString("⚠ blocked")
|
||||
statusError = lipgloss.NewStyle().Foreground(lipgloss.Color("#ff4444")).SetString("✕ error")
|
||||
statusClosed = lipgloss.NewStyle().Foreground(lipgloss.Color("#555555")).SetString("✗ closed")
|
||||
statusLost = lipgloss.NewStyle().Foreground(lipgloss.Color("#773333")).SetString("✗ lost")
|
||||
subagentMark = lipgloss.NewStyle().Foreground(lipgloss.Color("#55aaff")).SetString("◇")
|
||||
statusRunning = lipgloss.NewStyle().Foreground(lipgloss.Color("#00ff88")).SetString("● running")
|
||||
statusIdle = lipgloss.NewStyle().Foreground(lipgloss.Color("#888888")).SetString("○ idle")
|
||||
statusBlocked = lipgloss.NewStyle().Foreground(lipgloss.Color("#ffaa00")).SetString("⚠ blocked")
|
||||
statusError = lipgloss.NewStyle().Foreground(lipgloss.Color("#ff4444")).SetString("✕ error")
|
||||
statusClosed = lipgloss.NewStyle().Foreground(lipgloss.Color("#555555")).SetString("✗ closed")
|
||||
statusLost = lipgloss.NewStyle().Foreground(lipgloss.Color("#773333")).SetString("✗ lost")
|
||||
subagentMark = lipgloss.NewStyle().Foreground(lipgloss.Color("#55aaff")).SetString("◇")
|
||||
|
||||
detailKeyStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#00d4ff")).Bold(true)
|
||||
detailLabelStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#aaaaaa"))
|
||||
detailValStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#dddddd"))
|
||||
detailBoxStyle = lipgloss.NewStyle().
|
||||
Border(lipgloss.RoundedBorder()).
|
||||
BorderForeground(lipgloss.Color("240")).
|
||||
Padding(0, 1)
|
||||
Border(lipgloss.RoundedBorder()).
|
||||
BorderForeground(lipgloss.Color("240")).
|
||||
Padding(0, 1)
|
||||
|
||||
infoStyle = lipgloss.NewStyle().
|
||||
Foreground(lipgloss.Color("#aaaaaa")).
|
||||
@@ -50,10 +50,10 @@ var (
|
||||
|
||||
// Sort modes
|
||||
const (
|
||||
sortSmart = iota // live first, running first, then last activity
|
||||
sortActivity // most recent activity first
|
||||
sortStarted // most recently started first
|
||||
sortFolder // folder name A-Z
|
||||
sortSmart = iota // live first, running first, then last activity
|
||||
sortActivity // most recent activity first
|
||||
sortStarted // most recently started first
|
||||
sortFolder // folder name A-Z
|
||||
)
|
||||
|
||||
var sortNames = map[int]string{
|
||||
@@ -795,8 +795,7 @@ Config: ~/.config/pi-dashboard.yaml
|
||||
remote:
|
||||
- host: 192.168.20.13
|
||||
user: sam
|
||||
path: /home/sam/.pi/agent/dashboard/
|
||||
`)
|
||||
path: /home/sam/.pi/agent/dashboard/`)
|
||||
return
|
||||
case "--list":
|
||||
cfg := defaultConfig()
|
||||
|
||||
Reference in New Issue
Block a user