1.2.0-alpha.1 • Published 4 years ago

create-oerlikon-grafana-plugin v1.2.0-alpha.1

Weekly downloads
2
License
ISC
Repository
-
Last release
4 years ago

create-oerlikon-grafana-plugin

Simple way to create Oerlikon Grafana plugins. The plugin created with this CLI tool will already contain following features:

  • Oerlikon-UI library
  • Example of the communication with the App-Frame
  • Sass support
  • Example how to inject environment variables
  • Docker compose file to start Grafana, the proxy and your plugin in App-Frame context
  • Dockerfile to create image your plugin
  • Example docker-compose file for deploying to a test server

Installation

  1. Install the npm package globally: npm i -g create-oerlikon-grafana-plugin

  2. Start CLI tool with: create-oerlikon-grafana-plugin

  3. Enter a plugin name. After submit, the CLI tool will create a folder with all necessary files and install all dependencies.

or without installation of the package:

  1. Start CLI tool with: npx create-oerlikon-grafana-plugin

  2. Enter a plugin name. After submit, the CLI tool will create a folder with all necessary files and install all dependencies.

Config

After you have created the plugin, edit config paramaters in src/plugin.json

Start developing

To start developing, cd into the plugin folder and execute:

  • npm run watch
  • docker-compose -f dc-dev.yml up

now you can open Grafana with your plugin inside the App-Frame in your browser:

https://apps.oerlikon.grapes.dev/apps/dev/aHR0cDovLzEyNy4wLjAuMTo0MDAw

Environment variables

To inject an environment variable into your plugin, you can add a variable to the proxy service in the development docker-compose file dc-dev.yml with following pattern: PROXY_VARNAME

With ENV.VARNAME you can access the variable in your Panel or Editor component.

1.2.0-alpha.1

4 years ago

1.2.0-alpha.0

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago