Documentation
¶
Overview ¶
Package web provides HTTP server and templates for the Gas Town dashboard.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadTemplates ¶
LoadTemplates loads and parses all HTML templates.
Types ¶
type ConvoyData ¶
type ConvoyData struct {
Convoys []ConvoyRow
MergeQueue []MergeQueueRow
Polecats []PolecatRow
}
ConvoyData represents data passed to the convoy template.
type ConvoyFetcher ¶
type ConvoyFetcher interface {
FetchConvoys() ([]ConvoyRow, error)
FetchMergeQueue() ([]MergeQueueRow, error)
FetchPolecats() ([]PolecatRow, error)
}
ConvoyFetcher defines the interface for fetching convoy data.
type ConvoyHandler ¶
type ConvoyHandler struct {
// contains filtered or unexported fields
}
ConvoyHandler handles HTTP requests for the convoy dashboard.
func NewConvoyHandler ¶
func NewConvoyHandler(fetcher ConvoyFetcher) (*ConvoyHandler, error)
NewConvoyHandler creates a new convoy handler with the given fetcher.
func (*ConvoyHandler) ServeHTTP ¶
func (h *ConvoyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP handles GET / requests and renders the convoy dashboard.
type ConvoyRow ¶
type ConvoyRow struct {
ID string
Title string
Status string // "open" or "closed" (raw beads status)
WorkStatus string // Computed: "complete", "active", "stale", "stuck", "waiting"
Progress string // e.g., "2/5"
Completed int
Total int
LastActivity activity.Info
TrackedIssues []TrackedIssue
}
ConvoyRow represents a single convoy in the dashboard.
type LiveConvoyFetcher ¶
type LiveConvoyFetcher struct {
// contains filtered or unexported fields
}
LiveConvoyFetcher fetches convoy data from beads.
func NewLiveConvoyFetcher ¶
func NewLiveConvoyFetcher() (*LiveConvoyFetcher, error)
NewLiveConvoyFetcher creates a fetcher for the current workspace.
func (*LiveConvoyFetcher) FetchConvoys ¶
func (f *LiveConvoyFetcher) FetchConvoys() ([]ConvoyRow, error)
FetchConvoys fetches all open convoys with their activity data.
func (*LiveConvoyFetcher) FetchMergeQueue ¶
func (f *LiveConvoyFetcher) FetchMergeQueue() ([]MergeQueueRow, error)
FetchMergeQueue fetches open PRs from configured repos.
func (*LiveConvoyFetcher) FetchPolecats ¶
func (f *LiveConvoyFetcher) FetchPolecats() ([]PolecatRow, error)
FetchPolecats fetches all running polecat and refinery sessions with activity data.
type MergeQueueRow ¶
type MergeQueueRow struct {
Number int
Repo string // Short repo name (e.g., "roxas", "gastown")
Title string
URL string
CIStatus string // "pass", "fail", "pending"
Mergeable string // "ready", "conflict", "pending"
ColorClass string // "mq-green", "mq-yellow", "mq-red"
}
MergeQueueRow represents a PR in the merge queue.
type PolecatRow ¶
type PolecatRow struct {
Name string // e.g., "dag", "nux"
Rig string // e.g., "roxas", "gastown"
SessionID string // e.g., "gt-roxas-dag"
LastActivity activity.Info // Colored activity display
StatusHint string // Last line from pane (optional)
}
PolecatRow represents a polecat worker in the dashboard.