dashboard

package
v0.124.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2026 License: Apache-2.0 Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package dashboard serves WB's local read-only operations dashboard and API.

Index

Constants

View Source
const APISchemaVersion = 1

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(options Options) http.Handler

NewHandler returns the dashboard UI and versioned read-only API.

Types

type Inventory added in v0.111.3

type Inventory struct {
	SourceFingerprint string    `json:"source_fingerprint,omitempty"`
	ObservedAt        time.Time `json:"observed_at,omitempty"`
	CacheHit          bool      `json:"cache_hit"`
}

type Machine

type Machine struct {
	Name    string `json:"name"`
	Version string `json:"wb_version"`
}

type Options

type Options struct {
	ProjectsRoot       string
	Version            string
	Now                func() time.Time
	CacheTTL           time.Duration
	InventoryIndexPath string
	InventoryIndexTTL  time.Duration
}

type Overview

type Overview struct {
	SchemaVersion int            `json:"schema_version"`
	GeneratedAt   time.Time      `json:"generated_at"`
	Machine       Machine        `json:"machine"`
	Operations    runlog.Summary `json:"operations"`
	Worktrees     []Worktree     `json:"worktrees"`
	Diagnostics   int            `json:"diagnostics"`
	Inventory     Inventory      `json:"inventory"`
}

func BuildOverview

func BuildOverview(ctx context.Context, projectsRoot, version string, now time.Time) (Overview, error)

BuildOverview joins local worktree inventory with governed-command events.

type Worktree

type Worktree struct {
	Task           string    `json:"task"`
	Repository     string    `json:"repository"`
	Branch         string    `json:"branch"`
	Owner          string    `json:"owner,omitempty"`
	OwnerState     string    `json:"owner_state"`
	AgeSeconds     int64     `json:"age_seconds,omitempty"`
	LastActivityAt time.Time `json:"last_activity_at,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL