Open sh0rez opened 3 years ago
Because the schema currently in main seems to lack the stat panel (ping @sdboyer)
Quick note that i am actively working on a fix for this in grafana/grafana#38727 which will unblock a pile of things, this included. Right now it's looking rosy that i deal with a bunch of the fugly awkwardness around using scuemata from CUE, in fact
Rather large PR implementing a (very basic) interactive editing flow.
Usage:
Then visit http://localhost:3001 and edit the one dashboard. Changes made in Grafana will be reflected on disk.
Packages
grafana.Watcher
type for subscribing to change eventscontext.Context
.edit.Editor
,edit.Grafana
: Go structs performing editing sessions (e.g. subscribing to events, plumbing, etc)edit.Server
: gRPC-web server to exposeedit.Editor
capabilities to the frontendedit.Check()
: enforces dashboards are in their separate files, so that they can safely be replacedInternals
Grafana pushes notifications over a special WebSocket API using centrifuge, when dashboards are saved.
edit.Grafana
uses agrafana.Watcher
to be notified by that, queries the current dashboard model using the deprecated (but only) API client and saves it to disk.edit.Server
andedit.DashboardService
implement a gRPC (and gRPC-web) server for interacting with this exactedit.Grafana
, allowing easy control of the edit session.Both the frontend and the backend use strongly typed gRPC messages, which fits nicely with the overall schema awareness of Polly