📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP
Socket
Sign inDemoInstall
Socket

github.com/xiak/grafana-app-with-backend

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/xiak/grafana-app-with-backend

v0.0.0-20241012145507-d3948d222d86
Source
Go
Version published
Created
Source

Grafana App with Backend Plugin example

This template is a starting point for building an app plugin for Grafana. It includes a backend component.

What are Grafana app plugins?

App plugins can let you create a custom out-of-the-box monitoring experience by including custom pages, nested data sources, and panel plugins. A backend allows it to perform a variety of additional tasks, like handling incoming HTTP requests.

Get started

Frontend

  • Install dependencies

    npm install
    
  • Build plugin in development mode or run in watch mode

    npm run dev
    
  • Build plugin in production mode

    npm run build
    
  • Run the tests (using Jest)

    # Runs the tests and watches for changes
    npm run test
    
    # Exists after running all the tests
    npm run lint:ci
    
  • Spin up a Grafana instance and run the plugin inside it (using Docker)

    npm run server
    
  • Run the E2E tests

    # Spin up a Grafana instance first that we tests against
    npm run server
    
    # Start the tests
    npm run e2e
    
  • Run the linter

    npm run lint
    
    # or
    
    npm run lint:fix
    

Backend

  • Update Grafana plugin SDK for Go dependency to the latest minor version:

    go get -u github.com/grafana/grafana-plugin-sdk-go
    go mod tidy
    
  • Build backend plugin binaries for Linux, Windows and Darwin:

    mage -v
    
  • List all available Mage targets for additional commands:

    mage -l
    

Learn more

Below you can find source code for existing app plugins and other related documentation.

FAQs

Package last updated on 12 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts