-
Notifications
You must be signed in to change notification settings - Fork 0
Developer Guide
The plugin is frontend-only and uses Grafana's standard panel plugin API.
-
src/plugin.jsondefines the plugin identity and metadata. -
src/module.tsregisters the panel, standard field options, and custom editor options. -
src/components/TimeOverlayPanel.tsxowns the Grafana time-series renderer, toolbar, zoom behavior, range overlays, notes, and export-route behavior. -
src/data/normalizeTimeSeriesFrames.tspreserves valid Grafana frames and provides a fallback for untyped tables. -
src/types.tsdefines the persisted range, note, and panel option contracts. -
testscontains Grafana end-to-end tests and fixtures. -
provisioningcontains the local datasource and editable example-dashboard inputs.
The renderer receives data through PanelProps; it never connects directly to a datasource. Correctly typed Grafana frames pass through unchanged so labels, links, units, metadata, and datasource-specific field settings remain intact.
- WSL on Windows or a supported Linux/macOS environment.
- Node.js matching
.nvmrcand npm matchingpackage.json. - Docker Desktop or Docker Engine with Compose.
- Git and GitHub CLI for repository workflows.
cd /mnt/c/Data/GrafanaCode/digitalrcs-timeoverlay-panel
npm ci
npm run devIn another terminal:
docker compose up -d --buildOpen http://localhost:3001. The local Compose configuration bind-mounts:
-
distinto the Grafana plugin directory. -
provisioninginto Grafana's provisioning directory. -
.local/grafana-datainto/var/lib/grafanafor persistent local state.
The example dashboard is imported through the Grafana HTTP API so UI edits can be saved.
Run before publishing changes:
npm run typecheck
npm run lint
npm run test:ci
npm run buildUse npm run e2e with the Grafana test environment for interaction changes. Test the supported Grafana-version matrix in GitHub Actions. For visual changes, also verify a normal dashboard, hover tooltips, zoom, saved overlays, and the organization's image/PDF renderer.
- Extend
TimeOverlayOptionsinsrc/types.ts. - Register the editor control and a backward-compatible default in
src/module.ts. - Treat missing values as defaults when reading existing dashboard JSON.
- Add focused unit tests and interaction coverage.
- Confirm export rendering does not depend on editor-only controls.
npm run build produces dist, which is the deployable frontend plugin. Release archives must contain a top-level directory named digitalrcs-timeoverlay-panel. The GitHub release workflow validates plugin metadata and packages tagged versions.
Use a Grafana private signature for approved internal root URLs or the Grafana catalog process for public distribution. Never commit signing tokens, private root URLs, or production credentials. See Plugin signing and the deployment guide for the release and installation paths.
The default branch is protected. Create a feature branch, commit focused changes, open a pull request, and wait for the required build/lint/unit-test check. Keep documentation and changelog entries synchronized with user-visible behavior.
DigitalRCS-TimeOverlay-Panel