diff --git a/.gitignore b/.gitignore index 4be1e20..d7c3a21 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,4 @@ coverage.html .DS_Store # built binary -/grot +/grom diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 9c83090..78f7a69 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,13 +1,13 @@ version: 2 -project_name: grot +project_name: grom before: hooks: - go mod tidy builds: - - main: ./cmd/grot + - main: ./cmd/grom env: - CGO_ENABLED=0 goos: [darwin, linux] @@ -37,12 +37,12 @@ homebrew_casks: owner: qf-studio name: homebrew-tap token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}" - homepage: https://github.com/qf-studio/grot + homepage: https://github.com/qf-studio/grom description: btop-style terminal dashboards for Prometheus & Grafana # Unsigned binary: strip the quarantine bit so Gatekeeper doesn't block it. hooks: post: install: | if system_command("/usr/bin/xattr", args: ["-h"]).exit_status == 0 - system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/grot"] + system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/grom"] end diff --git a/Makefile b/Makefile index 8319b69..1e68702 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ .PHONY: build build-all run demo test test-coverage lint fmt clean install deps release help -BINARY_NAME=grot +BINARY_NAME=grom VERSION?=$(shell git describe --tags --always --dirty 2>/dev/null || echo "dev") BUILD_TIME=$(shell date -u +"%Y-%m-%dT%H:%M:%SZ") LDFLAGS=-ldflags "-X main.version=$(VERSION) -X main.buildTime=$(BUILD_TIME)" @@ -9,14 +9,14 @@ all: build build: @echo "Building $(BINARY_NAME)..." - go build $(LDFLAGS) -o bin/$(BINARY_NAME) ./cmd/grot + go build $(LDFLAGS) -o bin/$(BINARY_NAME) ./cmd/grom build-all: @echo "Building for all platforms..." - GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build $(LDFLAGS) -o bin/$(BINARY_NAME)-darwin-amd64 ./cmd/grot - GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 go build $(LDFLAGS) -o bin/$(BINARY_NAME)-darwin-arm64 ./cmd/grot - GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build $(LDFLAGS) -o bin/$(BINARY_NAME)-linux-amd64 ./cmd/grot - GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build $(LDFLAGS) -o bin/$(BINARY_NAME)-linux-arm64 ./cmd/grot + GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build $(LDFLAGS) -o bin/$(BINARY_NAME)-darwin-amd64 ./cmd/grom + GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 go build $(LDFLAGS) -o bin/$(BINARY_NAME)-darwin-arm64 ./cmd/grom + GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build $(LDFLAGS) -o bin/$(BINARY_NAME)-linux-amd64 ./cmd/grom + GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build $(LDFLAGS) -o bin/$(BINARY_NAME)-linux-arm64 ./cmd/grom run: build ./bin/$(BINARY_NAME) @@ -53,7 +53,7 @@ clean: rm -f coverage.out coverage.html install: - go install $(LDFLAGS) ./cmd/grot + go install $(LDFLAGS) ./cmd/grom # Release — tag-only; CI (goreleaser) is the sole publisher. # Usage: make release V=0.1.0 @@ -72,7 +72,7 @@ endif @echo "✅ Tag v$(V) pushed. CI publishes the release." help: - @echo "grot Makefile:" + @echo "grom Makefile:" @echo " make build Build the binary" @echo " make build-all Build for all platforms" @echo " make demo Build and render the demo gallery" diff --git a/README.md b/README.md index 970538d..246d99c 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ -# grot +# grom -[![ci](https://github.com/qf-studio/grot/actions/workflows/ci.yml/badge.svg)](https://github.com/qf-studio/grot/actions/workflows/ci.yml) -[![release](https://img.shields.io/github/v/release/qf-studio/grot)](https://github.com/qf-studio/grot/releases) -[![license](https://img.shields.io/github/license/qf-studio/grot)](LICENSE) +[![ci](https://github.com/qf-studio/grom/actions/workflows/ci.yml/badge.svg)](https://github.com/qf-studio/grom/actions/workflows/ci.yml) +[![release](https://img.shields.io/github/v/release/qf-studio/grom)](https://github.com/qf-studio/grom/releases) +[![license](https://img.shields.io/github/license/qf-studio/grom)](LICENSE) **btop-style terminal dashboards for Prometheus & Grafana.** -grot renders Prometheus metrics as polished terminal dashboards — braille +grom renders Prometheus metrics as polished terminal dashboards — braille charts, gradient meters, threshold-colored stats. Point it at your existing Grafana dashboard JSON and get the same layout in your terminal. -![grot demo](docs/demo.gif) +![grom demo](docs/demo.gif) > Status: early release, under active development. @@ -20,36 +20,36 @@ Grafana dashboard JSON and get the same layout in your terminal. is abandoned (2019) and limited to termdash's fixed widgets. - [btop](https://github.com/aristocratos/btop) proves terminal dashboards can be beautiful — but it only shows system metrics. -- Nothing renders *your* Grafana dashboards in the terminal. grot does. +- Nothing renders *your* Grafana dashboards in the terminal. grom does. ## Install ```bash -brew install --cask qf-studio/tap/grot # macOS / Linux -go install github.com/qf-studio/grot/cmd/grot@latest +brew install --cask qf-studio/tap/grom # macOS / Linux +go install github.com/qf-studio/grom/cmd/grom@latest ``` Prebuilt binaries for darwin/linux (amd64 + arm64) on the -[releases page](https://github.com/qf-studio/grot/releases). +[releases page](https://github.com/qf-studio/grom/releases). ## Quick start ```bash # Widget gallery with fake data — no Prometheus needed -grot demo --theme tokyo-night +grom demo --theme tokyo-night # Works against ANY Prometheus (only uses `up` + scrape_* metrics) -grot run --config examples/prometheus.yaml --prom http://localhost:9090 +grom run --config examples/prometheus.yaml --prom http://localhost:9090 # Render your existing Grafana dashboard in the terminal -grot run --grafana-json my-dashboard.json --prom http://localhost:9090 +grom run --grafana-json my-dashboard.json --prom http://localhost:9090 # What maps? Validate an import without running it -grot import my-dashboard.json # summary + warnings -grot import --check my-dashboard.json # non-zero exit on any warning (CI) +grom import my-dashboard.json # summary + warnings +grom import --check my-dashboard.json # non-zero exit on any warning (CI) # One static frame to stdout (snapshots, docs, cron) -grot run -c dashboard.yaml --prom http://localhost:9090 --once +grom run -c dashboard.yaml --prom http://localhost:9090 --once ``` ## Keys @@ -102,7 +102,7 @@ widgets: Notes: -- `grid` is optional — omit it everywhere and grot auto-flows widgets into +- `grid` is optional — omit it everywhere and grom auto-flows widgets into rows with responsive breakpoints (1 column < 80 cols, 2 < 140, 4 beyond). - **timeseries** always query a range (step auto-sized to the chart width); **stat** joins in with `sparkline: true` (value + trend band); gauges and @@ -116,10 +116,10 @@ Working examples: [`examples/prometheus.yaml`](examples/prometheus.yaml) ## Grafana import -`grot run --grafana-json` / `grot import` accept a dashboard JSON export — +`grom run --grafana-json` / `grom import` accept a dashboard JSON export — bare or API-wrapped (`{"dashboard": {...}}`). -| Grafana | grot | +| Grafana | grom | |---|---| | `stat`, `gauge`, `bargauge`, `timeseries` panels | 1:1 widgets | | `gridPos` | 24-column layout, scaled to your terminal | @@ -142,7 +142,7 @@ bare or API-wrapped (`{"dashboard": {...}}`). ## Development ```bash -make build # build ./bin/grot +make build # build ./bin/grom make demo # render the widget gallery make test # go test -race make lint # golangci-lint diff --git a/cmd/grot/demo.go b/cmd/grom/demo.go similarity index 97% rename from cmd/grot/demo.go rename to cmd/grom/demo.go index 6396827..60ba29e 100644 --- a/cmd/grot/demo.go +++ b/cmd/grom/demo.go @@ -10,8 +10,8 @@ import ( "github.com/spf13/cobra" "golang.org/x/term" - "github.com/qf-studio/grot/pkg/tui/theme" - "github.com/qf-studio/grot/pkg/tui/widget" + "github.com/qf-studio/grom/pkg/tui/theme" + "github.com/qf-studio/grom/pkg/tui/widget" ) func demoCmd() *cobra.Command { @@ -176,7 +176,7 @@ func renderDemo(th theme.Theme, width int) string { empty.Render(otherW, row4H, th, false), ) - header := th.AccentStyle().Bold(true).Render(" grot") + + header := th.AccentStyle().Bold(true).Render(" grom") + th.DimStyle().Render(" · demo gallery · theme: "+th.Name) return header + "\n" + row1 + "\n" + row2 + "\n" + row3 + "\n" + row4 diff --git a/cmd/grot/import.go b/cmd/grom/import.go similarity index 94% rename from cmd/grot/import.go rename to cmd/grom/import.go index b0fdd4a..48d5066 100644 --- a/cmd/grot/import.go +++ b/cmd/grom/import.go @@ -6,8 +6,8 @@ import ( "github.com/spf13/cobra" - "github.com/qf-studio/grot/internal/config" - "github.com/qf-studio/grot/internal/grafana" + "github.com/qf-studio/grom/internal/config" + "github.com/qf-studio/grom/internal/grafana" ) func importCmd() *cobra.Command { diff --git a/cmd/grot/main.go b/cmd/grom/main.go similarity index 68% rename from cmd/grot/main.go rename to cmd/grom/main.go index 0c0a604..cc205bf 100644 --- a/cmd/grot/main.go +++ b/cmd/grom/main.go @@ -1,4 +1,4 @@ -// grot — a btop-style terminal dashboard for Prometheus & Grafana. +// grom — a btop-style terminal dashboard for Prometheus & Grafana. package main import ( @@ -15,9 +15,9 @@ var ( func main() { root := &cobra.Command{ - Use: "grot", - Short: "grot — btop-style terminal dashboards for Prometheus & Grafana", - Long: `grot renders Prometheus metrics as polished terminal dashboards. + Use: "grom", + Short: "grom — btop-style terminal dashboards for Prometheus & Grafana", + Long: `grom renders Prometheus metrics as polished terminal dashboards. Import your existing Grafana dashboard JSON or write a simple YAML config.`, SilenceUsage: true, } @@ -29,7 +29,7 @@ Import your existing Grafana dashboard JSON or write a simple YAML config.`, Use: "version", Short: "Print version", Run: func(cmd *cobra.Command, args []string) { - fmt.Printf("grot %s (built %s)\n", version, buildTime) + fmt.Printf("grom %s (built %s)\n", version, buildTime) }, }) diff --git a/cmd/grot/run.go b/cmd/grom/run.go similarity index 92% rename from cmd/grot/run.go rename to cmd/grom/run.go index eaf629a..eca3cb7 100644 --- a/cmd/grot/run.go +++ b/cmd/grom/run.go @@ -8,12 +8,12 @@ import ( "github.com/spf13/cobra" "golang.org/x/term" - "github.com/qf-studio/grot/internal/app" - "github.com/qf-studio/grot/internal/config" - "github.com/qf-studio/grot/internal/datasource/prom" - "github.com/qf-studio/grot/internal/grafana" - "github.com/qf-studio/grot/pkg/tui/theme" - "github.com/qf-studio/grot/pkg/tui/widget" + "github.com/qf-studio/grom/internal/app" + "github.com/qf-studio/grom/internal/config" + "github.com/qf-studio/grom/internal/datasource/prom" + "github.com/qf-studio/grom/internal/grafana" + "github.com/qf-studio/grom/pkg/tui/theme" + "github.com/qf-studio/grom/pkg/tui/widget" ) func runCmd() *cobra.Command { diff --git a/docs/demo.tape b/docs/demo.tape index cb52358..fc8aa13 100644 --- a/docs/demo.tape +++ b/docs/demo.tape @@ -11,12 +11,12 @@ Set Padding 12 Set WindowBar Colorful Hide -Type "go build -o grot ./cmd/grot && clear" +Type "go build -o grom ./cmd/grom && clear" Enter Sleep 3s Show -Type "./grot run --config examples/pilot.yaml --prom http://localhost:9093" +Type "./grom run --config examples/pilot.yaml --prom http://localhost:9093" Sleep 500ms Enter Sleep 4s diff --git a/examples/pilot.yaml b/examples/pilot.yaml index 77f5cbd..cd12257 100644 --- a/examples/pilot.yaml +++ b/examples/pilot.yaml @@ -1,6 +1,6 @@ -# grot native dashboard config — Pilot metrics from Prometheus. +# grom native dashboard config — Pilot metrics from Prometheus. # A btop-style overview: headline stats, a gauge + bar gauge, and two charts. -# Run: grot run --config examples/pilot.yaml --prom http://localhost:9093 +# Run: grom run --config examples/pilot.yaml --prom http://localhost:9093 title: pilot theme: pilot refresh: 10s diff --git a/examples/prometheus.yaml b/examples/prometheus.yaml index c31fa1d..3ce2de5 100644 --- a/examples/prometheus.yaml +++ b/examples/prometheus.yaml @@ -1,9 +1,9 @@ -# grot dashboard that works against ANY Prometheus — no exporters required. +# grom dashboard that works against ANY Prometheus — no exporters required. # It uses only `up` and the scrape_* metrics Prometheus attaches to every # target it scrapes. If your Prometheus also scrapes itself (the default # packaged config), swap in richer prometheus_* metrics where you like. # -# Run: grot run --config examples/prometheus.yaml --prom http://localhost:9090 +# Run: grom run --config examples/prometheus.yaml --prom http://localhost:9090 title: prometheus theme: tokyo-night refresh: 10s diff --git a/go.mod b/go.mod index 1a01c2e..68d97dc 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/qf-studio/grot +module github.com/qf-studio/grom go 1.25.0 diff --git a/grot b/grot new file mode 100755 index 0000000..4de7ab3 Binary files /dev/null and b/grot differ diff --git a/internal/app/build.go b/internal/app/build.go index 3328ed8..110999f 100644 --- a/internal/app/build.go +++ b/internal/app/build.go @@ -5,8 +5,8 @@ package app import ( "fmt" - "github.com/qf-studio/grot/internal/config" - "github.com/qf-studio/grot/pkg/tui/widget" + "github.com/qf-studio/grom/internal/config" + "github.com/qf-studio/grom/pkg/tui/widget" ) // BuildWidget constructs a renderable widget from a spec. diff --git a/internal/app/build_test.go b/internal/app/build_test.go index 3cfead6..b3d815e 100644 --- a/internal/app/build_test.go +++ b/internal/app/build_test.go @@ -3,8 +3,8 @@ package app import ( "testing" - "github.com/qf-studio/grot/internal/config" - "github.com/qf-studio/grot/pkg/tui/widget" + "github.com/qf-studio/grom/internal/config" + "github.com/qf-studio/grom/pkg/tui/widget" ) func fptr(v float64) *float64 { return &v } diff --git a/internal/app/fetch.go b/internal/app/fetch.go index 6b8cd09..bfa96a2 100644 --- a/internal/app/fetch.go +++ b/internal/app/fetch.go @@ -4,10 +4,10 @@ import ( "context" "time" - "github.com/qf-studio/grot/internal/config" - "github.com/qf-studio/grot/internal/datasource" - "github.com/qf-studio/grot/pkg/tui/render" - "github.com/qf-studio/grot/pkg/tui/widget" + "github.com/qf-studio/grom/internal/config" + "github.com/qf-studio/grom/internal/datasource" + "github.com/qf-studio/grom/pkg/tui/render" + "github.com/qf-studio/grom/pkg/tui/widget" ) // FetchWidget runs every query in spec and returns the combined result. diff --git a/internal/app/fetch_test.go b/internal/app/fetch_test.go index 45d0d85..d3d4898 100644 --- a/internal/app/fetch_test.go +++ b/internal/app/fetch_test.go @@ -3,7 +3,7 @@ package app import ( "testing" - "github.com/qf-studio/grot/internal/config" + "github.com/qf-studio/grom/internal/config" ) func TestUseRange(t *testing.T) { diff --git a/internal/app/grid.go b/internal/app/grid.go index 6407b57..f1b7273 100644 --- a/internal/app/grid.go +++ b/internal/app/grid.go @@ -3,7 +3,7 @@ package app import ( "sort" - "github.com/qf-studio/grot/internal/config" + "github.com/qf-studio/grom/internal/config" ) // Rect is a widget's placement in terminal cells, top-left origin. diff --git a/internal/app/grid_test.go b/internal/app/grid_test.go index 5b98f13..0ba47c6 100644 --- a/internal/app/grid_test.go +++ b/internal/app/grid_test.go @@ -3,7 +3,7 @@ package app import ( "testing" - "github.com/qf-studio/grot/internal/config" + "github.com/qf-studio/grom/internal/config" ) func specs(types ...config.WidgetType) []config.WidgetSpec { diff --git a/internal/app/help.go b/internal/app/help.go index 6e9d45c..2b1ce6e 100644 --- a/internal/app/help.go +++ b/internal/app/help.go @@ -5,8 +5,8 @@ import ( "github.com/charmbracelet/lipgloss" - "github.com/qf-studio/grot/pkg/tui/render" - "github.com/qf-studio/grot/pkg/tui/theme" + "github.com/qf-studio/grom/pkg/tui/render" + "github.com/qf-studio/grom/pkg/tui/theme" ) // helpBindings lists the dashboard keybindings shown by the ? overlay. diff --git a/internal/app/model.go b/internal/app/model.go index c280e2f..b62efb7 100644 --- a/internal/app/model.go +++ b/internal/app/model.go @@ -10,10 +10,10 @@ import ( tea "github.com/charmbracelet/bubbletea" - "github.com/qf-studio/grot/internal/config" - "github.com/qf-studio/grot/internal/datasource" - "github.com/qf-studio/grot/pkg/tui/theme" - "github.com/qf-studio/grot/pkg/tui/widget" + "github.com/qf-studio/grom/internal/config" + "github.com/qf-studio/grom/internal/datasource" + "github.com/qf-studio/grom/pkg/tui/theme" + "github.com/qf-studio/grom/pkg/tui/widget" ) // rangePresets are the windows the +/- keys step through. @@ -32,7 +32,7 @@ type ( } ) -// Model is grot's Bubble Tea application: a focusable, zoomable grid of widgets +// Model is grom's Bubble Tea application: a focusable, zoomable grid of widgets // backed by a polling datasource. Fetches run as concurrent Cmds guarded so a // slow query never blocks Update or stacks up behind itself. type Model struct { @@ -131,7 +131,7 @@ func (m Model) View() string { if !m.ready { return "" } - header := headerLine(coalesce(m.dash.Title, "grot"), m.th, formatRange(m.rng), m.zoomed, m.staleNames(), m.width) + header := headerLine(coalesce(m.dash.Title, "grom"), m.th, formatRange(m.rng), m.zoomed, m.staleNames(), m.width) if m.helpShown { return header + "\n" + helpView(m.th, m.width, m.contentHeight()) } diff --git a/internal/app/model_test.go b/internal/app/model_test.go index 7032e62..ca7a838 100644 --- a/internal/app/model_test.go +++ b/internal/app/model_test.go @@ -9,10 +9,10 @@ import ( tea "github.com/charmbracelet/bubbletea" "github.com/charmbracelet/lipgloss" - "github.com/qf-studio/grot/internal/config" - "github.com/qf-studio/grot/internal/datasource" - "github.com/qf-studio/grot/pkg/tui/theme" - "github.com/qf-studio/grot/pkg/tui/widget" + "github.com/qf-studio/grom/internal/config" + "github.com/qf-studio/grom/internal/datasource" + "github.com/qf-studio/grom/pkg/tui/theme" + "github.com/qf-studio/grom/pkg/tui/widget" ) // fakeDS returns canned data and counts calls. diff --git a/internal/app/render.go b/internal/app/render.go index d876959..2011f6a 100644 --- a/internal/app/render.go +++ b/internal/app/render.go @@ -8,17 +8,17 @@ import ( "github.com/charmbracelet/lipgloss" - "github.com/qf-studio/grot/internal/config" - "github.com/qf-studio/grot/pkg/tui/render" - "github.com/qf-studio/grot/pkg/tui/theme" - "github.com/qf-studio/grot/pkg/tui/widget" + "github.com/qf-studio/grom/internal/config" + "github.com/qf-studio/grom/pkg/tui/render" + "github.com/qf-studio/grom/pkg/tui/theme" + "github.com/qf-studio/grom/pkg/tui/widget" ) // StaticFrame renders a one-shot header + grid at the given viewport, with no // focus. Widgets must already hold their fetched results. func StaticFrame(dash *config.Dashboard, widgets []widget.Widget, th theme.Theme, termW, termH int) string { rects := GridLayout(dash.Widgets, termW, termH) - title := coalesce(dash.Title, "grot") + title := coalesce(dash.Title, "grom") header := headerLine(title, th, formatRange(dash.Range.Duration()), false, nil, termW) return header + "\n" + composeGrid(widgets, rects, th, -1) } diff --git a/internal/config/config.go b/internal/config/config.go index 59161cd..bc682d3 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -1,4 +1,4 @@ -// Package config defines grot's canonical dashboard model and a YAML loader. +// Package config defines grom's canonical dashboard model and a YAML loader. // Both native YAML configs and (later) Grafana JSON import produce a Dashboard. package config @@ -20,12 +20,12 @@ const ( TypeGauge WidgetType = "gauge" TypeBarGauge WidgetType = "bargauge" TypeTimeSeries WidgetType = "timeseries" - // TypePlaceholder marks a panel grot cannot render (produced by the Grafana + // TypePlaceholder marks a panel grom cannot render (produced by the Grafana // importer for unsupported panel types). It carries no queries. TypePlaceholder WidgetType = "placeholder" ) -// Dashboard is grot's canonical dashboard model. +// Dashboard is grom's canonical dashboard model. type Dashboard struct { Title string `yaml:"title"` Theme string `yaml:"theme"` diff --git a/internal/datasource/datasource.go b/internal/datasource/datasource.go index 302d33d..8dd04ba 100644 --- a/internal/datasource/datasource.go +++ b/internal/datasource/datasource.go @@ -1,4 +1,4 @@ -// Package datasource defines the boundary grot's widgets query against. The +// Package datasource defines the boundary grom's widgets query against. The // interface lives here (the consumer side); concrete backends such as // datasource/prom implement it. package datasource @@ -7,7 +7,7 @@ import ( "context" "time" - "github.com/qf-studio/grot/pkg/tui/widget" + "github.com/qf-studio/grom/pkg/tui/widget" ) // Instant requests a single-value (vector) query evaluated at At. A zero At diff --git a/internal/datasource/prom/prom.go b/internal/datasource/prom/prom.go index 752e75a..2fb9cb1 100644 --- a/internal/datasource/prom/prom.go +++ b/internal/datasource/prom/prom.go @@ -13,8 +13,8 @@ import ( promv1 "github.com/prometheus/client_golang/api/prometheus/v1" "github.com/prometheus/common/model" - "github.com/qf-studio/grot/internal/datasource" - "github.com/qf-studio/grot/pkg/tui/widget" + "github.com/qf-studio/grom/internal/datasource" + "github.com/qf-studio/grom/pkg/tui/widget" ) // Client queries a Prometheus server. diff --git a/internal/datasource/prom/prom_test.go b/internal/datasource/prom/prom_test.go index 6bb7b81..06d9d20 100644 --- a/internal/datasource/prom/prom_test.go +++ b/internal/datasource/prom/prom_test.go @@ -10,7 +10,7 @@ import ( "github.com/prometheus/common/model" - "github.com/qf-studio/grot/internal/datasource" + "github.com/qf-studio/grom/internal/datasource" ) // stubServer returns a Prometheus-shaped API server serving canned responses diff --git a/internal/grafana/grafana.go b/internal/grafana/grafana.go index 1e3cdf3..43a94af 100644 --- a/internal/grafana/grafana.go +++ b/internal/grafana/grafana.go @@ -1,5 +1,5 @@ -// Package grafana imports a Grafana dashboard JSON export into grot's canonical -// config.Dashboard. It maps the panel subset grot renders (stat, gauge, +// Package grafana imports a Grafana dashboard JSON export into grom's canonical +// config.Dashboard. It maps the panel subset grom renders (stat, gauge, // bargauge, timeseries) 1:1, promotes row children, and represents everything // else as a placeholder in its original grid slot, collecting warnings. package grafana @@ -11,7 +11,7 @@ import ( "strings" "time" - "github.com/qf-studio/grot/internal/config" + "github.com/qf-studio/grom/internal/config" ) // Import reads and converts a Grafana dashboard JSON file. @@ -111,7 +111,7 @@ func convertPanel(p rawPanel) (*config.WidgetSpec, string) { return spec, "" } -// mapType maps a Grafana panel type to a grot widget type. +// mapType maps a Grafana panel type to a grom widget type. func mapType(t string) (config.WidgetType, bool) { switch t { case "stat": diff --git a/internal/grafana/grafana_test.go b/internal/grafana/grafana_test.go index 0b8fc0d..28dd472 100644 --- a/internal/grafana/grafana_test.go +++ b/internal/grafana/grafana_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/qf-studio/grot/internal/config" + "github.com/qf-studio/grom/internal/config" ) func TestImportPilotDashboard(t *testing.T) { diff --git a/pkg/tui/theme/theme.go b/pkg/tui/theme/theme.go index 4626fa1..38b3522 100644 --- a/pkg/tui/theme/theme.go +++ b/pkg/tui/theme/theme.go @@ -1,4 +1,4 @@ -// Package theme defines grot's color themes. A Theme is a small set of +// Package theme defines grom's color themes. A Theme is a small set of // semantic color tokens; render primitives derive lipgloss styles from it. package theme diff --git a/pkg/tui/widget/bargauge.go b/pkg/tui/widget/bargauge.go index c838b29..f67739a 100644 --- a/pkg/tui/widget/bargauge.go +++ b/pkg/tui/widget/bargauge.go @@ -4,8 +4,8 @@ import ( "strings" "github.com/charmbracelet/lipgloss" - "github.com/qf-studio/grot/pkg/tui/render" - "github.com/qf-studio/grot/pkg/tui/theme" + "github.com/qf-studio/grom/pkg/tui/render" + "github.com/qf-studio/grom/pkg/tui/theme" ) // BarGauge shows one horizontal bar per series, scaled to the max value: diff --git a/pkg/tui/widget/gauge.go b/pkg/tui/widget/gauge.go index aa2b6c6..ac50fe0 100644 --- a/pkg/tui/widget/gauge.go +++ b/pkg/tui/widget/gauge.go @@ -4,8 +4,8 @@ import ( "strings" "github.com/charmbracelet/lipgloss" - "github.com/qf-studio/grot/pkg/tui/render" - "github.com/qf-studio/grot/pkg/tui/theme" + "github.com/qf-studio/grom/pkg/tui/render" + "github.com/qf-studio/grom/pkg/tui/theme" ) // Gauge shows a value as a horizontal meter with threshold coloring: diff --git a/pkg/tui/widget/placeholder.go b/pkg/tui/widget/placeholder.go index 39d0b47..dc4186f 100644 --- a/pkg/tui/widget/placeholder.go +++ b/pkg/tui/widget/placeholder.go @@ -1,11 +1,11 @@ package widget import ( - "github.com/qf-studio/grot/pkg/tui/render" - "github.com/qf-studio/grot/pkg/tui/theme" + "github.com/qf-studio/grom/pkg/tui/render" + "github.com/qf-studio/grom/pkg/tui/theme" ) -// Placeholder fills a panel slot grot cannot render — an unsupported Grafana +// Placeholder fills a panel slot grom cannot render — an unsupported Grafana // panel type — with a quiet centered note, so an imported dashboard keeps its // layout instead of leaving a hole. type Placeholder struct { diff --git a/pkg/tui/widget/stat.go b/pkg/tui/widget/stat.go index 9aa5056..9711da4 100644 --- a/pkg/tui/widget/stat.go +++ b/pkg/tui/widget/stat.go @@ -4,8 +4,8 @@ import ( "strings" "github.com/charmbracelet/lipgloss" - "github.com/qf-studio/grot/pkg/tui/render" - "github.com/qf-studio/grot/pkg/tui/theme" + "github.com/qf-studio/grom/pkg/tui/render" + "github.com/qf-studio/grom/pkg/tui/theme" ) // Stat shows a single large value with threshold coloring and an optional diff --git a/pkg/tui/widget/timeseries.go b/pkg/tui/widget/timeseries.go index 0af3812..7c1dc23 100644 --- a/pkg/tui/widget/timeseries.go +++ b/pkg/tui/widget/timeseries.go @@ -5,8 +5,8 @@ import ( "strings" "github.com/charmbracelet/lipgloss" - "github.com/qf-studio/grot/pkg/tui/render" - "github.com/qf-studio/grot/pkg/tui/theme" + "github.com/qf-studio/grom/pkg/tui/render" + "github.com/qf-studio/grom/pkg/tui/theme" ) // TimeSeries renders series as a braille area chart — the btop texture: diff --git a/pkg/tui/widget/widget.go b/pkg/tui/widget/widget.go index 1fb11e7..a89c70e 100644 --- a/pkg/tui/widget/widget.go +++ b/pkg/tui/widget/widget.go @@ -1,4 +1,4 @@ -// Package widget provides grot's renderable dashboard widgets: Stat, Gauge, +// Package widget provides grom's renderable dashboard widgets: Stat, Gauge, // BarGauge, and TimeSeries. Widgets receive query results and render // themselves into an exact w×h cell rectangle. package widget @@ -9,8 +9,8 @@ import ( "strings" "time" - "github.com/qf-studio/grot/pkg/tui/render" - "github.com/qf-studio/grot/pkg/tui/theme" + "github.com/qf-studio/grom/pkg/tui/render" + "github.com/qf-studio/grom/pkg/tui/theme" ) // Point is a single sample. diff --git a/pkg/tui/widget/widget_test.go b/pkg/tui/widget/widget_test.go index 70a2562..6c4efc4 100644 --- a/pkg/tui/widget/widget_test.go +++ b/pkg/tui/widget/widget_test.go @@ -7,7 +7,7 @@ import ( "time" "github.com/charmbracelet/lipgloss" - "github.com/qf-studio/grot/pkg/tui/theme" + "github.com/qf-studio/grom/pkg/tui/theme" ) func result(vals ...float64) QueryResult {